Class AuditoryBlockEntity

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
com.codinglitch.simpleradio.core.registry.blocks.AuditoryBlockEntity
All Implemented Interfaces:
Socket
Direct Known Subclasses:
CatalyzingBlockEntity, MicrophoneBlockEntity, RadioBlockEntity, SpeakerBlockEntity

public abstract class AuditoryBlockEntity extends net.minecraft.world.level.block.entity.BlockEntity implements Socket
A block entity which interacts with audio in some way;
  • Field Details

  • Constructor Details

    • AuditoryBlockEntity

      public AuditoryBlockEntity(net.minecraft.world.level.block.entity.BlockEntityType<?> blockEntityType, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • setLevel

      public void setLevel(net.minecraft.world.level.Level level)
      Overrides:
      setLevel 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
    • getConnectionPosition

      public net.minecraft.world.phys.Vec3 getConnectionPosition()
    • loadFromItem

      public void loadFromItem(net.minecraft.world.item.ItemStack stack)
    • loadTag

      public void loadTag(net.minecraft.nbt.CompoundTag tag)
    • saveTag

      public void saveTag(net.minecraft.nbt.CompoundTag tag)
    • saveAdditional

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

      public net.minecraft.nbt.CompoundTag getUpdateTag()
      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