Class TransmitterBlockEntity

java.lang.Object
net.minecraft.world.level.block.entity.BlockEntity
All Implemented Interfaces:
Frequencing, Socket, Transmitting, net.fabricmc.fabric.api.attachment.v1.AttachmentTarget, net.fabricmc.fabric.api.blockview.v2.RenderDataBlockEntity

public class TransmitterBlockEntity extends CatalyzingBlockEntity implements Transmitting
  • Field Details

    • isActive

      public boolean isActive
    • isDirty

      public boolean isDirty
    • antennaPower

      public int antennaPower
  • Constructor Details

    • TransmitterBlockEntity

      public TransmitterBlockEntity(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • getAdaptorLocation

      public net.minecraft.core.BlockPos getAdaptorLocation()
      Specified by:
      getAdaptorLocation in class CatalyzingBlockEntity
    • setRemoved

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

      public void loadTag(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      loadTag in class CatalyzingBlockEntity
    • saveTag

      public void saveTag(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      saveTag in class CatalyzingBlockEntity
    • load

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

      public void saveAdditional(net.minecraft.nbt.CompoundTag tag)
      Overrides:
      saveAdditional in class AuditoryBlockEntity
    • saveToItem

      public void saveToItem(net.minecraft.world.item.ItemStack stack)
      Overrides:
      saveToItem in class net.minecraft.world.level.block.entity.BlockEntity
    • markDirty

      public void markDirty()
      Description copied from interface: Frequencing
      Mark this frequencing instance as dirty such that it will recalculate antenna strength at the next possible chance.
      Specified by:
      markDirty in interface Frequencing
    • tick

      public static void tick(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, TransmitterBlockEntity blockEntity)
    • inactivate

      public void inactivate()
    • activate

      public void activate()
    • getAntennaPower

      public int getAntennaPower()
      Description copied from interface: Frequencing
      Get the current cached antenna power. Only works if the instance has overriden this method. Use this method instead of Frequencing.calculateAntennaPower(BlockPos, Level) whenever possible.
      Specified by:
      getAntennaPower in interface Frequencing
      Returns:
      The antenna power