interact
public abstract boolean interact(@NotNull() @NotNull() Identifier container, @NotNull() @NotNull() PlayerEntity player, @NotNull() @NotNull() World world, @NotNull() @NotNull() Hand hand, @NotNull() @NotNull() IInteractionTarget target, @Nullable() @Nullable() HitResult hitResult)(source)
Signals the texture replacer that an interaction has begun. Should be called before opening a GUI.
Return
true
if the parameters are valid, and a GUI is not open, otherwise false
Parameters
container
The identifier of the container. Same as in the /summon
or /setblock
commands
player
The interacting player
world
The world the interaction happens in. Must be client-side
hand
The hand of the player that triggered the interaction
target
The target the player is interacting with
hitResult
The hit result from Minecraft