openContainer

abstract void openContainer(Identifier identifier, ServerPlayerEntity player, Consumer<PacketByteBuf> writer)

Open a modded container.

Parameters

identifier

the identifier that was used when registering the container

player

the player that should open the container

writer

a PacketByteBuf where data can be written to, this data is then accessible by the container factory when creating the container or the gui

abstract void openContainer(Identifier identifier, PlayerEntity player, Consumer<PacketByteBuf> writer)

Open a modded container. This should be called on the server side - it has no effect on the client side.

Parameters

identifier

the identifier that was used when registering the container

player

the player that should open the container

writer

a PacketByteBuf where data can be written to, this data is then accessible by the container factory when creating the container or the gui