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,6 +1,6 @@
--- a/net/minecraft/world/inventory/ContainerCartography.java
+++ b/net/minecraft/world/inventory/ContainerCartography.java
@@ -13,8 +13,30 @@
@@ -12,8 +12,30 @@
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.saveddata.maps.WorldMap;
@@ -23,15 +23,15 @@
+ return bukkitEntity;
+ }
+
+ CraftInventoryCartography inventory = new CraftInventoryCartography(this.inventory, this.resultInventory);
+ CraftInventoryCartography inventory = new CraftInventoryCartography(this.container, this.resultContainer);
+ bukkitEntity = new CraftInventoryView(this.player, inventory, this);
+ return bukkitEntity;
+ }
+ // CraftBukkit end
private final ContainerAccess containerAccess;
private long e;
public final IInventory inventory;
@@ -32,6 +54,13 @@
public static final int MAP_SLOT = 0;
public static final int ADDITIONAL_SLOT = 1;
public static final int RESULT_SLOT = 2;
@@ -38,6 +60,13 @@
ContainerCartography.this.a((IInventory) this);
super.update();
}
@@ -43,9 +43,9 @@
+ }
+ // CraftBukkit end
};
this.resultInventory = new InventoryCraftResult() {
this.resultContainer = new InventoryCraftResult() {
@Override
@@ -39,6 +68,13 @@
@@ -45,6 +74,13 @@
ContainerCartography.this.a((IInventory) this);
super.update();
}
@@ -57,9 +57,9 @@
+ }
+ // CraftBukkit end
};
this.containerAccess = containeraccess;
this.a(new Slot(this.inventory, 0, 15, 15) {
@@ -91,10 +127,12 @@
this.access = containeraccess;
this.a(new Slot(this.container, 0, 15, 15) {
@@ -95,10 +131,12 @@
this.a(new Slot(playerinventory, j, 8 + j * 18, 142));
}
@@ -69,6 +69,6 @@
@Override
public boolean canUse(EntityHuman entityhuman) {
+ if (!this.checkReachable) return true; // CraftBukkit
return a(this.containerAccess, entityhuman, Blocks.CARTOGRAPHY_TABLE);
return a(this.access, entityhuman, Blocks.CARTOGRAPHY_TABLE);
}