Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/nms-patches/Containers.patch
2019-04-23 12:00:00 +10:00

32 Zeilen
1.5 KiB
Diff

--- 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
}