Update to Minecraft 1.18-pre5

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-11-22 09:00:00 +11:00
parent a852b81a69
commit 43702a9e10
700 changed files with 10286 additions and 10098 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/world/inventory/ContainerLoom.java
+++ b/net/minecraft/world/inventory/ContainerLoom.java
@@ -16,8 +16,30 @@
import net.minecraft.world.level.block.Blocks;
@@ -18,8 +18,30 @@
import net.minecraft.world.level.block.entity.EnumBannerPatternType;
import net.minecraft.world.level.block.entity.TileEntityTypes;
+// CraftBukkit start
+import org.bukkit.Location;
@@ -31,8 +31,8 @@
private static final int INV_SLOT_START = 4;
private static final int INV_SLOT_END = 31;
private static final int USE_ROW_SLOT_START = 31;
@@ -49,6 +71,13 @@
ContainerLoom.this.a((IInventory) this);
@@ -51,6 +73,13 @@
ContainerLoom.this.slotsChanged(this);
ContainerLoom.this.slotUpdateListener.run();
}
+
@@ -45,8 +45,8 @@
};
this.outputContainer = new InventorySubcontainer(1) {
@Override
@@ -56,6 +85,13 @@
super.update();
@@ -58,6 +87,13 @@
super.setChanged();
ContainerLoom.this.slotUpdateListener.run();
}
+
@@ -58,26 +58,26 @@
+ // CraftBukkit end
};
this.access = containeraccess;
this.bannerSlot = this.a(new Slot(this.inputContainer, 0, 13, 26) {
@@ -116,6 +152,7 @@
this.bannerSlot = this.addSlot(new Slot(this.inputContainer, 0, 13, 26) {
@@ -118,6 +154,7 @@
}
this.a(this.selectedBannerPatternIndex);
this.addDataSlot(this.selectedBannerPatternIndex);
+ player = (Player) playerinventory.player.getBukkitEntity(); // CraftBukkit
}
public int l() {
@@ -124,6 +161,7 @@
public int getSelectedBannerPatternIndex() {
@@ -126,6 +163,7 @@
@Override
public boolean canUse(EntityHuman entityhuman) {
public boolean stillValid(EntityHuman entityhuman) {
+ if (!this.checkReachable) return true; // CraftBukkit
return a(this.access, entityhuman, Blocks.LOOM);
return stillValid(this.access, entityhuman, Blocks.LOOM);
}
@@ -246,6 +284,11 @@
@@ -248,6 +286,11 @@
if (nbttagcompound.hasKeyOfType("Patterns", 9)) {
if (nbttagcompound != null && nbttagcompound.contains("Patterns", 9)) {
nbttaglist = nbttagcompound.getList("Patterns", 10);
+ // CraftBukkit start
+ while (nbttaglist.size() > 20) {
@@ -86,4 +86,4 @@
+ // CraftBukkit end
} else {
nbttaglist = new NBTTagList();
nbttagcompound.set("Patterns", nbttaglist);
if (nbttagcompound == null) {