Class Display

All Implemented Interfaces:
DataComponentGetter, SyncedDataHolder, EntityAccess, UniquelyIdentifyable, Nameable, ScoreHolder, IAttachmentHolder, IEntityExtension
Direct Known Subclasses:
Display.BlockDisplay, Display.ItemDisplay, Display.TextDisplay

public abstract class Display extends Entity
  • Field Details

  • Constructor Details

  • Method Details

    • onSyncedDataUpdated

      public void onSyncedDataUpdated(EntityDataAccessor<?> key)
      Specified by:
      onSyncedDataUpdated in interface SyncedDataHolder
      Overrides:
      onSyncedDataUpdated in class Entity
    • hurtServer

      public final boolean hurtServer(ServerLevel level, DamageSource damageSource, float amount)
      Specified by:
      hurtServer in class Entity
    • createTransformation

      private static Transformation createTransformation(SynchedEntityData synchedEntityData)
    • tick

      public void tick()
      Overrides:
      tick in class Entity
    • getInterpolation

      public InterpolationHandler getInterpolation()
      Overrides:
      getInterpolation in class Entity
    • updateRenderSubState

      protected abstract void updateRenderSubState(boolean interpolate, float partialTick)
    • defineSynchedData

      protected void defineSynchedData(SynchedEntityData.Builder builder)
      Specified by:
      defineSynchedData in class Entity
    • readAdditionalSaveData

      protected void readAdditionalSaveData(ValueInput input)
      Specified by:
      readAdditionalSaveData in class Entity
    • setTransformation

      private void setTransformation(Transformation transformation)
    • addAdditionalSaveData

      protected void addAdditionalSaveData(ValueOutput output)
      Specified by:
      addAdditionalSaveData in class Entity
    • getBoundingBoxForCulling

      public AABB getBoundingBoxForCulling()
    • affectedByCulling

      public boolean affectedByCulling()
    • getPistonPushReaction

      public PushReaction getPistonPushReaction()
      Overrides:
      getPistonPushReaction in class Entity
    • isIgnoringBlockTriggers

      public boolean isIgnoringBlockTriggers()
      Overrides:
      isIgnoringBlockTriggers in class Entity
    • renderState

      @Nullable public Display.RenderState renderState()
    • setTransformationInterpolationDuration

      private void setTransformationInterpolationDuration(int transformationInterpolationDuration)
    • getTransformationInterpolationDuration

      private int getTransformationInterpolationDuration()
    • setTransformationInterpolationDelay

      private void setTransformationInterpolationDelay(int transformationInterpolationDelay)
    • getTransformationInterpolationDelay

      private int getTransformationInterpolationDelay()
    • setPosRotInterpolationDuration

      private void setPosRotInterpolationDuration(int posRotInterpolationDuration)
    • getPosRotInterpolationDuration

      private int getPosRotInterpolationDuration()
    • setBillboardConstraints

      private void setBillboardConstraints(Display.BillboardConstraints billboardConstraints)
    • getBillboardConstraints

      private Display.BillboardConstraints getBillboardConstraints()
    • setBrightnessOverride

      private void setBrightnessOverride(@Nullable Brightness brightnessOverride)
    • getBrightnessOverride

      @Nullable private Brightness getBrightnessOverride()
    • getPackedBrightnessOverride

      private int getPackedBrightnessOverride()
    • setViewRange

      private void setViewRange(float viewRange)
    • getViewRange

      private float getViewRange()
    • setShadowRadius

      private void setShadowRadius(float shadowRadius)
    • getShadowRadius

      private float getShadowRadius()
    • setShadowStrength

      private void setShadowStrength(float shadowStrength)
    • getShadowStrength

      private float getShadowStrength()
    • setWidth

      private void setWidth(float width)
    • getWidth

      private float getWidth()
    • setHeight

      private void setHeight(float height)
    • getGlowColorOverride

      private int getGlowColorOverride()
    • setGlowColorOverride

      private void setGlowColorOverride(int glowColorOverride)
    • calculateInterpolationProgress

      public float calculateInterpolationProgress(float partialTick)
    • getHeight

      private float getHeight()
    • setPos

      public void setPos(double x, double y, double z)
      Sets the x,y,z of the entity from the given parameters. Also seems to set up a bounding box.
      Overrides:
      setPos in class Entity
    • updateCulling

      private void updateCulling()
    • shouldRenderAtSqrDistance

      public boolean shouldRenderAtSqrDistance(double distance)
      Checks if the entity is in range to render.
      Overrides:
      shouldRenderAtSqrDistance in class Entity
    • getTeamColor

      public int getTeamColor()
      Overrides:
      getTeamColor in class Entity
    • createFreshRenderState

      private Display.RenderState createFreshRenderState()
    • createInterpolatedRenderState

      private Display.RenderState createInterpolatedRenderState(Display.RenderState renderState, float partialTick)