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
  • Nested Class Summary

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

    net.minecraft.world.level.block.entity.BlockEntity.DataComponentInput
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    net.minecraft.world.entity.player.Player
     
     
    float
     
     

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

    level, remove, worldPosition

    Fields inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    NBT_ATTACHMENT_KEY
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
     
    void
     
    Override this to expose a given router to wires.
    @Nullable net.minecraft.network.protocol.Packet<net.minecraft.network.protocol.game.ClientGamePacketListener>
     
    net.minecraft.nbt.CompoundTag
    getUpdateTag(net.minecraft.core.HolderLookup.Provider provider)
     
    void
    loadAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
     
    void
     
    protected void
    saveAdditional(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider provider)
     
    void
    setConnector(net.minecraft.world.entity.player.Player connector)
     
    void
    setLevel(net.minecraft.world.level.Level level)
     
    void
     
    static void
    tick(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, applyComponents, applyComponentsFromItemStack, applyImplicitComponents, clearRemoved, collectComponents, collectImplicitComponents, components, fillCrashReportCategory, getBlockPos, getBlockState, getLevel, getPosFromTag, getType, hasLevel, isRemoved, isValidBlockState, loadCustomOnly, loadStatic, loadWithComponents, onlyOpCanSetNbt, parseCustomNameSafe, removeComponentsFromTag, saveCustomAndMetadata, saveCustomOnly, saveToItem, saveWithFullMetadata, saveWithId, saveWithoutMetadata, setBlockState, setChanged, setChanged, setComponents, triggerEvent

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, removeAttached, setAttached

    Methods inherited from interface net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity

    getRenderData

    Methods inherited from interface com.codinglitch.simpleradio.central.Socket

    canConnect, canConnectTo, connect, disconnect, disconnect, distribute, getIdentifier, getReference, getWires, hasWire, hasWire, shortCircuit
  • Field Details

    • id

      public UUID id
    • router

      public RadioRouter 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:
      setLevel in class net.minecraft.world.level.block.entity.BlockEntity
    • setRemoved

      public void setRemoved()
      Overrides:
      setRemoved in class net.minecraft.world.level.block.entity.BlockEntity
    • getRouter

      public RadioRouter getRouter()
      Description copied from interface: Socket
      Override 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.
      Specified by:
      getRouter in interface Socket
      Returns:
      The router to be exposed
    • loadAdditional

      public 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 provider)
      Overrides:
      getUpdateTag in class net.minecraft.world.level.block.entity.BlockEntity
    • 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
    • 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)
    • activate

      public void activate()
    • deactivate

      public void deactivate()