Class PaintingEntity

All Implemented Interfaces:
ComponentsAccess, DataTracked, ScoreHolder, Nameable, EntityLike, UniquelyIdentifiable

public class PaintingEntity extends AbstractDecorationEntity
Mappings:
Namespace Name
named net/minecraft/entity/decoration/painting/PaintingEntity
intermediary net/minecraft/class_1534
official cqu
  • Field Details

    • VARIANT

      private static final TrackedData<RegistryEntry<PaintingVariant>> VARIANT
      Mappings:
      Namespace Name Mixin selector
      named VARIANT Lnet/minecraft/entity/decoration/painting/PaintingEntity;VARIANT:Lnet/minecraft/entity/data/TrackedData;
      intermediary field_38941 Lnet/minecraft/class_1534;field_38941:Lnet/minecraft/class_2940;
      official d Lcqu;d:Lalh;
    • field_51595

      public static final float field_51595
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_51595 Lnet/minecraft/entity/decoration/painting/PaintingEntity;field_51595:F
      intermediary field_51595 Lnet/minecraft/class_1534;field_51595:F
      official c Lcqu;c:F
  • Constructor Details

    • PaintingEntity

      public PaintingEntity(EntityType<? extends PaintingEntity> type, World world)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V
      intermediary <init> Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)V
      official <init> Lbzm;<init>(Lbzv;Ldmu;)V
    • PaintingEntity

      private PaintingEntity(World world, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/decoration/painting/PaintingEntity;<init>(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)V
      intermediary <init> Lnet/minecraft/class_1534;<init>(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)V
      official <init> Lcqu;<init>(Ldmu;Ljb;)V
    • PaintingEntity

      public PaintingEntity(World world, BlockPos pos, Direction direction, RegistryEntry<PaintingVariant> variant)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/decoration/painting/PaintingEntity;<init>(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/registry/entry/RegistryEntry;)V
      intermediary <init> Lnet/minecraft/class_1534;<init>(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;Lnet/minecraft/class_6880;)V
      official <init> Lcqu;<init>(Ldmu;Ljb;Ljh;Ljl;)V
  • Method Details

    • initDataTracker

      protected void initDataTracker(DataTracker.Builder builder)
      Initializes data tracker.
      Overrides:
      initDataTracker in class AbstractDecorationEntity
      API Note:
      Subclasses should override this and add to the builder any data that needs to be tracked.
      Mappings:
      Namespace Name Mixin selector
      named initDataTracker Lnet/minecraft/entity/Entity;initDataTracker(Lnet/minecraft/entity/data/DataTracker$Builder;)V
      intermediary method_5693 Lnet/minecraft/class_1297;method_5693(Lnet/minecraft/class_2945$class_9222;)V
      official a Lbzm;a(Lall$a;)V
    • onTrackedDataSet

      public void onTrackedDataSet(TrackedData<?> data)
      Called on the client when the tracked data is set.

      This can be overridden to refresh other fields when the tracked data is set or changed.

      Specified by:
      onTrackedDataSet in interface DataTracked
      Overrides:
      onTrackedDataSet in class AbstractDecorationEntity
      Mappings:
      Namespace Name Mixin selector
      named onTrackedDataSet Lnet/minecraft/entity/data/DataTracked;onTrackedDataSet(Lnet/minecraft/entity/data/TrackedData;)V
      intermediary method_5674 Lnet/minecraft/class_9221;method_5674(Lnet/minecraft/class_2940;)V
      official a Lalk;a(Lalh;)V
    • setVariant

      private void setVariant(RegistryEntry<PaintingVariant> variant)
      Mappings:
      Namespace Name Mixin selector
      named setVariant Lnet/minecraft/entity/decoration/painting/PaintingEntity;setVariant(Lnet/minecraft/registry/entry/RegistryEntry;)V
      intermediary method_43402 Lnet/minecraft/class_1534;method_43402(Lnet/minecraft/class_6880;)V
      official a Lcqu;a(Ljl;)V
    • getVariant

      public RegistryEntry<PaintingVariant> getVariant()
      Mappings:
      Namespace Name Mixin selector
      named getVariant Lnet/minecraft/entity/decoration/painting/PaintingEntity;getVariant()Lnet/minecraft/registry/entry/RegistryEntry;
      intermediary method_43404 Lnet/minecraft/class_1534;method_43404()Lnet/minecraft/class_6880;
      official l Lcqu;l()Ljl;
    • get

      @Nullable public <T> T get(ComponentType<? extends T> type)
      Specified by:
      get in interface ComponentsAccess
      Overrides:
      get in class Entity
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/component/ComponentsAccess;get(Lnet/minecraft/component/ComponentType;)Ljava/lang/Object;
      intermediary method_58694 Lnet/minecraft/class_9473;method_58694(Lnet/minecraft/class_9331;)Ljava/lang/Object;
      official a Lkl;a(Lkp;)Ljava/lang/Object;
    • copyComponentsFrom

      protected void copyComponentsFrom(ComponentsAccess from)
      Overrides:
      copyComponentsFrom in class Entity
      Mappings:
      Namespace Name Mixin selector
      named copyComponentsFrom Lnet/minecraft/entity/Entity;copyComponentsFrom(Lnet/minecraft/component/ComponentsAccess;)V
      intermediary method_66649 Lnet/minecraft/class_1297;method_66649(Lnet/minecraft/class_9473;)V
      official a Lbzm;a(Lkl;)V
    • setApplicableComponent

      protected <T> boolean setApplicableComponent(ComponentType<T> type, T value)
      Overrides:
      setApplicableComponent in class Entity
      Mappings:
      Namespace Name Mixin selector
      named setApplicableComponent Lnet/minecraft/entity/Entity;setApplicableComponent(Lnet/minecraft/component/ComponentType;Ljava/lang/Object;)Z
      intermediary method_66654 Lnet/minecraft/class_1297;method_66654(Lnet/minecraft/class_9331;Ljava/lang/Object;)Z
      official b Lbzm;b(Lkp;Ljava/lang/Object;)Z
    • placePainting

      public static Optional<PaintingEntity> placePainting(World world, BlockPos pos, Direction facing)
      Mappings:
      Namespace Name Mixin selector
      named placePainting Lnet/minecraft/entity/decoration/painting/PaintingEntity;placePainting(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Ljava/util/Optional;
      intermediary method_43401 Lnet/minecraft/class_1534;method_43401(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)Ljava/util/Optional;
      official a Lcqu;a(Ldmu;Ljb;Ljh;)Ljava/util/Optional;
    • getSize

      private static int getSize(RegistryEntry<PaintingVariant> variant)
      Mappings:
      Namespace Name Mixin selector
      named getSize Lnet/minecraft/entity/decoration/painting/PaintingEntity;getSize(Lnet/minecraft/registry/entry/RegistryEntry;)I
      intermediary method_43403 Lnet/minecraft/class_1534;method_43403(Lnet/minecraft/class_6880;)I
      official b Lcqu;b(Ljl;)I
    • writeCustomData

      protected void writeCustomData(WriteView view)
      Overrides:
      writeCustomData in class BlockAttachedEntity
      Mappings:
      Namespace Name Mixin selector
      named writeCustomData Lnet/minecraft/entity/Entity;writeCustomData(Lnet/minecraft/storage/WriteView;)V
      intermediary method_5652 Lnet/minecraft/class_1297;method_5652(Lnet/minecraft/class_11372;)V
      official a Lbzm;a(Lfdc;)V
    • readCustomData

      protected void readCustomData(ReadView view)
      Overrides:
      readCustomData in class BlockAttachedEntity
      Mappings:
      Namespace Name Mixin selector
      named readCustomData Lnet/minecraft/entity/Entity;readCustomData(Lnet/minecraft/storage/ReadView;)V
      intermediary method_5749 Lnet/minecraft/class_1297;method_5749(Lnet/minecraft/class_11368;)V
      official a Lbzm;a(Lfda;)V
    • calculateBoundingBox

      protected Box calculateBoundingBox(BlockPos pos, Direction side)
      Specified by:
      calculateBoundingBox in class AbstractDecorationEntity
      Mappings:
      Namespace Name Mixin selector
      named calculateBoundingBox Lnet/minecraft/entity/decoration/AbstractDecorationEntity;calculateBoundingBox(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;)Lnet/minecraft/util/math/Box;
      intermediary method_59943 Lnet/minecraft/class_1530;method_59943(Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)Lnet/minecraft/class_238;
      official a Lcqr;a(Ljb;Ljh;)Lfin;
    • getOffset

      private double getOffset(int length)
      Mappings:
      Namespace Name Mixin selector
      named getOffset Lnet/minecraft/entity/decoration/painting/PaintingEntity;getOffset(I)D
      intermediary method_59946 Lnet/minecraft/class_1534;method_59946(I)D
      official b Lcqu;b(I)D
    • onBreak

      public void onBreak(ServerWorld world, @Nullable @Nullable Entity breaker)
      Specified by:
      onBreak in class BlockAttachedEntity
      Mappings:
      Namespace Name Mixin selector
      named onBreak Lnet/minecraft/entity/decoration/BlockAttachedEntity;onBreak(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/Entity;)V
      intermediary method_6889 Lnet/minecraft/class_9691;method_6889(Lnet/minecraft/class_3218;Lnet/minecraft/class_1297;)V
      official a Lcqp;a(Laub;Lbzm;)V
    • onPlace

      public void onPlace()
      Specified by:
      onPlace in class AbstractDecorationEntity
      Mappings:
      Namespace Name Mixin selector
      named onPlace Lnet/minecraft/entity/decoration/AbstractDecorationEntity;onPlace()V
      intermediary method_6894 Lnet/minecraft/class_1530;method_6894()V
      official u Lcqr;u()V
    • refreshPositionAndAngles

      public void refreshPositionAndAngles(double x, double y, double z, float yaw, float pitch)
      Sets the entity's position, yaw, and pitch, and refreshes several position-related fields.

      This should be used over other methods for setting positions of mobs.

      Overrides:
      refreshPositionAndAngles in class Entity
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named refreshPositionAndAngles Lnet/minecraft/entity/Entity;refreshPositionAndAngles(DDDFF)V
      intermediary method_5808 Lnet/minecraft/class_1297;method_5808(DDDFF)V
      official b Lbzm;b(DDDFF)V
    • getSyncedPos

      public Vec3d getSyncedPos()
      Returns the position of the entity synced to clients.

      This is the same as Entity.getPos() except for paintings which return the attachment position.

      Overrides:
      getSyncedPos in class Entity
      Returns:
      the position of the entity synced to clients
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getSyncedPos Lnet/minecraft/entity/Entity;getSyncedPos()Lnet/minecraft/util/math/Vec3d;
      intermediary method_43390 Lnet/minecraft/class_1297;method_43390()Lnet/minecraft/class_243;
      official dw Lbzm;dw()Lfis;
    • createSpawnPacket

      public Packet<ClientPlayPacketListener> createSpawnPacket(EntityTrackerEntry entityTrackerEntry)
      Returns a packet to notify the clients of the entity's spawning.
      Overrides:
      createSpawnPacket in class Entity
      Returns:
      a packet to notify the clients of the entity's spawning
      API Note:
      Subclasses should return new EntitySpawnS2CPacket(this), unless they use a custom spawning packet.
      Mappings:
      Namespace Name Mixin selector
      named createSpawnPacket Lnet/minecraft/entity/Entity;createSpawnPacket(Lnet/minecraft/server/network/EntityTrackerEntry;)Lnet/minecraft/network/packet/Packet;
      intermediary method_18002 Lnet/minecraft/class_1297;method_18002(Lnet/minecraft/class_3231;)Lnet/minecraft/class_2596;
      official a Lbzm;a(Latz;)Lzw;
    • onSpawnPacket

      public void onSpawnPacket(EntitySpawnS2CPacket packet)
      Called on the client when the entity receives a spawn packet.

      This sets the entity's position, angles, ID, and UUID. Subclasses can override this to initialize additional fields.

      Overrides:
      onSpawnPacket in class Entity
      Mappings:
      Namespace Name Mixin selector
      named onSpawnPacket Lnet/minecraft/entity/Entity;onSpawnPacket(Lnet/minecraft/network/packet/s2c/play/EntitySpawnS2CPacket;)V
      intermediary method_31471 Lnet/minecraft/class_1297;method_31471(Lnet/minecraft/class_2604;)V
      official a Lbzm;a(Lacr;)V
    • getPickBlockStack

      public ItemStack getPickBlockStack()
      Returns the stack for creative "pick block" functionality, or null if there is none.

      If the entity has an item representation (such as boats or minecarts), this should be overridden to return a new stack. Note that MobEntity handles the spawn eggs. ItemFrameEntity instead returns the copy of the stack held in the frame.

      Overrides:
      getPickBlockStack in class Entity
      Returns:
      the stack for creative "pick block" functionality, or null if there is none
      Mappings:
      Namespace Name Mixin selector
      named getPickBlockStack Lnet/minecraft/entity/Entity;getPickBlockStack()Lnet/minecraft/item/ItemStack;
      intermediary method_31480 Lnet/minecraft/class_1297;method_31480()Lnet/minecraft/class_1799;
      official dM Lbzm;dM()Ldcv;