Class InsulatorBlockEntity
java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
com.codinglitch.simpleradio.core.registry.blocks.InsulatorBlockEntity
- All Implemented Interfaces:
Socket,net.fabricmc.fabric.api.attachment.v1.AttachmentTarget,net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity
public class InsulatorBlockEntity
extends net.minecraft.world.level.block.entity.BlockEntity
implements Socket
-
Field Summary
FieldsModifier and TypeFieldDescriptionnet.minecraft.world.entity.player.PlayerfloatFields 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
ConstructorsConstructorDescriptionInsulatorBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) -
Method Summary
Modifier and TypeMethodDescriptionOverride this to expose a given router to wires.@Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>net.minecraft.nbt.CompoundTagvoidload(net.minecraft.nbt.CompoundTag tag) voidprotected voidsaveAdditional(net.minecraft.nbt.CompoundTag tag) voidsetConnector(net.minecraft.world.entity.player.Player connector) voidsetLevel(net.minecraft.world.level.Level level) voidstatic voidtick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, InsulatorBlockEntity blockEntity) Methods inherited from class net.minecraft.world.level.block.entity.BlockEntity
addEntityType, clearRemoved, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, hasLevel, isRemoved, loadStatic, onlyOpCanSetNbt, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, 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
getRenderDataMethods inherited from interface com.codinglitch.simpleradio.api.central.Socket
canConnect, canConnectTo, connect, disconnect, disconnect, distribute, getIdentifier, getReference, getWires, hasWire, hasWire, shortCircuit
-
Field Details
-
id
-
router
-
rotation
public float rotation -
connector
public net.minecraft.world.entity.player.Player connector
-
-
Constructor Details
-
InsulatorBlockEntity
public InsulatorBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
-
Method Details
-
setConnector
public void setConnector(net.minecraft.world.entity.player.Player connector) -
removeConnector
public void removeConnector() -
setLevel
public void setLevel(net.minecraft.world.level.Level level) - Overrides:
setLevelin classnet.minecraft.world.level.block.entity.BlockEntity
-
setRemoved
public void setRemoved()- Overrides:
setRemovedin classnet.minecraft.world.level.block.entity.BlockEntity
-
getRouter
Description copied from interface:SocketOverride this to expose a given router to wires.
Allows blocks with more than one router to choose which of their routers wires will connect to. -
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
-
tick
public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, InsulatorBlockEntity blockEntity)
-