@FunctionalInterface public interface ContainerFactory<T>
Modifier and Type | Method and Description |
---|---|
T |
create(int syncId,
net.minecraft.util.Identifier identifier,
net.minecraft.entity.player.PlayerEntity player,
net.minecraft.network.PacketByteBuf buf)
Creates the new object.
|
T create(int syncId, net.minecraft.util.Identifier identifier, net.minecraft.entity.player.PlayerEntity player, net.minecraft.network.PacketByteBuf buf)
syncId
- The container synchronization ID.identifier
- the Identifier is the name that was used when registering the factoryplayer
- the player that is opening the gui/containerbuf
- the buffer contains the same data that was provided with ContainerProviderRegistry.openContainer(net.minecraft.util.Identifier, net.minecraft.server.network.ServerPlayerEntity, java.util.function.Consumer<net.minecraft.network.PacketByteBuf>)