3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-20 21:40:06 +01:00
Paper/nms-patches/Containers.patch

32 Zeilen
1.5 KiB
Diff

2019-04-23 04:00:00 +02:00
--- a/net/minecraft/server/Containers.java
+++ b/net/minecraft/server/Containers.java
@@ -19,7 +19,7 @@
public static final Containers<ContainerGrindstone> GRINDSTONE = a("grindstone", ContainerGrindstone::new);
public static final Containers<ContainerHopper> HOPPER = a("hopper", ContainerHopper::new);
public static final Containers<ContainerLectern> LECTERN = a("lectern", (i, playerinventory) -> {
- return new ContainerLectern(i);
+ return new ContainerLectern(i, playerinventory); // CraftBukkit
});
public static final Containers<ContainerLoom> LOOM = a("loom", ContainerLoom::new);
public static final Containers<ContainerMerchant> MERCHANT = a("merchant", ContainerMerchant::new);
@@ -30,12 +30,17 @@
private final Containers.Supplier<T> x;
private static <T extends Container> Containers<T> a(String s, Containers.Supplier<T> 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<T> containers_supplier) {
this.x = containers_supplier;
}
- interface Supplier<T extends Container> {}
+ // CraftBukkit start
+ interface Supplier<T extends Container> {
+
+ T supply(int id, PlayerInventory playerinventory);
+ }
+ // CraftBukkit end
}