Class RenderInstruction.GameRenderer

java.lang.Object
xyz.gmitch215.socketmc.instruction.RenderInstruction
xyz.gmitch215.socketmc.instruction.RenderInstruction.GameRenderer
All Implemented Interfaces:
Serializable, DataHolder
Enclosing class:
RenderInstruction

public static final class RenderInstruction.GameRenderer extends RenderInstruction
Represents instructions for the Game Renderer.
See Also:
  • Field Details

  • Method Details

    • transformItemInHand

      public void transformItemInHand(@NotNull @NotNull Matrix4f matrix, @NotNull @NotNull Duration duration) throws IllegalArgumentException
      Modifies the rendering procedure for the item in the player's hand.
      Parameters:
      matrix - The transformation matrix for the item
      duration - The duration of the transformation
      Throws:
      IllegalArgumentException - if matrix is null, or the duration is null/negative
    • transformItemInHand

      public void transformItemInHand(@NotNull @NotNull Matrix4f matrix, long millis) throws IllegalArgumentException
      Modifies the rendering procedure for the item in the player's hand.
      Parameters:
      matrix - The transformation matrix for the item
      millis - The duration of the transformation, in milliseconds
      Throws:
      IllegalArgumentException - if matrix is null, or the duration is negative
    • renderConfusionEffect

      public void renderConfusionEffect(float strength) throws IllegalArgumentException
      Renders the confusion effect. Used when the player has the nausea effect.
      Parameters:
      strength - The strength of the effect, between 0 and 1
      Throws:
      IllegalArgumentException - if the strength is not between 0 and 1
    • renderItemActivation

      public void renderItemActivation(@NotNull @NotNull NBTTag item) throws IllegalArgumentException
      Renders the item activation effect. Used when the player activates a Totem of Undying.
      Parameters:
      item - The item that is being activated
      Throws:
      IllegalArgumentException - if the item is null
    • renderItemActivation

      public void renderItemActivation(@NotNull @NotNull NBTTag item, float offsetX, float offsetY) throws IllegalArgumentException
      Renders the item activation effect. Used when the player activates a Totem of Undying.
      Parameters:
      item - The item that is being activated
      offsetX - The final offsetX the item should glide to
      offsetY - The final offsetY the item should glide to
      Throws:
      IllegalArgumentException - if the item is null