Class CommonCircuitBlockEntity
java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
in.northwestw.shortcircuit.registries.blockentities.common.CommonCircuitBlockEntity
- All Implemented Interfaces:
net.fabricmc.fabric.api.attachment.v1.AttachmentTarget,net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity
- Direct Known Subclasses:
CircuitBlockEntity,IntegratedCircuitBlockEntity
public class CommonCircuitBlockEntity
extends net.minecraft.world.level.block.entity.BlockEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected net.minecraft.world.item.DyeColorprotected booleanprotected net.minecraft.network.chat.Componentprotected UUIDFields inherited from class net.minecraft.world.level.block.entity.BlockEntity
level, remove, worldPositionFields inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
NBT_ATTACHMENT_KEY -
Constructor Summary
ConstructorsConstructorDescriptionCommonCircuitBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState) -
Method Summary
Modifier and TypeMethodDescriptionvoidcycleColor(boolean backwards) net.minecraft.world.item.DyeColorgetColor()@Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>net.minecraft.nbt.CompoundTaggetUuid()booleanisHidden()booleanisValid()voidload(net.minecraft.nbt.CompoundTag tag) protected booleanprotected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidsaveToItem(net.minecraft.world.item.ItemStack stack) voidsetColor(net.minecraft.world.item.DyeColor color) voidsetHidden(boolean hidden) voidsetName(net.minecraft.network.chat.Component name) voidprotected voidsideUpdated(RelativeDirection direction) voidtick()voidMethods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setLevel, setRemoved, triggerEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget
getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, removeAttached, setAttachedMethods inherited from interface net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity
getRenderData
-
Field Details
-
uuid
-
name
protected net.minecraft.network.chat.Component name -
color
protected net.minecraft.world.item.DyeColor color
-
-
Constructor Details
-
CommonCircuitBlockEntity
public CommonCircuitBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> type, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState)
-
-
Method Details
-
load
public void load(net.minecraft.nbt.CompoundTag tag) - Overrides:
loadin classnet.minecraft.world.level.block.entity.BlockEntity
-
saveAdditional
protected void saveAdditional(net.minecraft.nbt.CompoundTag tag) - Overrides:
saveAdditionalin classnet.minecraft.world.level.block.entity.BlockEntity
-
getUpdateTag
public net.minecraft.nbt.CompoundTag getUpdateTag()- Overrides:
getUpdateTagin classnet.minecraft.world.level.block.entity.BlockEntity
-
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
-
saveToItem
public void saveToItem(net.minecraft.world.item.ItemStack stack) - Overrides:
saveToItemin classnet.minecraft.world.level.block.entity.BlockEntity
-
isValid
public boolean isValid() -
getUuid
-
setUuid
-
isHidden
public boolean isHidden() -
setHidden
public void setHidden(boolean hidden) -
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() -
tick
public void tick() -
updateInputs
public void updateInputs() -
maxUpdateReached
protected boolean maxUpdateReached() -
sideUpdated
-