Class GuiEntityRenderer

All Implemented Interfaces:
BackgroundRender, ElementEvents, GuiParent<GuiEntityRenderer>, TooltipHandler<GuiEntityRenderer>

public class GuiEntityRenderer extends GuiElement<GuiEntityRenderer> implements BackgroundRender
Created by brandon3055 on 15/11/2023
  • Field Details

    • LOGGER

      public static final org.apache.logging.log4j.Logger LOGGER
    • force2dSize

      public boolean force2dSize
  • Constructor Details

    • GuiEntityRenderer

      public GuiEntityRenderer(@NotNull @NotNull GuiParent<?> parent)
  • Method Details

    • setEntity

      public GuiEntityRenderer setEntity(net.minecraft.world.entity.Entity entity)
    • setEntity

      public GuiEntityRenderer setEntity(net.minecraft.resources.ResourceLocation entity)
    • setRotationSpeed

      public GuiEntityRenderer setRotationSpeed(float rotationSpeed)
    • setRotationSpeed

      public GuiEntityRenderer setRotationSpeed(Supplier<Float> rotationSpeed)
    • getRotationSpeed

      public float getRotationSpeed()
    • setLockedRotation

      public GuiEntityRenderer setLockedRotation(float lockedRotation)
    • setLockedRotation

      public GuiEntityRenderer setLockedRotation(Supplier<Float> lockedRotation)
    • getLockedRotation

      public float getLockedRotation()
    • setRotationLocked

      public GuiEntityRenderer setRotationLocked(boolean rotationLocked)
    • setRotationLocked

      public GuiEntityRenderer setRotationLocked(Supplier<Boolean> rotationLocked)
    • isRotationLocked

      public boolean isRotationLocked()
    • setTrackMouse

      public GuiEntityRenderer setTrackMouse(boolean trackMouse)
    • setTrackMouse

      public GuiEntityRenderer setTrackMouse(Supplier<Boolean> trackMouse)
    • isTrackMouse

      public boolean isTrackMouse()
    • setDrawName

      public GuiEntityRenderer setDrawName(boolean drawName)
    • setDrawName

      public GuiEntityRenderer setDrawName(Supplier<Boolean> drawName)
    • isDrawName

      public boolean isDrawName()
    • setForce2dSize

      public GuiEntityRenderer setForce2dSize(boolean force2dSize)
    • getBackgroundDepth

      public double getBackgroundDepth()
      Description copied from interface: BackgroundRender
      Specifies the z depth of the background content. After BackgroundRender.renderBackground(GuiRender, double, double, float) is called, the PoseStack will be translated by this amount in the z direction before any assigned child elements are rendered. Recommended minimum depth is 0.01 or 0.035 if this element renders text. (text shadows are rendered with a 0.03 offset)
      Specified by:
      getBackgroundDepth in interface BackgroundRender
      Returns:
      the z height of the background content.
    • renderBackground

      public void renderBackground(GuiRender render, double mouseX, double mouseY, float partialTicks)
      Description copied from interface: BackgroundRender
      Used to render content behind this elements child elements. When rendering element content, always use the PoseStack available via the provided GuiRender Where applicable, always use push/pop to ensure the stack is returned to its original state after your rendering is complete.
      Specified by:
      renderBackground in interface BackgroundRender
      Parameters:
      render - Contains gui context information as well as essential render methods/utils including the PoseStack.
    • renderEntityInInventoryFollowsMouse

      public static void renderEntityInInventoryFollowsMouse(GuiRender render, double pX, double pY, double pScale, float offsetX, float offsetY, net.minecraft.world.entity.LivingEntity pEntity)
    • renderEntityInInventoryFollowsMouse

      public static void renderEntityInInventoryFollowsMouse(GuiRender render, double pX, double pY, double pScale, boolean flat, float offsetX, float offsetY, net.minecraft.world.entity.LivingEntity pEntity)
    • renderEntityInInventoryFollowsAngle

      public static void renderEntityInInventoryFollowsAngle(GuiRender render, double pX, double pY, double pScale, float angleX, float angleY, net.minecraft.world.entity.LivingEntity pEntity)
    • renderEntityInInventoryFollowsAngle

      public static void renderEntityInInventoryFollowsAngle(GuiRender render, double pX, double pY, double pScale, boolean flat, float angleX, float angleY, net.minecraft.world.entity.LivingEntity pEntity)
    • renderEntityInInventoryWithRotation

      public static void renderEntityInInventoryWithRotation(GuiRender render, double xPos, double yPos, double scale, double rotation, net.minecraft.world.entity.LivingEntity living)
    • renderEntityInInventoryWithRotation

      public static void renderEntityInInventoryWithRotation(GuiRender render, double xPos, double yPos, double scale, boolean flat, double rotation, net.minecraft.world.entity.LivingEntity living)
    • renderEntityInInventory

      public static void renderEntityInInventory(GuiRender render, double pX, double pY, double pScale, org.joml.Quaternionf quat, @Nullable @Nullable org.joml.Quaternionf pCameraOrientation, net.minecraft.world.entity.Entity pEntity)
    • renderEntityInInventory

      public static void renderEntityInInventory(GuiRender render, double pX, double pY, double pScale, boolean flat, org.joml.Quaternionf quat, @Nullable @Nullable org.joml.Quaternionf pCameraOrientation, net.minecraft.world.entity.Entity pEntity)