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
Represents instructions for the Game Renderer.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class xyz.gmitch215.socketmc.instruction.RenderInstruction
RenderInstruction.DebugRenderer, RenderInstruction.GameRenderer
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The ordinal for aRenderInstruction.GameRenderer
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
renderConfusionEffect
(float strength) Renders the confusion effect.void
Renders the item activation effect.void
renderItemActivation
(@NotNull NBTTag item, float offsetX, float offsetY) Renders the item activation effect.void
transformItemInHand
(@NotNull Matrix4f matrix, long millis) Modifies the rendering procedure for the item in the player's hand.void
transformItemInHand
(@NotNull Matrix4f matrix, @NotNull Duration duration) Modifies the rendering procedure for the item in the player's hand.Methods inherited from class xyz.gmitch215.socketmc.instruction.RenderInstruction
debug, game, getData, getOrdinal, getSubOrdinal, isFilled
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface xyz.gmitch215.socketmc.util.DataHolder
data, data, data, data
-
Field Details
-
ORDINAL
public static final int ORDINALThe ordinal for aRenderInstruction.GameRenderer
.- See Also:
-
-
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 itemduration
- 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 itemmillis
- The duration of the transformation, in milliseconds- Throws:
IllegalArgumentException
- if matrix is null, or the duration is negative
-
renderConfusionEffect
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
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 activatedoffsetX
- The final offsetX the item should glide tooffsetY
- The final offsetY the item should glide to- Throws:
IllegalArgumentException
- if the item is null
-