Interaction

public final class Interaction(source)

Interaction representation with a block entity or entity.

Parameters

container

The identifier of the interacted container. Same as in the /summon or /setblock commands

texture

The texture to be replaced.

screen

The active GUI screen

data

The details of the interaction

Constructors

Link copied to clipboard
public Interaction Interaction(Identifier container, Identifier texture, Screen screen, Interaction.Data data)

Types

Link copied to clipboard
public final class Data

Details about an interaction.

Properties

Link copied to clipboard
private final Identifier container
Link copied to clipboard
private final Interaction.Data data
Link copied to clipboard
private final Screen screen
Link copied to clipboard
private final Identifier texture

Functions

Link copied to clipboard
public final Identifier getContainer()
Link copied to clipboard
public final Interaction.Data getData()
Link copied to clipboard
public final Screen getScreen()
Link copied to clipboard
public final Identifier getTexture()
Link copied to clipboard
public final static Boolean prepare(Identifier container, PlayerEntity player, World world, Hand hand, HitResult hitResult, Object extra)
public final static Boolean prepare(Identifier container, PlayerEntity player, World world, Hand hand, HitResult hitResult, Object extra, BlockEntity blockEntity)
public final static Boolean prepare(Identifier container, PlayerEntity player, World world, Hand hand, HitResult hitResult, Object extra, Entity entity)

Prepares OptiGUI texture replacer for an interaction. Must be called before a Screen is opened. If called multiple times before a Screen is opened, the last call takes effect.