Class WhistleBlockEntity

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.block.entity.BlockEntity
All Implemented Interfaces:
IHaveCustomOverlayIcon, IHaveGoggleInformation, PartialSafeNBT, SpecialBlockEntityItemRequirement, IInteractionChecker, net.createmod.ponder.api.VirtualBlockEntity, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockEntityExtension

public class WhistleBlockEntity extends SmartBlockEntity implements IHaveGoggleInformation
  • Field Details

  • Constructor Details

    • WhistleBlockEntity

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

    • addBehaviours

      public void addBehaviours(List<BlockEntityBehaviour> behaviours)
      Specified by:
      addBehaviours in class SmartBlockEntity
    • updatePitch

      public void updatePitch()
    • tick

      public void tick()
      Overrides:
      tick in class SmartBlockEntity
    • write

      protected void write(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
      Description copied from class: SmartBlockEntity
      Hook only these in future subclasses of STE
      Overrides:
      write in class SmartBlockEntity
    • read

      protected void read(net.minecraft.nbt.CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries, boolean clientPacket)
      Description copied from class: SmartBlockEntity
      Hook only these in future subclasses of STE
      Overrides:
      read in class SmartBlockEntity
    • addToGoggleTooltip

      public boolean addToGoggleTooltip(List<net.minecraft.network.chat.Component> tooltip, boolean isPlayerSneaking)
      Description copied from interface: IHaveGoggleInformation
      This method will be called when looking at a BlockEntity that implements this interface
      Specified by:
      addToGoggleTooltip in interface IHaveGoggleInformation
      Returns:
      true if the tooltip creation was successful and should be displayed, or false if the overlay should not be displayed
    • isPowered

      protected boolean isPowered()
    • getOctave

      protected WhistleBlock.WhistleSize getOctave()
    • tickAudio

      protected void tickAudio(WhistleBlock.WhistleSize size, boolean powered)
    • getPitchId

      public int getPitchId()
    • getTank

      public FluidTankBlockEntity getTank()