Paper/nms-patches/Containers.patch

32 lines
1.5 KiB
Diff
Raw Normal View History

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);
2020-06-25 02:00:00 +02:00
@@ -31,12 +31,17 @@
private final Containers.Supplier<T> y;
2019-04-23 04:00:00 +02:00
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) {
2020-06-25 02:00:00 +02:00
this.y = containers_supplier;
2019-04-23 04:00:00 +02:00
}
- interface Supplier<T extends Container> {}
+ // CraftBukkit start
+ interface Supplier<T extends Container> {
+
+ T supply(int id, PlayerInventory playerinventory);
+ }
+ // CraftBukkit end
}