Class BeaconBlockEntity

java.lang.Object
net.minecraft.block.entity.BlockEntity
net.minecraft.block.entity.BeaconBlockEntity
All Implemented Interfaces:
NamedScreenHandlerFactory, ScreenHandlerFactory, Nameable

public class BeaconBlockEntity extends BlockEntity implements NamedScreenHandlerFactory, Nameable
Mappings:
Namespace Name
named net/minecraft/block/entity/BeaconBlockEntity
intermediary net/minecraft/class_2580
official dpe
  • Field Details

    • field_31304

      private static final int field_31304
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_31304 Lnet/minecraft/block/entity/BeaconBlockEntity;field_31304:I
      intermediary field_31304 Lnet/minecraft/class_2580;field_31304:I
      official f Ldpe;f:I
    • EFFECTS_BY_LEVEL

      public static final List<List<RegistryEntry<StatusEffect>>> EFFECTS_BY_LEVEL
      Mappings:
      Namespace Name Mixin selector
      named EFFECTS_BY_LEVEL Lnet/minecraft/block/entity/BeaconBlockEntity;EFFECTS_BY_LEVEL:Ljava/util/List;
      intermediary field_11801 Lnet/minecraft/class_2580;field_11801:Ljava/util/List;
      official a Ldpe;a:Ljava/util/List;
    • EFFECTS

      private static final Set<RegistryEntry<StatusEffect>> EFFECTS
      Mappings:
      Namespace Name Mixin selector
      named EFFECTS Lnet/minecraft/block/entity/BeaconBlockEntity;EFFECTS:Ljava/util/Set;
      intermediary field_11798 Lnet/minecraft/class_2580;field_11798:Ljava/util/Set;
      official g Ldpe;g:Ljava/util/Set;
    • LEVEL_PROPERTY_INDEX

      public static final int LEVEL_PROPERTY_INDEX
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named LEVEL_PROPERTY_INDEX Lnet/minecraft/block/entity/BeaconBlockEntity;LEVEL_PROPERTY_INDEX:I
      intermediary field_31300 Lnet/minecraft/class_2580;field_31300:I
      official b Ldpe;b:I
    • PRIMARY_PROPERTY_INDEX

      public static final int PRIMARY_PROPERTY_INDEX
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named PRIMARY_PROPERTY_INDEX Lnet/minecraft/block/entity/BeaconBlockEntity;PRIMARY_PROPERTY_INDEX:I
      intermediary field_31301 Lnet/minecraft/class_2580;field_31301:I
      official c Ldpe;c:I
    • SECONDARY_PROPERTY_INDEX

      public static final int SECONDARY_PROPERTY_INDEX
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named SECONDARY_PROPERTY_INDEX Lnet/minecraft/block/entity/BeaconBlockEntity;SECONDARY_PROPERTY_INDEX:I
      intermediary field_31302 Lnet/minecraft/class_2580;field_31302:I
      official d Ldpe;d:I
    • PROPERTY_COUNT

      public static final int PROPERTY_COUNT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named PROPERTY_COUNT Lnet/minecraft/block/entity/BeaconBlockEntity;PROPERTY_COUNT:I
      intermediary field_31303 Lnet/minecraft/class_2580;field_31303:I
      official e Ldpe;e:I
    • field_31305

      private static final int field_31305
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_31305 Lnet/minecraft/block/entity/BeaconBlockEntity;field_31305:I
      intermediary field_31305 Lnet/minecraft/class_2580;field_31305:I
      official h Ldpe;h:I
    • CONTAINER_NAME_TEXT

      private static final Text CONTAINER_NAME_TEXT
      Mappings:
      Namespace Name Mixin selector
      named CONTAINER_NAME_TEXT Lnet/minecraft/block/entity/BeaconBlockEntity;CONTAINER_NAME_TEXT:Lnet/minecraft/text/Text;
      intermediary field_40328 Lnet/minecraft/class_2580;field_40328:Lnet/minecraft/class_2561;
      official i Ldpe;i:Lxp;
    • PRIMARY_EFFECT_NBT_KEY

      private static final String PRIMARY_EFFECT_NBT_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named PRIMARY_EFFECT_NBT_KEY Lnet/minecraft/block/entity/BeaconBlockEntity;PRIMARY_EFFECT_NBT_KEY:Ljava/lang/String;
      intermediary field_45784 Lnet/minecraft/class_2580;field_45784:Ljava/lang/String;
      official j Ldpe;j:Ljava/lang/String;
    • SECONDARY_EFFECT_NBT_KEY

      private static final String SECONDARY_EFFECT_NBT_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named SECONDARY_EFFECT_NBT_KEY Lnet/minecraft/block/entity/BeaconBlockEntity;SECONDARY_EFFECT_NBT_KEY:Ljava/lang/String;
      intermediary field_45785 Lnet/minecraft/class_2580;field_45785:Ljava/lang/String;
      official k Ldpe;k:Ljava/lang/String;
    • beamSegments

      Mappings:
      Namespace Name Mixin selector
      named beamSegments Lnet/minecraft/block/entity/BeaconBlockEntity;beamSegments:Ljava/util/List;
      intermediary field_19177 Lnet/minecraft/class_2580;field_19177:Ljava/util/List;
      official l Ldpe;l:Ljava/util/List;
    • field_19178

      private List<BeaconBlockEntity.BeamSegment> field_19178
      Mappings:
      Namespace Name Mixin selector
      named field_19178 Lnet/minecraft/block/entity/BeaconBlockEntity;field_19178:Ljava/util/List;
      intermediary field_19178 Lnet/minecraft/class_2580;field_19178:Ljava/util/List;
      official m Ldpe;m:Ljava/util/List;
    • level

      int level
      Mappings:
      Namespace Name Mixin selector
      named level Lnet/minecraft/block/entity/BeaconBlockEntity;level:I
      intermediary field_11803 Lnet/minecraft/class_2580;field_11803:I
      official q Ldpe;q:I
    • minY

      private int minY
      Mappings:
      Namespace Name Mixin selector
      named minY Lnet/minecraft/block/entity/BeaconBlockEntity;minY:I
      intermediary field_19179 Lnet/minecraft/class_2580;field_19179:I
      official r Ldpe;r:I
    • primary

      Mappings:
      Namespace Name Mixin selector
      named primary Lnet/minecraft/block/entity/BeaconBlockEntity;primary:Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary field_11795 Lnet/minecraft/class_2580;field_11795:Lnet/minecraft/class_6880;
      official s Ldpe;s:Lji;
    • secondary

      Mappings:
      Namespace Name Mixin selector
      named secondary Lnet/minecraft/block/entity/BeaconBlockEntity;secondary:Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary field_11799 Lnet/minecraft/class_2580;field_11799:Lnet/minecraft/class_6880;
      official t Ldpe;t:Lji;
    • customName

      @Nullable private @Nullable Text customName
      Mappings:
      Namespace Name Mixin selector
      named customName Lnet/minecraft/block/entity/BeaconBlockEntity;customName:Lnet/minecraft/text/Text;
      intermediary field_11793 Lnet/minecraft/class_2580;field_11793:Lnet/minecraft/class_2561;
      official u Ldpe;u:Lxp;
    • lock

      private ContainerLock lock
      Mappings:
      Namespace Name Mixin selector
      named lock Lnet/minecraft/block/entity/BeaconBlockEntity;lock:Lnet/minecraft/inventory/ContainerLock;
      intermediary field_17377 Lnet/minecraft/class_2580;field_17377:Lnet/minecraft/class_1273;
      official v Ldpe;v:Lbqz;
    • propertyDelegate

      private final PropertyDelegate propertyDelegate
      Mappings:
      Namespace Name Mixin selector
      named propertyDelegate Lnet/minecraft/block/entity/BeaconBlockEntity;propertyDelegate:Lnet/minecraft/screen/PropertyDelegate;
      intermediary field_17378 Lnet/minecraft/class_2580;field_17378:Lnet/minecraft/class_3913;
      official w Ldpe;w:Lcqg;
  • Constructor Details

    • BeaconBlockEntity

      public BeaconBlockEntity(BlockPos pos, BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/block/entity/BeaconBlockEntity;<init>(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)V
      intermediary <init> Lnet/minecraft/class_2580;<init>(Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;)V
      official <init> Ldpe;<init>(Liz;Ldse;)V
  • Method Details

    • getEffectOrNull

      Mappings:
      Namespace Name Mixin selector
      named getEffectOrNull Lnet/minecraft/block/entity/BeaconBlockEntity;getEffectOrNull(Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_53251 Lnet/minecraft/class_2580;method_53251(Lnet/minecraft/class_6880;)Lnet/minecraft/class_6880;
      official a Ldpe;a(Lji;)Lji;
    • tick

      public static void tick(World world, BlockPos pos, BlockState state, BeaconBlockEntity blockEntity)
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/block/entity/BeaconBlockEntity;tick(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/entity/BeaconBlockEntity;)V
      intermediary method_16896 Lnet/minecraft/class_2580;method_16896(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_2580;)V
      official a Ldpe;a(Ldca;Liz;Ldse;Ldpe;)V
    • updateLevel

      private static int updateLevel(World world, int x, int y, int z)
      Mappings:
      Namespace Name Mixin selector
      named updateLevel Lnet/minecraft/block/entity/BeaconBlockEntity;updateLevel(Lnet/minecraft/world/World;III)I
      intermediary method_20293 Lnet/minecraft/class_2580;method_20293(Lnet/minecraft/class_1937;III)I
      official a Ldpe;a(Ldca;III)I
    • markRemoved

      public void markRemoved()
      Overrides:
      markRemoved in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      named markRemoved Lnet/minecraft/block/entity/BlockEntity;markRemoved()V
      intermediary method_11012 Lnet/minecraft/class_2586;method_11012()V
      official av_ Ldpj;av_()V
    • applyPlayerEffects

      private static void applyPlayerEffects(World world, BlockPos pos, int beaconLevel, @Nullable @Nullable RegistryEntry<StatusEffect> primaryEffect, @Nullable @Nullable RegistryEntry<StatusEffect> secondaryEffect)
      Mappings:
      Namespace Name Mixin selector
      named applyPlayerEffects Lnet/minecraft/block/entity/BeaconBlockEntity;applyPlayerEffects(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;ILnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/registry/entry/RegistryEntry;)V
      intermediary method_10940 Lnet/minecraft/class_2580;method_10940(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;ILnet/minecraft/class_6880;Lnet/minecraft/class_6880;)V
      official a Ldpe;a(Ldca;Liz;ILji;Lji;)V
    • playSound

      public static void playSound(World world, BlockPos pos, SoundEvent sound)
      Mappings:
      Namespace Name Mixin selector
      named playSound Lnet/minecraft/block/entity/BeaconBlockEntity;playSound(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/sound/SoundEvent;)V
      intermediary method_10938 Lnet/minecraft/class_2580;method_10938(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_3414;)V
      official a Ldpe;a(Ldca;Liz;Lavz;)V
    • getBeamSegments

      public List<BeaconBlockEntity.BeamSegment> getBeamSegments()
      Mappings:
      Namespace Name Mixin selector
      named getBeamSegments Lnet/minecraft/block/entity/BeaconBlockEntity;getBeamSegments()Ljava/util/List;
      intermediary method_10937 Lnet/minecraft/class_2580;method_10937()Ljava/util/List;
      official b Ldpe;b()Ljava/util/List;
    • toUpdatePacket

      public BlockEntityUpdateS2CPacket toUpdatePacket()
      Description copied from class: BlockEntity
      Returns the packet to send to nearby players when the block entity's observable state changes, or null to not send the packet.

      If the data returned by initial chunk data is suitable for updates, the following shortcut can be used to create an update packet: BlockEntityUpdateS2CPacket.create(this). The NBT will be passed to BlockEntity.readNbt(net.minecraft.nbt.NbtCompound, net.minecraft.registry.RegistryWrapper.WrapperLookup) on the client.

      "Observable state" is a state that clients can observe without specific interaction. For example, CampfireBlockEntity's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.

      To sync block entity data using this method, use serverWorld.getChunkManager().markForUpdate(this.getPos());.

      Overrides:
      toUpdatePacket in class BlockEntity
      Returns:
      the packet to send to nearby players when the block entity's observable state changes, or null to not send the packet
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named toUpdatePacket Lnet/minecraft/block/entity/BeaconBlockEntity;toUpdatePacket()Lnet/minecraft/network/packet/s2c/play/BlockEntityUpdateS2CPacket;
      intermediary method_38236 Lnet/minecraft/class_2580;method_38236()Lnet/minecraft/class_2622;
      official c Ldpe;c()Lacp;
    • toInitialChunkDataNbt

      public NbtCompound toInitialChunkDataNbt(RegistryWrapper.WrapperLookup registryLookup)
      Returns the serialized state of this block entity that is observable by clients.

      This is sent alongside the initial chunk data, as well as when the block entity implements toUpdatePacket() and decides to use the default BlockEntityUpdateS2CPacket.

      "Observable state" is a state that clients can observe without specific interaction. For example, CampfireBlockEntity's cooked items are observable states, but chests' inventories are not observable states, since the player must first open that chest before they can see the contents.

      To send all NBT data of this block entity saved to disk, return BlockEntity.createNbt(net.minecraft.registry.RegistryWrapper.WrapperLookup).

      Overrides:
      toInitialChunkDataNbt in class BlockEntity
      Returns:
      the serialized state of this block entity that is observable by clients
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named toInitialChunkDataNbt Lnet/minecraft/block/entity/BlockEntity;toInitialChunkDataNbt(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lnet/minecraft/nbt/NbtCompound;
      intermediary method_16887 Lnet/minecraft/class_2586;method_16887(Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_2487;
      official a Ldpj;a(Ljk$a;)Lus;
    • writeStatusEffect

      private static void writeStatusEffect(NbtCompound nbt, String key, @Nullable @Nullable RegistryEntry<StatusEffect> effect)
      Mappings:
      Namespace Name Mixin selector
      named writeStatusEffect Lnet/minecraft/block/entity/BeaconBlockEntity;writeStatusEffect(Lnet/minecraft/nbt/NbtCompound;Ljava/lang/String;Lnet/minecraft/registry/entry/RegistryEntry;)V
      intermediary method_53253 Lnet/minecraft/class_2580;method_53253(Lnet/minecraft/class_2487;Ljava/lang/String;Lnet/minecraft/class_6880;)V
      official a Ldpe;a(Lus;Ljava/lang/String;Lji;)V
    • readStatusEffect

      @Nullable private static @Nullable RegistryEntry<StatusEffect> readStatusEffect(NbtCompound nbt, String key)
      Mappings:
      Namespace Name Mixin selector
      named readStatusEffect Lnet/minecraft/block/entity/BeaconBlockEntity;readStatusEffect(Lnet/minecraft/nbt/NbtCompound;Ljava/lang/String;)Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_53252 Lnet/minecraft/class_2580;method_53252(Lnet/minecraft/class_2487;Ljava/lang/String;)Lnet/minecraft/class_6880;
      official a Ldpe;a(Lus;Ljava/lang/String;)Lji;
    • readNbt

      protected void readNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup)
      Reads data from nbt. Subclasses should override this if they store a persistent data.

      NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.

      nbt might not have all expected keys, or might have a key whose value does not meet the requirement (such as the type or the range). This method should fall back to a reasonable default value instead of throwing an exception.

      Overrides:
      readNbt in class BlockEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named readNbt Lnet/minecraft/block/entity/BlockEntity;readNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
      intermediary method_11014 Lnet/minecraft/class_2586;method_11014(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
      official a Ldpj;a(Lus;Ljk$a;)V
    • writeNbt

      protected void writeNbt(NbtCompound nbt, RegistryWrapper.WrapperLookup registryLookup)
      Writes data to nbt. Subclasses should override this if they store a persistent data.

      NBT is a storage format; therefore, a data from NBT is loaded to a block entity instance's fields, which are used for other operations instead of the NBT. The data is written back to NBT when saving the block entity.

      Overrides:
      writeNbt in class BlockEntity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named writeNbt Lnet/minecraft/block/entity/BlockEntity;writeNbt(Lnet/minecraft/nbt/NbtCompound;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)V
      intermediary method_11007 Lnet/minecraft/class_2586;method_11007(Lnet/minecraft/class_2487;Lnet/minecraft/class_7225$class_7874;)V
      official b Ldpj;b(Lus;Ljk$a;)V
    • setCustomName

      public void setCustomName(@Nullable @Nullable Text customName)
      Mappings:
      Namespace Name Mixin selector
      named setCustomName Lnet/minecraft/block/entity/BeaconBlockEntity;setCustomName(Lnet/minecraft/text/Text;)V
      intermediary method_10936 Lnet/minecraft/class_2580;method_10936(Lnet/minecraft/class_2561;)V
      official a Ldpe;a(Lxp;)V
    • getCustomName

      @Nullable public @Nullable Text getCustomName()
      Returns the custom name of this object, or null if there is none.
      Specified by:
      getCustomName in interface Nameable
      Returns:
      the custom name of this object, or null if there is none
      Mappings:
      Namespace Name Mixin selector
      named getCustomName Lnet/minecraft/util/Nameable;getCustomName()Lnet/minecraft/text/Text;
      intermediary method_5797 Lnet/minecraft/class_1275;method_5797()Lnet/minecraft/class_2561;
      official ah Lbrb;ah()Lxp;
    • createMenu

      @Nullable public @Nullable ScreenHandler createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player)
      Specified by:
      createMenu in interface ScreenHandlerFactory
      Mappings:
      Namespace Name Mixin selector
      named createMenu Lnet/minecraft/screen/ScreenHandlerFactory;createMenu(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/screen/ScreenHandler;
      intermediary createMenu Lnet/minecraft/class_1270;createMenu(ILnet/minecraft/class_1661;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1703;
      official createMenu Lcrc;createMenu(ILcmy;Lcmz;)Lcpw;
    • getDisplayName

      public Text getDisplayName()
      Returns the title of this screen handler; will be a part of the open screen packet sent to the client.
      Specified by:
      getDisplayName in interface Nameable
      Specified by:
      getDisplayName in interface NamedScreenHandlerFactory
      Returns:
      the display name of this object
      Mappings:
      Namespace Name Mixin selector
      named getDisplayName Lnet/minecraft/screen/NamedScreenHandlerFactory;getDisplayName()Lnet/minecraft/text/Text;
      intermediary method_5476 Lnet/minecraft/class_3908;method_5476()Lnet/minecraft/class_2561;
      official O_ Lbra;O_()Lxp;
    • getName

      public Text getName()
      Returns the name of this object.

      This should return the custom name if it exists, otherwise the default name. This should not have styling applied.

      Specified by:
      getName in interface Nameable
      Returns:
      the name of this object
      Mappings:
      Namespace Name Mixin selector
      named getName Lnet/minecraft/util/Nameable;getName()Lnet/minecraft/text/Text;
      intermediary method_5477 Lnet/minecraft/class_1275;method_5477()Lnet/minecraft/class_2561;
      official af Lbrb;af()Lxp;
    • readComponents

      protected void readComponents(BlockEntity.ComponentsAccess components)
      Overrides:
      readComponents in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      named readComponents Lnet/minecraft/block/entity/BlockEntity;readComponents(Lnet/minecraft/block/entity/BlockEntity$ComponentsAccess;)V
      intermediary method_57568 Lnet/minecraft/class_2586;method_57568(Lnet/minecraft/class_2586$class_9473;)V
      official a Ldpj;a(Ldpj$b;)V
    • addComponents

      protected void addComponents(ComponentMap.Builder componentMapBuilder)
      Overrides:
      addComponents in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      named addComponents Lnet/minecraft/block/entity/BlockEntity;addComponents(Lnet/minecraft/component/ComponentMap$Builder;)V
      intermediary method_57567 Lnet/minecraft/class_2586;method_57567(Lnet/minecraft/class_9323$class_9324;)V
      official a Ldpj;a(Lki$a;)V
    • removeFromCopiedStackNbt

      public void removeFromCopiedStackNbt(NbtCompound nbt)
      Overrides:
      removeFromCopiedStackNbt in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      named removeFromCopiedStackNbt Lnet/minecraft/block/entity/BlockEntity;removeFromCopiedStackNbt(Lnet/minecraft/nbt/NbtCompound;)V
      intermediary method_57569 Lnet/minecraft/class_2586;method_57569(Lnet/minecraft/class_2487;)V
      official a Ldpj;a(Lus;)V
    • setWorld

      public void setWorld(World world)
      Sets the world the block entity belongs to.

      This should not be called manually; however, this can be overridden to initialize fields dependent on the world.

      Overrides:
      setWorld in class BlockEntity
      Mappings:
      Namespace Name Mixin selector
      named setWorld Lnet/minecraft/block/entity/BlockEntity;setWorld(Lnet/minecraft/world/World;)V
      intermediary method_31662 Lnet/minecraft/class_2586;method_31662(Lnet/minecraft/class_1937;)V
      official a Ldpj;a(Ldca;)V