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,35 +1,26 @@
--- a/net/minecraft/world/item/crafting/RecipeItemStack.java
+++ b/net/minecraft/world/item/crafting/RecipeItemStack.java
@@ -35,6 +35,7 @@
private final RecipeItemStack.Provider[] values;
@@ -37,6 +37,7 @@
public ItemStack[] itemStacks;
@Nullable
private IntList stackingIds;
+ public boolean exact; // CraftBukkit
public RecipeItemStack(Stream<? extends RecipeItemStack.Provider> stream) {
this.values = (RecipeItemStack.Provider[]) stream.toArray((i) -> {
@@ -72,6 +73,15 @@
@@ -74,6 +75,15 @@
for (int j = 0; j < i; ++j) {
ItemStack itemstack1 = aitemstack[j];
+ // CraftBukkit start
+ if (exact) {
+ if (itemstack1.getItem() == itemstack.getItem() && ItemStack.equals(itemstack, itemstack1)) {
+ if (itemstack1.getItem() == itemstack.getItem() && ItemStack.tagMatches(itemstack, itemstack1)) {
+ return true;
+ }
+
+ continue;
+ }
+ // CraftBukkit end
if (itemstack1.a(itemstack.getItem())) {
if (itemstack1.is(itemstack.getItem())) {
return true;
}
@@ -103,7 +113,7 @@
public void a(PacketDataSerializer packetdataserializer) {
this.buildChoices();
- packetdataserializer.a((Collection) Arrays.asList(this.itemStacks), PacketDataSerializer::a);
+ packetdataserializer.a(Arrays.asList(this.itemStacks), PacketDataSerializer::a); // CraftBukkit - decompile error
}
public JsonElement c() {