Class CircuitBlockEntity

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
in.northwestw.shortcircuit.registries.blockentities.CircuitBlockEntity
All Implemented Interfaces:
net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockEntityExtension

public class CircuitBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     

    Nested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity

    net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput

    Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Map<net.minecraft.core.BlockPos,net.minecraft.world.level.block.state.BlockState>
     

    Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity

    level, remove, worldPosition

    Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    ATTACHMENTS_NBT_KEY
  • Constructor Summary

    Constructors
    Constructor
    Description
    CircuitBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    collectImplicitComponents(net.minecraft.core.component.DataComponentMap.Builder components)
     
    void
    cycleColor(boolean backwards)
     
    short
     
    net.minecraft.world.item.DyeColor
     
    void
     
    int
    getPower(net.minecraft.core.Direction direction)
     
    int
     
     
    @Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>
     
    net.minecraft.nbt.CompoundTag
    getUpdateTag(net.minecraft.core.HolderLookup.Provider registries)
     
     
    boolean
     
    boolean
     
    protected void
    loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
     
    void
    loadExtraFromData(net.minecraft.nbt.CompoundTag tag)
     
    boolean
     
     
    reloadRuntime(Set<UUID> recurrence)
     
     
    void
     
    void
     
    protected void
    saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
     
    void
    setBlockSize(short blockSize)
     
    void
    setColor(net.minecraft.world.item.DyeColor color)
     
    void
    setFake(boolean fake)
     
    void
    setHidden(boolean hidden)
     
    void
    setName(net.minecraft.network.chat.Component name)
     
    boolean
    setPower(int power, RelativeDirection direction)
     
    void
    setUuid(UUID uuid)
     
    boolean
     
    static <T extends net.minecraft.world.level.block.entity.BlockEntity>
    void
    tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, T t)
     
    void
     
    void
    updateRuntimeBlock(int signal, RelativeDirection direction)
     

    Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity

    addEntityType, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPersistentData, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, parseCustomNameSafe, removeComponentsFromTag, removeData, saveCustomAndMetadata, saveCustomOnly, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, setData, setLevel, setRemoved, triggerEvent

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachments

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder

    getData, getExistingData, hasData, removeData, setData

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension

    getModelData, handleUpdateTag, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
  • Field Details

    • blocks

      public Map<net.minecraft.core.BlockPos,net.minecraft.world.level.block.state.BlockState> blocks
  • Constructor Details

    • CircuitBlockEntity

      public CircuitBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • tick

      public static <T extends net.minecraft.world.level.block.entity.BlockEntity> void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, T t)
    • shouldTick

      public boolean shouldTick()
    • updateInnerBlocks

      public void updateInnerBlocks()
    • isValid

      public boolean isValid()
    • resetRuntime

      public void resetRuntime()
    • reloadRuntime

    • reloadRuntime

      public CircuitBlockEntity.RuntimeReloadResult reloadRuntime(Set<UUID> recurrence)
    • reloadRuntimeAndModeMap

      public org.apache.commons.lang3.tuple.Pair<CircuitBlockEntity.RuntimeReloadResult,Map<RelativeDirection,CircuitBoardBlock.Mode>> reloadRuntimeAndModeMap(Set<UUID> recurrence)
    • updateRuntimeBlock

      public void updateRuntimeBlock(int signal, RelativeDirection direction)
    • removeRuntime

      public void removeRuntime()
    • loadAdditional

      protected void loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
      Overrides:
      loadAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • saveAdditional

      protected void saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
      Overrides:
      saveAdditional in class net.minecraft.world.level.block.entity.BlockEntity
    • getUpdateTag

      public net.minecraft.nbt.CompoundTag getUpdateTag(net.minecraft.core.HolderLookup.Provider registries)
      Overrides:
      getUpdateTag in class net.minecraft.world.level.block.entity.BlockEntity
    • loadExtraFromData

      public void loadExtraFromData(net.minecraft.nbt.CompoundTag tag)
    • getUpdatePacket

      @Nullable public @Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> getUpdatePacket()
      Overrides:
      getUpdatePacket in class net.minecraft.world.level.block.entity.BlockEntity
    • collectImplicitComponents

      protected void collectImplicitComponents(net.minecraft.core.component.DataComponentMap.Builder components)
      Overrides:
      collectImplicitComponents in class net.minecraft.world.level.block.entity.BlockEntity
    • getRuntimeUuid

      public UUID getRuntimeUuid()
    • getUuid

      public UUID getUuid()
    • setUuid

      public void setUuid(UUID uuid)
    • getBlockSize

      public short getBlockSize()
    • setBlockSize

      public void setBlockSize(short blockSize)
    • isHidden

      public boolean isHidden()
    • setHidden

      public void setHidden(boolean hidden)
    • setFake

      public void setFake(boolean fake)
    • setName

      public void setName(net.minecraft.network.chat.Component name)
    • cycleColor

      public void cycleColor(boolean backwards)
    • setColor

      public void setColor(net.minecraft.world.item.DyeColor color)
    • getColor

      public net.minecraft.world.item.DyeColor getColor()
    • matchRuntimeUuid

      public boolean matchRuntimeUuid(UUID uuid)
    • setPower

      public boolean setPower(int power, RelativeDirection direction)
    • getPower

      public int getPower(net.minecraft.core.Direction direction)
    • getRelativePower

      public int getRelativePower(RelativeDirection direction)
    • getInputSignals

      public void getInputSignals()