Add IContainerFactory for reading custom container data on the client

This commit is contained in:
tterrag committed 2019-06-10 18:14:49 -04:00
1 parent 5dc944c1c3
commit d5ee80a70a
6 files changed
+117 -9

No files matched your search

@@ -0,0 +1,16 @@
package net.minecraftforge.common.extensions;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.network.PacketBuffer;
public interface IForgeContainerType<T>
{
static <T extends Container> ContainerType<T> create(net.minecraftforge.fml.network.IContainerFactory<T> factory)
{
return new ContainerType<>(factory);
}
T create(int windowId, PlayerInventory playerInv, PacketBuffer extraData);
}