--- a/net/minecraft/world/inventory/Containers.java +++ b/net/minecraft/world/inventory/Containers.java @@ -2,6 +2,10 @@ import net.minecraft.core.IRegistry; +// CraftBukkit start +import net.minecraft.world.entity.player.PlayerInventory; +// CraftBukkit end + public class Containers { public static final Containers GENERIC_9X1 = a("generic_9x1", ContainerChest::a); @@ -21,7 +25,7 @@ public static final Containers GRINDSTONE = a("grindstone", ContainerGrindstone::new); public static final Containers HOPPER = a("hopper", ContainerHopper::new); public static final Containers LECTERN = a("lectern", (i, playerinventory) -> { - return new ContainerLectern(i); + return new ContainerLectern(i, playerinventory); // CraftBukkit }); public static final Containers LOOM = a("loom", ContainerLoom::new); public static final Containers MERCHANT = a("merchant", ContainerMerchant::new); @@ -33,12 +37,17 @@ private final Containers.Supplier y; private static Containers a(String s, Containers.Supplier containers_supplier) { - return (Containers) IRegistry.a(IRegistry.MENU, s, (Object) (new Containers<>(containers_supplier))); + return (Containers) IRegistry.a(IRegistry.MENU, s, (new Containers<>(containers_supplier))); // CraftBukkit - decompile error } private Containers(Containers.Supplier containers_supplier) { this.y = containers_supplier; } - interface Supplier {} + // CraftBukkit start + interface Supplier { + + T supply(int id, PlayerInventory playerinventory); + } + // CraftBukkit end }