Update to Minecraft 1.17

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-06-11 15:00:00 +10:00
parent 75faba7fde
commit b3a8254758
619 changed files with 10708 additions and 8451 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/world/inventory/Containers.java
+++ b/net/minecraft/world/inventory/Containers.java
@@ -2,6 +2,10 @@
@@ -3,6 +3,10 @@
import net.minecraft.core.IRegistry;
import net.minecraft.world.entity.player.PlayerInventory;
+// CraftBukkit start
+import net.minecraft.world.entity.player.PlayerInventory;
@@ -10,8 +10,8 @@
+
public class Containers<T extends Container> {
public static final Containers<ContainerChest> GENERIC_9X1 = a("generic_9x1", ContainerChest::a);
@@ -21,7 +25,7 @@
public static final Containers<ContainerChest> GENERIC_9x1 = a("generic_9x1", ContainerChest::a);
@@ -22,7 +26,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) -> {
@@ -20,8 +20,8 @@
});
public static final Containers<ContainerLoom> LOOM = a("loom", ContainerLoom::new);
public static final Containers<ContainerMerchant> MERCHANT = a("merchant", ContainerMerchant::new);
@@ -33,12 +37,17 @@
private final Containers.Supplier<T> y;
@@ -34,7 +38,7 @@
private final Containers.Supplier<T> constructor;
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)));
@@ -29,14 +29,3 @@
}
private Containers(Containers.Supplier<T> containers_supplier) {
this.y = containers_supplier;
}
- interface Supplier<T extends Container> {}
+ // CraftBukkit start
+ interface Supplier<T extends Container> {
+
+ T supply(int id, PlayerInventory playerinventory);
+ }
+ // CraftBukkit end
}