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 ClassesNested classes/interfaces inherited from class net.minecraft.world.level.block.entity.BlockEntity
net.minecraft.world.level.block.entity.BlockEntity.DataComponentInputNested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
net.neoforged.neoforge.attachment.AttachmentHolder.AsField -
Field Summary
FieldsModifier and TypeFieldDescriptionMap<net.minecraft.core.BlockPos, net.minecraft.world.level.block.state.BlockState> Fields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionCircuitBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcollectImplicitComponents(net.minecraft.core.component.DataComponentMap.Builder components) voidcycleColor(boolean backwards) shortnet.minecraft.world.item.DyeColorgetColor()voidintgetPower(net.minecraft.core.Direction direction) intgetRelativePower(RelativeDirection direction) @Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener> net.minecraft.nbt.CompoundTaggetUpdateTag(net.minecraft.core.HolderLookup.Provider registries) getUuid()booleanisHidden()booleanisValid()protected voidloadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) voidloadExtraFromData(net.minecraft.nbt.CompoundTag tag) booleanmatchRuntimeUuid(UUID uuid) reloadRuntime(Set<UUID> recurrence) org.apache.commons.lang3.tuple.Pair<CircuitBlockEntity.RuntimeReloadResult, Map<RelativeDirection, CircuitBoardBlock.Mode>> reloadRuntimeAndModeMap(Set<UUID> recurrence) voidvoidprotected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) voidsetBlockSize(short blockSize) voidsetColor(net.minecraft.world.item.DyeColor color) voidsetFake(boolean fake) voidsetHidden(boolean hidden) voidsetName(net.minecraft.network.chat.Component name) booleansetPower(int power, RelativeDirection direction) voidbooleanvoidtick()voidvoidupdateRuntimeBlock(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, triggerEventMethods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, serializeAttachmentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setDataMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockEntityExtension
getModelData, handleUpdateTag, invalidateCapabilities, onChunkUnloaded, onDataPacket, onLoad, requestModelDataUpdate
-
Field Details
-
blocks
-
-
Constructor Details
-
CircuitBlockEntity
public CircuitBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
tick
public void tick() -
shouldTick
public boolean shouldTick() -
updateInnerBlocks
public void updateInnerBlocks() -
isValid
public boolean isValid() -
resetRuntime
public void resetRuntime() -
reloadRuntime
-
reloadRuntime
-
reloadRuntimeAndModeMap
public org.apache.commons.lang3.tuple.Pair<CircuitBlockEntity.RuntimeReloadResult,Map<RelativeDirection, reloadRuntimeAndModeMapCircuitBoardBlock.Mode>> (Set<UUID> recurrence) -
updateRuntimeBlock
-
removeRuntime
public void removeRuntime() -
loadAdditional
protected void loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) - Overrides:
loadAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
saveAdditional
protected void saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag(net.minecraft.core.HolderLookup.Provider registries) - Overrides:
getUpdateTagin classnet.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:
getUpdatePacketin classnet.minecraft.world.level.block.entity.BlockEntity
-
collectImplicitComponents
protected void collectImplicitComponents(net.minecraft.core.component.DataComponentMap.Builder components) - Overrides:
collectImplicitComponentsin classnet.minecraft.world.level.block.entity.BlockEntity
-
getRuntimeUuid
-
getUuid
-
setUuid
-
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
-
setPower
-
getPower
public int getPower(net.minecraft.core.Direction direction) -
getRelativePower
-
getInputSignals
public void getInputSignals()
-