Updated Upstream (Bukkit/CraftBukkit)

Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
92f24ff2 SPIGOT-5158: Add SuspiciousStewMeta
b9bf4dae SPIGOT-5310: Add Chunk.contains
b2adbb45 Add API to get/set inhabited time of a Chunk
e3c812dd SPIGOT-5250: Add ChunkSnapshot.contains
71973d85 SPIGOT-5255: Raid / patrol spawn reasons

CraftBukkit Changes:
03b145b3 SPIGOT-5158: Add SuspiciousStewMeta
9aa74304 SPIGOT-5310: Add Chunk.contains
7ef2b20d SPIGOT-3308: RecipeIterator cannot longer remove recipes
023f438c Add API to get/set inhabited time of a Chunk
b79a86ed SPIGOT-5250: Add ChunkSnapshot.contains
aa492e55 SPIGOT-5255: Raid / patrol spawn reasons
This commit is contained in:
Shane Freeder 2019-09-10 19:51:02 +01:00
parent b7dc6fb00e
commit 14513c3ce1
No known key found for this signature in database
GPG Key ID: A3F61EA5A085289C
12 changed files with 75 additions and 75 deletions

View File

@ -1,4 +1,4 @@
From 8be7e3993740a66b5065a9c12d4557a874e9f8cc Mon Sep 17 00:00:00 2001
From e31205e58fdc02cb6102c7f710a61a1ff8499067 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 4 Aug 2018 19:37:35 -0400
Subject: [PATCH] Provide Chunk Coordinates as a Long API
@ -7,10 +7,10 @@ Allows you to easily access the chunks X/z as a long, and a method
to look up by the long key too.
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
index 58cf0dde..b00c5613 100644
index 95e485ee..7b0424d5 100644
--- a/src/main/java/org/bukkit/Chunk.java
+++ b/src/main/java/org/bukkit/Chunk.java
@@ -26,6 +26,32 @@ public interface Chunk {
@@ -27,6 +27,32 @@ public interface Chunk {
*/
int getZ();
@ -44,7 +44,7 @@ index 58cf0dde..b00c5613 100644
* Gets the world containing this chunk
*
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index fec5cdc3..189df011 100644
index 59cfe1ce..00a542f8 100644
--- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java
@@ -158,6 +158,22 @@ public interface World extends PluginMessageRecipient, Metadatable {
@ -71,5 +71,5 @@ index fec5cdc3..189df011 100644
* Checks if the specified {@link Chunk} is loaded
*
--
2.22.0
2.23.0

View File

@ -1,14 +1,14 @@
From c450f7747478f3c2ca042ba4afc6aa65f76b156a Mon Sep 17 00:00:00 2001
From 7c0eaa2f5e46b50360b8fa61518f57f5af913e00 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 15 Aug 2018 01:04:58 -0400
Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
index b00c5613..0abd4377 100644
index 7b0424d5..7909caef 100644
--- a/src/main/java/org/bukkit/Chunk.java
+++ b/src/main/java/org/bukkit/Chunk.java
@@ -101,13 +101,26 @@ public interface Chunk {
@@ -102,13 +102,26 @@ public interface Chunk {
@NotNull
Entity[] getEntities();
@ -37,5 +37,5 @@ index b00c5613..0abd4377 100644
/**
* Checks if the chunk is loaded.
--
2.22.0
2.23.0

View File

@ -1,4 +1,4 @@
From 567314edde8875cb8e2617f7743a1d51ed1371c6 Mon Sep 17 00:00:00 2001
From 17820a70c51cf44459ba0a4268c18d3f75f405cb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 28 May 2015 23:00:19 -0400
Subject: [PATCH] Handle Item Meta Inconsistencies
@ -78,7 +78,7 @@ index 9ebfbff46..b1dfd64d1 100644
public boolean hasEnchantments() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index c04ec4a7c..c45fe35e0 100644
index b0f9fa0ec..9c9852f7a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack {
@ -193,7 +193,7 @@ index c04ec4a7c..c45fe35e0 100644
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 60ee382f5..c2086c77a 100644
index cdfefbfaf..fe318914f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
@ -220,7 +220,7 @@ index 60ee382f5..c2086c77a 100644
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Nonnull;
@@ -269,7 +272,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -270,7 +273,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
private List<IChatBaseComponent> lore;
private Integer customModelData;
private NBTTagCompound blockData;
@ -229,7 +229,7 @@ index 60ee382f5..c2086c77a 100644
private Multimap<Attribute, AttributeModifier> attributeModifiers;
private int repairCost;
private int hideFlag;
@@ -280,7 +283,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -281,7 +284,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
private NBTTagCompound internalTag;
@ -238,7 +238,7 @@ index 60ee382f5..c2086c77a 100644
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only
@@ -301,7 +304,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -302,7 +305,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
this.blockData = meta.blockData;
if (meta.enchantments != null) { // Spigot
@ -247,7 +247,7 @@ index 60ee382f5..c2086c77a 100644
}
if (meta.hasAttributeModifiers()) {
@@ -397,13 +400,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -398,13 +401,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@ -263,7 +263,7 @@ index 60ee382f5..c2086c77a 100644
for (int i = 0; i < ench.size(); i++) {
String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT);
@@ -555,13 +558,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -556,13 +559,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@ -279,7 +279,7 @@ index 60ee382f5..c2086c77a 100644
for (Map.Entry<?, ?> entry : ench.entrySet()) {
// Doctor older enchants
String enchantKey = entry.getKey().toString();
@@ -812,14 +815,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -813,14 +816,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public Map<Enchantment, Integer> getEnchants() {
@ -296,7 +296,7 @@ index 60ee382f5..c2086c77a 100644
}
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -1200,7 +1203,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1201,7 +1204,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.customModelData = this.customModelData;
clone.blockData = this.blockData;
if (this.enchantments != null) {
@ -305,7 +305,7 @@ index 60ee382f5..c2086c77a 100644
}
if (this.hasAttributeModifiers()) {
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
@@ -1428,6 +1431,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1430,6 +1433,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@ -330,5 +330,5 @@ index 60ee382f5..c2086c77a 100644
private final Spigot spigot = new Spigot()
{
--
2.22.0
2.23.0

View File

@ -1,4 +1,4 @@
From 0dbd7be656fe599ebdf257ce06a895bcaec94ebf Mon Sep 17 00:00:00 2001
From 2dc39a751a5a43ea381bbaf121d5ddee83cabacb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 22:43:12 -0400
Subject: [PATCH] Implement ensureServerConversions API
@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
to ensure it meets latest minecraft expectations.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index e3bb1dffd6..594a280e9a 100644
index b15406014..bd04174c3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -330,4 +330,10 @@ public final class CraftItemFactory implements ItemFactory {
@@ -332,4 +332,10 @@ public final class CraftItemFactory implements ItemFactory {
public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException {
return ((CraftMetaItem) meta).updateMaterial(material);
}
@ -22,5 +22,5 @@ index e3bb1dffd6..594a280e9a 100644
+ // Paper end
}
--
2.22.0
2.23.0

View File

@ -1,4 +1,4 @@
From 9517f80ea1b821d95a458c4ba1f0d43ddf78921d Mon Sep 17 00:00:00 2001
From 1a37b18ef694433c929d94f2e4e5d197ac6c917b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 4 May 2016 23:59:38 -0400
Subject: [PATCH] Implement getI18NDisplayName
@ -8,7 +8,7 @@ Currently the server only supports the English language. To override this,
You must replace the language file embedded in the server jar.
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
index c0c13798f8..6012739331 100644
index c0c13798f..601273933 100644
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
@@ -65,10 +65,12 @@ public class LocaleLanguage {
@ -25,10 +25,10 @@ index c0c13798f8..6012739331 100644
return this.c(s);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 594a280e9a..80f71a77b7 100644
index bd04174c3..3cddf254a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -335,5 +335,18 @@ public final class CraftItemFactory implements ItemFactory {
@@ -337,5 +337,18 @@ public final class CraftItemFactory implements ItemFactory {
public ItemStack ensureServerConversions(ItemStack item) {
return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
}
@ -48,5 +48,5 @@ index 594a280e9a..80f71a77b7 100644
// Paper end
}
--
2.22.0
2.23.0

View File

@ -1,4 +1,4 @@
From 92d718d2cc5efcad7c1d148a44a3e1869ef20fd0 Mon Sep 17 00:00:00 2001
From bb932fe2cbe96eb3c7f8ae245f07ed48d81656ab Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 27 Jan 2018 17:04:14 -0500
Subject: [PATCH] Add ArmorStand Item Meta
@ -13,7 +13,7 @@ starting point for future additions in this area.
Fixes GH-559
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
index f700522840..3723faccac 100644
index f70052284..3723facca 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
@@ -8,13 +8,39 @@ import org.bukkit.Material;
@ -267,23 +267,23 @@ index f700522840..3723faccac 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 084c958899..195b2e8f9a 100644
index fe318914f..7a7e96926 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -162,6 +162,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
.put(CraftMetaKnowledgeBook.class, "KNOWLEDGE_BOOK")
@@ -163,6 +163,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
.put(CraftMetaTropicalFishBucket.class, "TROPICAL_FISH_BUCKET")
.put(CraftMetaCrossbow.class, "CROSSBOW")
+ .put(CraftMetaArmorStand.class, "ARMOR_STAND")
.put(CraftMetaSuspiciousStew.class, "SUSPICIOUS_STEW")
+ .put(CraftMetaArmorStand.class, "ARMOR_STAND") // Paper
.put(CraftMetaItem.class, "UNSPECIFIC")
.build();
@@ -1424,7 +1425,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaKnowledgeBook.BOOK_RECIPES.NBT,
@@ -1426,7 +1427,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaTropicalFishBucket.VARIANT.NBT,
CraftMetaCrossbow.CHARGED.NBT,
- CraftMetaCrossbow.CHARGED_PROJECTILES.NBT
+ CraftMetaCrossbow.CHARGED_PROJECTILES.NBT,
CraftMetaCrossbow.CHARGED_PROJECTILES.NBT,
- CraftMetaSuspiciousStew.EFFECTS.NBT
+ CraftMetaSuspiciousStew.EFFECTS.NBT,
+ // Paper start
+ CraftMetaArmorStand.ENTITY_TAG.NBT,
+ CraftMetaArmorStand.INVISIBLE.NBT,
@ -296,7 +296,7 @@ index 084c958899..195b2e8f9a 100644
}
return HANDLED_TAGS;
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
index dd4ba38743..48c5e06215 100644
index b07a3051c..919f2ffa9 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
@@ -6,6 +6,7 @@ import java.util.ArrayList;
@ -316,5 +316,5 @@ index dd4ba38743..48c5e06215 100644
return cleanStack;
}
--
2.22.0
2.23.0

View File

@ -1,4 +1,4 @@
From e902a3bb5d479ce67deb8601624c634156089b1d Mon Sep 17 00:00:00 2001
From 244d4a3b61d4250cd14c16f475900a0a31e588bf Mon Sep 17 00:00:00 2001
From: Hugo Manrique <hugmanrique@gmail.com>
Date: Thu, 26 Jul 2018 14:10:23 +0200
Subject: [PATCH] Don't call getItemMeta on hasItemMeta
@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set.
Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index e6aac0cff0..b8775dee90 100644
index d273f24da..b1ea5b93d 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -543,7 +543,7 @@ public final class CraftItemStack extends ItemStack {
@@ -545,7 +545,7 @@ public final class CraftItemStack extends ItemStack {
@Override
public boolean hasItemMeta() {
@ -24,7 +24,7 @@ index e6aac0cff0..b8775dee90 100644
static boolean hasItemMeta(net.minecraft.server.ItemStack item) {
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
index 48c5e06215..761494fa4b 100644
index 919f2ffa9..4726386ef 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
@@ -4,6 +4,7 @@ import static org.hamcrest.Matchers.*;
@ -84,5 +84,5 @@ index 48c5e06215..761494fa4b 100644
@Test
public void testBlockStateMeta() {
--
2.22.0
2.23.0

View File

@ -1,14 +1,14 @@
From df6ec7a1f1ec7e521f77a2ef79d2031e8b104efc Mon Sep 17 00:00:00 2001
From 9fd4bae1935edac9e3d787e83ee6df8e73b5259b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 15 Aug 2018 01:16:34 -0400
Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index acba08308a..bb3e4805b1 100644
index bc9a65de2..b45516140 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -123,9 +123,16 @@ public class CraftChunk implements Chunk {
@@ -125,9 +125,16 @@ public class CraftChunk implements Chunk {
@Override
public BlockState[] getTileEntities() {
@ -25,7 +25,7 @@ index acba08308a..bb3e4805b1 100644
int index = 0;
net.minecraft.server.Chunk chunk = getHandle();
@@ -137,7 +144,7 @@ public class CraftChunk implements Chunk {
@@ -139,7 +146,7 @@ public class CraftChunk implements Chunk {
}
BlockPosition position = (BlockPosition) obj;
@ -35,5 +35,5 @@ index acba08308a..bb3e4805b1 100644
return entities;
--
2.22.0
2.23.0

View File

@ -1,11 +1,11 @@
From e89b946fd0a5f1904172eb5b4596c3f42b79afc8 Mon Sep 17 00:00:00 2001
From 5264ba62e7d1b5b7871e23d26e9b9c614d80e65e Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Wed, 12 Sep 2018 18:53:55 +0300
Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values
diff --git a/src/main/java/net/minecraft/server/ArgumentBlock.java b/src/main/java/net/minecraft/server/ArgumentBlock.java
index 005ebec266..97d85f8451 100644
index 005ebec26..97d85f845 100644
--- a/src/main/java/net/minecraft/server/ArgumentBlock.java
+++ b/src/main/java/net/minecraft/server/ArgumentBlock.java
@@ -43,7 +43,7 @@ public class ArgumentBlock {
@ -32,7 +32,7 @@ index 005ebec266..97d85f8451 100644
this.s = this::l;
if (this.i.canRead() && this.i.peek() == '#') {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 195b2e8f9a..1faadbd101 100644
index 7a7e96926..432624056 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -87,6 +87,12 @@ import org.bukkit.persistence.PersistentDataContainer;
@ -48,7 +48,7 @@ index 195b2e8f9a..1faadbd101 100644
/**
* Children must include the following:
*
@@ -267,6 +273,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -268,6 +274,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Specific(Specific.To.NBT)
static final ItemMetaKey BLOCK_DATA = new ItemMetaKey("BlockStateTag");
static final ItemMetaKey BUKKIT_CUSTOM_TAG = new ItemMetaKey("PublicBukkitValues");
@ -59,7 +59,7 @@ index 195b2e8f9a..1faadbd101 100644
private IChatBaseComponent displayName;
private IChatBaseComponent locName;
@@ -279,6 +289,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -280,6 +290,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
private int hideFlag;
private boolean unbreakable;
private int damage;
@ -70,7 +70,7 @@ index 195b2e8f9a..1faadbd101 100644
private static final Set<String> HANDLED_TAGS = Sets.newHashSet();
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
@@ -316,6 +330,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -317,6 +331,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
this.hideFlag = meta.hideFlag;
this.unbreakable = meta.unbreakable;
this.damage = meta.damage;
@ -86,7 +86,7 @@ index 195b2e8f9a..1faadbd101 100644
this.unhandledTags.putAll(meta.unhandledTags);
this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw());
@@ -392,6 +415,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -393,6 +416,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
persistentDataContainer.put(key, compound.get(key));
}
}
@ -118,7 +118,7 @@ index 195b2e8f9a..1faadbd101 100644
Set<String> keys = tag.getKeys();
for (String key : keys) {
@@ -529,6 +577,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -530,6 +578,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
setDamage(damage);
}
@ -153,7 +153,7 @@ index 195b2e8f9a..1faadbd101 100644
String internal = SerializableMeta.getString(map, "internal", true);
if (internal != null) {
ByteArrayInputStream buf = new ByteArrayInputStream(Base64.decodeBase64(internal));
@@ -657,6 +733,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -658,6 +734,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
if (hasDamage()) {
itemTag.setInt(DAMAGE.NBT, damage);
}
@ -177,7 +177,7 @@ index 195b2e8f9a..1faadbd101 100644
for (Map.Entry<String, NBTBase> e : unhandledTags.entrySet()) {
itemTag.set(e.getKey(), e.getValue());
@@ -673,6 +766,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -674,6 +767,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@ -199,7 +199,7 @@ index 195b2e8f9a..1faadbd101 100644
NBTTagList createStringList(List<IChatBaseComponent> list) {
if (list == null || list.isEmpty()) {
return null;
@@ -755,7 +863,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -756,7 +864,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Overridden
boolean isEmpty() {
@ -208,7 +208,7 @@ index 195b2e8f9a..1faadbd101 100644
}
@Override
@@ -1155,7 +1263,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1156,7 +1264,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
&& (this.hideFlag == that.hideFlag)
&& (this.isUnbreakable() == that.isUnbreakable())
&& (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage())
@ -221,7 +221,7 @@ index 195b2e8f9a..1faadbd101 100644
}
/**
@@ -1190,6 +1302,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1191,6 +1303,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
hash = 61 * hash + (hasDamage() ? this.damage : 0);
hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0);
hash = 61 * hash + version;
@ -232,7 +232,7 @@ index 195b2e8f9a..1faadbd101 100644
return hash;
}
@@ -1213,6 +1329,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1214,6 +1330,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.unbreakable = this.unbreakable;
clone.damage = this.damage;
clone.version = this.version;
@ -247,7 +247,7 @@ index 195b2e8f9a..1faadbd101 100644
return clone;
} catch (CloneNotSupportedException e) {
throw new Error(e);
@@ -1270,6 +1394,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1271,6 +1395,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
builder.put(DAMAGE.BUKKIT, damage);
}
@ -272,7 +272,7 @@ index 195b2e8f9a..1faadbd101 100644
final Map<String, NBTBase> internalTags = new HashMap<String, NBTBase>(unhandledTags);
serializeInternal(internalTags);
if (!internalTags.isEmpty()) {
@@ -1432,7 +1574,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1434,7 +1576,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaArmorStand.NO_BASE_PLATE.NBT,
CraftMetaArmorStand.SHOW_ARMS.NBT,
CraftMetaArmorStand.SMALL.NBT,
@ -283,7 +283,7 @@ index 195b2e8f9a..1faadbd101 100644
// Paper end
));
}
@@ -1479,4 +1623,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1481,4 +1625,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return spigot;
}
// Spigot end
@ -432,5 +432,5 @@ index 195b2e8f9a..1faadbd101 100644
+ // Paper end
}
--
2.22.0
2.23.0

View File

@ -1,11 +1,11 @@
From 269842f724c46c5faed547d65fa33619b794ccd5 Mon Sep 17 00:00:00 2001
From 585027fd7f1fbd432f33d451948355ae5d4ef31e Mon Sep 17 00:00:00 2001
From: kickash32 <kickash32@gmail.com>
Date: Wed, 21 Aug 2019 23:57:32 +0500
Subject: [PATCH] only add passanger entities once from spawners
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index b05f6c2f..a4e6be54 100644
index b05f6c2f2..a4e6be549 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -195,7 +195,7 @@ public abstract class MobSpawnerAbstract {
@ -18,5 +18,5 @@ index b05f6c2f..a4e6be54 100644
while (iterator.hasNext()) {
--
2.22.0
2.23.0

@ -1 +1 @@
Subproject commit e28fb3bd669f1647dab40a5ca6820e003a298b75
Subproject commit 92f24ff245ea60fc4d9cff5bac8775d7caf6f3e9

@ -1 +1 @@
Subproject commit 763e560135a991aaf2c3d33ad58216d09e98f23a
Subproject commit 03b145b3006de982c7be3580dd85dd619b2b172b