[Auto] 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:
e16de3bb SPIGOT-5906: Huge Fungi tree generation

CraftBukkit Changes:
a13b8cfc7 SPIGOT-5907: Item Frame NBT data disappears
5a6c52983 SPIGOT-5906: Huge Fungi tree generation
This commit is contained in:
Aikar 2020-06-30 20:07:16 -04:00
parent bcab622e55
commit 7ce690f49e
No known key found for this signature in database
GPG key ID: 401ADFC9891FAAFE
27 changed files with 88 additions and 88 deletions

View file

@ -79,7 +79,7 @@ index 76091ab3f149decc0d3c848b79edd24e20cf181d..a360711ea14983e8df34caa5edda80a0
public boolean hasEnchantments() { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index f1c4ae9997d5d11d903360dbccf45f3c1df078bc..9e0db30c5f99164412e97a1cdd865ca254861a78 100644 index ddd216f704c9d9bd835afbcfc67cb487dc8705f3..fee9cc0ee2c4f052e4dcfa5f2acc457a5b524a0b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/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 { @@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack {
@ -194,7 +194,7 @@ index f1c4ae9997d5d11d903360dbccf45f3c1df078bc..9e0db30c5f99164412e97a1cdd865ca2
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c7544abf44ee 100644 index 0c3b7af719bc0019048b3699a76e49989d43d074..3192e4aa51f483f0d1e758eaa765c4f91558c7e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/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; @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
@ -221,7 +221,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.annotation.Nonnull; 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 List<IChatBaseComponent> lore;
private Integer customModelData; private Integer customModelData;
private NBTTagCompound blockData; private NBTTagCompound blockData;
@ -230,7 +230,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754
private Multimap<Attribute, AttributeModifier> attributeModifiers; private Multimap<Attribute, AttributeModifier> attributeModifiers;
private int repairCost; private int repairCost;
private int hideFlag; 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 static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
private NBTTagCompound internalTag; private NBTTagCompound internalTag;
@ -239,7 +239,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754
private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY); private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only 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; this.blockData = meta.blockData;
if (meta.enchantments != null) { // Spigot if (meta.enchantments != null) { // Spigot
@ -248,7 +248,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754
} }
if (meta.hasAttributeModifiers()) { 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 {
} }
} }
@ -264,7 +264,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754
for (int i = 0; i < ench.size(); i++) { for (int i = 0; i < ench.size(); i++) {
String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT); 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 {
} }
} }
@ -280,7 +280,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754
for (Map.Entry<?, ?> entry : ench.entrySet()) { for (Map.Entry<?, ?> entry : ench.entrySet()) {
// Doctor older enchants // Doctor older enchants
String enchantKey = entry.getKey().toString(); String enchantKey = entry.getKey().toString();
@@ -813,14 +816,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -814,14 +817,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override @Override
public Map<Enchantment, Integer> getEnchants() { public Map<Enchantment, Integer> getEnchants() {
@ -297,7 +297,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754
} }
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -1201,7 +1204,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1202,7 +1205,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.customModelData = this.customModelData; clone.customModelData = this.customModelData;
clone.blockData = this.blockData; clone.blockData = this.blockData;
if (this.enchantments != null) { if (this.enchantments != null) {
@ -306,7 +306,7 @@ index e5f029c6ccb2d9258e173ded90ab345426343faf..5d14fff8050f43f5bd9036d5e8b8c754
} }
if (this.hasAttributeModifiers()) { if (this.hasAttributeModifiers()) {
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
@@ -1430,4 +1433,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1431,4 +1434,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return HANDLED_TAGS; return HANDLED_TAGS;
} }
} }

View file

@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections. which creates copy of the collections.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 004c768d03e6fde2bcc32f39ba2a36ea2ab1e882..c791e4861163e0340fe3986ec5b7f6ed4900fa3b 100644 index a6d892bab669d13767c43115cdbd99557181322d..ef3a539fd40555b1049131ee201569cabe2d6179 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -280,6 +280,48 @@ public class CraftWorld implements World { @@ -281,6 +281,48 @@ public class CraftWorld implements World {
private int waterAmbientSpawn = -1; private int waterAmbientSpawn = -1;
private int ambientSpawn = -1; private int ambientSpawn = -1;

View file

@ -278,10 +278,10 @@ index ba42ca08ca61832cb07bebcfa0b1e5422d7b30e9..623cd63711c6cb79dce7a46056e193fd
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index c791e4861163e0340fe3986ec5b7f6ed4900fa3b..802dd32711a429b06f082528c60dd55a170b2ae0 100644 index ef3a539fd40555b1049131ee201569cabe2d6179..81f014977b95056020e9695dd49cbbf45d61b8ea 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1808,7 +1808,7 @@ public class CraftWorld implements World { @@ -1817,7 +1817,7 @@ public class CraftWorld implements World {
} else if (TNTPrimed.class.isAssignableFrom(clazz)) { } else if (TNTPrimed.class.isAssignableFrom(clazz)) {
entity = new EntityTNTPrimed(world, x, y, z, null); entity = new EntityTNTPrimed(world, x, y, z, null);
} else if (ExperienceOrb.class.isAssignableFrom(clazz)) { } else if (ExperienceOrb.class.isAssignableFrom(clazz)) {

View file

@ -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. 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 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 97a58900ac1622e84b8bed87004c7dd85067d31e..efa013a8bf91df0b71cbf01d2c1b1099ac616c57 100644 index 9828f50e1bd851442be6e409d133354df870affd..cd60a6177739124ffa899ab03534c609d2a79573 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -326,4 +326,10 @@ public final class CraftItemFactory implements ItemFactory { @@ -328,4 +328,10 @@ public final class CraftItemFactory implements ItemFactory {
public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException { public Material updateMaterial(ItemMeta meta, Material material) throws IllegalArgumentException {
return ((CraftMetaItem) meta).updateMaterial(material); return ((CraftMetaItem) meta).updateMaterial(material);
} }

View file

@ -34,10 +34,10 @@ index ea7cb9943dc6da7a05e0841985eb1be4b6bc5169..c83ba9d9869f8ba51df17963d530536d
public abstract boolean b(String s); public abstract boolean b(String s);
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index efa013a8bf91df0b71cbf01d2c1b1099ac616c57..0d62f3ae939557b73c79792d6c2a0fd42513c8b8 100644 index cd60a6177739124ffa899ab03534c609d2a79573..d56f8ca6ae9083d721c83b5ce10956b850af409d 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -331,5 +331,18 @@ public final class CraftItemFactory implements ItemFactory { @@ -333,5 +333,18 @@ public final class CraftItemFactory implements ItemFactory {
public ItemStack ensureServerConversions(ItemStack item) { public ItemStack ensureServerConversions(ItemStack item) {
return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item)); return CraftItemStack.asCraftMirror(CraftItemStack.asNMSCopy(item));
} }

View file

@ -267,10 +267,10 @@ index f700522840ee0dfd90871b1b0c8973d7d62a9353..3723faccac00afe19e59d71008ba1604
+ // Paper end + // Paper end
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 5d14fff8050f43f5bd9036d5e8b8c7544abf44ee..153f4c31584e6968978ce4befd7db294cc44c16b 100644 index 3192e4aa51f483f0d1e758eaa765c4f91558c7e8..15becd21768d85f2c16f19728aef13ba500c071e 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -1427,7 +1427,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1428,7 +1428,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaTropicalFishBucket.VARIANT.NBT, CraftMetaTropicalFishBucket.VARIANT.NBT,
CraftMetaCrossbow.CHARGED.NBT, CraftMetaCrossbow.CHARGED.NBT,
CraftMetaCrossbow.CHARGED_PROJECTILES.NBT, CraftMetaCrossbow.CHARGED_PROJECTILES.NBT,
@ -288,7 +288,7 @@ index 5d14fff8050f43f5bd9036d5e8b8c7544abf44ee..153f4c31584e6968978ce4befd7db294
} }
return HANDLED_TAGS; 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 diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
index e4305ce522e1cec438baae50487d2a737c75051a..ba4cc98f1ec39ccfd433aeadf4b5c7018a1d40cc 100644 index 7be77ab45c26121e2f4aa1e4a2678bcca838ee04..bd67599c0cb2a2a88b265ad1ea4231a285efff6d 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/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; @@ -6,6 +6,7 @@ import java.util.ArrayList;

View file

@ -43,10 +43,10 @@ index 809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6..10eb83bec33050ec1054de493960c87f
if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 802dd32711a429b06f082528c60dd55a170b2ae0..03dbef19dce5626fb7810d62a996471921c1c207 100644 index 81f014977b95056020e9695dd49cbbf45d61b8ea..0a280692e6dc6b0a9e47bfd12f70774d49628398 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2320,11 +2320,17 @@ public class CraftWorld implements World { @@ -2329,11 +2329,17 @@ public class CraftWorld implements World {
@Override @Override
public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {

View file

@ -8,10 +8,10 @@ This API has more capabilities than .dropItem with the Consumer function
Item can be set inside of the Consumer pre spawn function. Item can be set inside of the Consumer pre spawn function.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 03dbef19dce5626fb7810d62a996471921c1c207..f2748cdccfc11936118d4c2e03425286ca25e82f 100644 index 0a280692e6dc6b0a9e47bfd12f70774d49628398..5b4afa9998c7e156353abe80e3ccc3efb4a2d390 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1490,6 +1490,10 @@ public class CraftWorld implements World { @@ -1499,6 +1499,10 @@ public class CraftWorld implements World {
if (Boat.class.isAssignableFrom(clazz)) { if (Boat.class.isAssignableFrom(clazz)) {
entity = new EntityBoat(world, x, y, z); entity = new EntityBoat(world, x, y, z);
entity.setPositionRotation(x, y, z, yaw, pitch); entity.setPositionRotation(x, y, z, yaw, pitch);

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Expand Explosions API
Add Entity as a Source capability, and add more API choices, and on Location. Add Entity as a Source capability, and add more API choices, and on Location.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f2748cdccfc11936118d4c2e03425286ca25e82f..89c8d3e6e6b7e1b1ac52aa2921e4dbf398ecb15a 100644 index 5b4afa9998c7e156353abe80e3ccc3efb4a2d390..efb569b5add5dc7456665fccccc2396d7c3af046 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -882,6 +882,11 @@ public class CraftWorld implements World { @@ -891,6 +891,11 @@ public class CraftWorld implements World {
public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) { public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) {
return !world.createExplosion(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? Explosion.Effect.BREAK : Explosion.Effect.NONE).wasCanceled; return !world.createExplosion(source == null ? null : ((CraftEntity) source).getHandle(), x, y, z, power, setFire, breakBlocks ? Explosion.Effect.BREAK : Explosion.Effect.NONE).wasCanceled;
} }

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 89c8d3e6e6b7e1b1ac52aa2921e4dbf398ecb15a..5510281bef051280fb9495f21cade571d7547042 100644 index efb569b5add5dc7456665fccccc2396d7c3af046..0bfe87fe4ff0fbb94a3339ab8f8d62ca32d659a0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1296,6 +1296,15 @@ public class CraftWorld implements World { @@ -1305,6 +1305,15 @@ public class CraftWorld implements World {
return list; return list;
} }

View file

@ -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. 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 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index c6173133cc458fe5a5fe6f431ab79a9abb15101e..8af956955c8399cb62df8cbb4fc0ae6c87cdc187 100644 index 459525b3f54e6fec104fe9532ce338feabc73598..85bda7229d22af2a012b9f6ab7bd3376182d4ef6 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -562,7 +562,7 @@ public final class CraftItemStack extends ItemStack { @@ -564,7 +564,7 @@ public final class CraftItemStack extends ItemStack {
@Override @Override
public boolean hasItemMeta() { public boolean hasItemMeta() {
@ -24,7 +24,7 @@ index c6173133cc458fe5a5fe6f431ab79a9abb15101e..8af956955c8399cb62df8cbb4fc0ae6c
static boolean hasItemMeta(net.minecraft.server.ItemStack item) { 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 diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
index ba4cc98f1ec39ccfd433aeadf4b5c7018a1d40cc..3504bcac57f973dc56f991d6006c06fa8de5c64b 100644 index bd67599c0cb2a2a88b265ad1ea4231a285efff6d..8fdd6cfc3f698b41d0ac69360eb8660cd8444075 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
@@ -2,10 +2,9 @@ package org.bukkit.craftbukkit.inventory; @@ -2,10 +2,9 @@ package org.bukkit.craftbukkit.inventory;

View file

@ -83,10 +83,10 @@ index e5fff59efc2d2794024eae93854a296d2b82cf3e..1a103dd830109e119acc1a371b37386e
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 5510281bef051280fb9495f21cade571d7547042..aab5995ff53b75b9f5e9c74a4006f17cd847efc0 100644 index 0bfe87fe4ff0fbb94a3339ab8f8d62ca32d659a0..265822138eee71daa1d6858adc17985d941d9d4c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1032,6 +1032,7 @@ public class CraftWorld implements World { @@ -1041,6 +1041,7 @@ public class CraftWorld implements World {
for (Object o : world.entitiesById.values()) { for (Object o : world.entitiesById.values()) {
if (o instanceof net.minecraft.server.Entity) { if (o instanceof net.minecraft.server.Entity) {
net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o;
@ -94,7 +94,7 @@ index 5510281bef051280fb9495f21cade571d7547042..aab5995ff53b75b9f5e9c74a4006f17c
Entity bukkitEntity = mcEnt.getBukkitEntity(); Entity bukkitEntity = mcEnt.getBukkitEntity();
// Assuming that bukkitEntity isn't null // Assuming that bukkitEntity isn't null
@@ -1051,6 +1052,7 @@ public class CraftWorld implements World { @@ -1060,6 +1061,7 @@ public class CraftWorld implements World {
for (Object o : world.entitiesById.values()) { for (Object o : world.entitiesById.values()) {
if (o instanceof net.minecraft.server.Entity) { if (o instanceof net.minecraft.server.Entity) {
net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o; net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity) o;
@ -102,7 +102,7 @@ index 5510281bef051280fb9495f21cade571d7547042..aab5995ff53b75b9f5e9c74a4006f17c
Entity bukkitEntity = mcEnt.getBukkitEntity(); Entity bukkitEntity = mcEnt.getBukkitEntity();
// Assuming that bukkitEntity isn't null // Assuming that bukkitEntity isn't null
@@ -1077,6 +1079,7 @@ public class CraftWorld implements World { @@ -1086,6 +1088,7 @@ public class CraftWorld implements World {
for (Object entity: world.entitiesById.values()) { for (Object entity: world.entitiesById.values()) {
if (entity instanceof net.minecraft.server.Entity) { if (entity instanceof net.minecraft.server.Entity) {
@ -110,7 +110,7 @@ index 5510281bef051280fb9495f21cade571d7547042..aab5995ff53b75b9f5e9c74a4006f17c
Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity(); Entity bukkitEntity = ((net.minecraft.server.Entity) entity).getBukkitEntity();
if (bukkitEntity == null) { if (bukkitEntity == null) {
@@ -1100,6 +1103,7 @@ public class CraftWorld implements World { @@ -1109,6 +1112,7 @@ public class CraftWorld implements World {
for (Object entity: world.entitiesById.values()) { for (Object entity: world.entitiesById.values()) {
if (entity instanceof net.minecraft.server.Entity) { if (entity instanceof net.minecraft.server.Entity) {

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index aab5995ff53b75b9f5e9c74a4006f17cd847efc0..03c21f075ec1414503bb639f9deebb3298299d9a 100644 index 265822138eee71daa1d6858adc17985d941d9d4c..2cc284b81d8ee17e19342a6cd849ff018c031a92 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -501,7 +501,7 @@ public class CraftWorld implements World { @@ -502,7 +502,7 @@ public class CraftWorld implements World {
@Override @Override
public boolean loadChunk(int x, int z, boolean generate) { public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot

View file

@ -32,7 +32,7 @@ index b986a8e318733bdae766202bef93d4d25f18b58d..1f74602ff13a9f89c8dc40170353a79a
this.s = this::l; this.s = this::l;
if (this.i.canRead() && this.i.peek() == '#') { 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 diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d8f2063ca 100644 index 15becd21768d85f2c16f19728aef13ba500c071e..b8e54fbc99aadbdd75f9b0290636a4d8c3bcdd71 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -85,6 +85,12 @@ import org.bukkit.persistence.PersistentDataContainer; @@ -85,6 +85,12 @@ import org.bukkit.persistence.PersistentDataContainer;
@ -48,7 +48,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
/** /**
* Children must include the following: * Children must include the following:
* *
@@ -266,6 +272,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -267,6 +273,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Specific(Specific.To.NBT) @Specific(Specific.To.NBT)
static final ItemMetaKey BLOCK_DATA = new ItemMetaKey("BlockStateTag"); static final ItemMetaKey BLOCK_DATA = new ItemMetaKey("BlockStateTag");
static final ItemMetaKey BUKKIT_CUSTOM_TAG = new ItemMetaKey("PublicBukkitValues"); static final ItemMetaKey BUKKIT_CUSTOM_TAG = new ItemMetaKey("PublicBukkitValues");
@ -59,7 +59,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
private IChatBaseComponent displayName; private IChatBaseComponent displayName;
private IChatBaseComponent locName; private IChatBaseComponent locName;
@@ -278,6 +288,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -279,6 +289,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
private int hideFlag; private int hideFlag;
private boolean unbreakable; private boolean unbreakable;
private int damage; private int damage;
@ -70,7 +70,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
private static final Set<String> HANDLED_TAGS = Sets.newHashSet(); private static final Set<String> HANDLED_TAGS = Sets.newHashSet();
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
@@ -315,6 +329,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -316,6 +330,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
this.hideFlag = meta.hideFlag; this.hideFlag = meta.hideFlag;
this.unbreakable = meta.unbreakable; this.unbreakable = meta.unbreakable;
this.damage = meta.damage; this.damage = meta.damage;
@ -86,7 +86,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
this.unhandledTags.putAll(meta.unhandledTags); this.unhandledTags.putAll(meta.unhandledTags);
this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw()); this.persistentDataContainer.putAll(meta.persistentDataContainer.getRaw());
@@ -391,6 +414,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -392,6 +415,31 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
persistentDataContainer.put(key, compound.get(key)); persistentDataContainer.put(key, compound.get(key));
} }
} }
@ -118,7 +118,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
Set<String> keys = tag.getKeys(); Set<String> keys = tag.getKeys();
for (String key : keys) { for (String key : keys) {
@@ -528,6 +576,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -529,6 +577,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
setDamage(damage); setDamage(damage);
} }
@ -153,7 +153,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
String internal = SerializableMeta.getString(map, "internal", true); String internal = SerializableMeta.getString(map, "internal", true);
if (internal != null) { if (internal != null) {
ByteArrayInputStream buf = new ByteArrayInputStream(Base64.decodeBase64(internal)); ByteArrayInputStream buf = new ByteArrayInputStream(Base64.decodeBase64(internal));
@@ -656,6 +732,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -657,6 +733,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
if (hasDamage()) { if (hasDamage()) {
itemTag.setInt(DAMAGE.NBT, damage); itemTag.setInt(DAMAGE.NBT, damage);
} }
@ -177,7 +177,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
for (Map.Entry<String, NBTBase> e : unhandledTags.entrySet()) { for (Map.Entry<String, NBTBase> e : unhandledTags.entrySet()) {
itemTag.set(e.getKey(), e.getValue()); itemTag.set(e.getKey(), e.getValue());
@@ -672,6 +765,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -673,6 +766,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
} }
} }
@ -199,7 +199,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
NBTTagList createStringList(List<IChatBaseComponent> list) { NBTTagList createStringList(List<IChatBaseComponent> list) {
if (list == null || list.isEmpty()) { if (list == null || list.isEmpty()) {
return null; 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 @Overridden
boolean isEmpty() { boolean isEmpty() {
@ -208,7 +208,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
} }
@Override @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.hideFlag == that.hideFlag)
&& (this.isUnbreakable() == that.isUnbreakable()) && (this.isUnbreakable() == that.isUnbreakable())
&& (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage()) && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage())
@ -221,7 +221,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
} }
/** /**
@@ -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 + (hasDamage() ? this.damage : 0);
hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0);
hash = 61 * hash + version; hash = 61 * hash + version;
@ -232,7 +232,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
return hash; return hash;
} }
@@ -1214,6 +1330,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1215,6 +1331,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.unbreakable = this.unbreakable; clone.unbreakable = this.unbreakable;
clone.damage = this.damage; clone.damage = this.damage;
clone.version = this.version; clone.version = this.version;
@ -247,7 +247,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
return clone; return clone;
} catch (CloneNotSupportedException e) { } catch (CloneNotSupportedException e) {
throw new Error(e); throw new Error(e);
@@ -1271,6 +1395,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1272,6 +1396,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
builder.put(DAMAGE.BUKKIT, damage); builder.put(DAMAGE.BUKKIT, damage);
} }
@ -272,7 +272,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
final Map<String, NBTBase> internalTags = new HashMap<String, NBTBase>(unhandledTags); final Map<String, NBTBase> internalTags = new HashMap<String, NBTBase>(unhandledTags);
serializeInternal(internalTags); serializeInternal(internalTags);
if (!internalTags.isEmpty()) { if (!internalTags.isEmpty()) {
@@ -1434,7 +1576,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1435,7 +1577,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaArmorStand.NO_BASE_PLATE.NBT, CraftMetaArmorStand.NO_BASE_PLATE.NBT,
CraftMetaArmorStand.SHOW_ARMS.NBT, CraftMetaArmorStand.SHOW_ARMS.NBT,
CraftMetaArmorStand.SMALL.NBT, CraftMetaArmorStand.SMALL.NBT,
@ -283,7 +283,7 @@ index 153f4c31584e6968978ce4befd7db294cc44c16b..79d8d60ea2c64d728297756d2fe9fc1d
// Paper end // Paper end
)); ));
} }
@@ -1459,4 +1603,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -1460,4 +1604,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
} }
// Paper end // Paper end

View file

@ -17,10 +17,10 @@ index 8a79302b9cc178bfe4e0909293e3a87c01d344ca..e0ecdb8f87ec82b97a056c8f6d91d6a8
if (this.world.isDay() && !this.world.isClientSide) { if (this.world.isDay() && !this.world.isClientSide) {
float f = this.aO(); float f = this.aO();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 03c21f075ec1414503bb639f9deebb3298299d9a..52c3740d03a0dda9abfcf99785f5b8269c166c83 100644 index 2cc284b81d8ee17e19342a6cd849ff018c031a92..f5660806b8162cd8c3a1072601f6d3a99d526cc4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -863,6 +863,13 @@ public class CraftWorld implements World { @@ -872,6 +872,13 @@ public class CraftWorld implements World {
} }
} }

View file

@ -20,10 +20,10 @@ index 3fc33d410e62fa8f86dd7f912e0ae483e48697f1..897069231f057bd977c382731d6b3d87
if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) { if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 52c3740d03a0dda9abfcf99785f5b8269c166c83..e488edef15a0dcb78cc3d8d53ecd93ba60e0d401 100644 index f5660806b8162cd8c3a1072601f6d3a99d526cc4..4b9d33d51c82575ad65056e8d314a60ae0e5bb0b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -341,6 +341,29 @@ public class CraftWorld implements World { @@ -342,6 +342,29 @@ public class CraftWorld implements World {
return getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING); return getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING);
} }

View file

@ -9,10 +9,10 @@ waiting for the execution queue to get to our request; We can just query
the chunk status and get a response now, vs having to wait the chunk status and get a response now, vs having to wait
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e488edef15a0dcb78cc3d8d53ecd93ba60e0d401..ac3f9298b746d74fbec714dbcd4d0d32a6ed134c 100644 index 4b9d33d51c82575ad65056e8d314a60ae0e5bb0b..3549404ec211e88f6d91bdcf07c661e2d2ac4875 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -407,13 +407,13 @@ public class CraftWorld implements World { @@ -408,13 +408,13 @@ public class CraftWorld implements World {
@Override @Override
public boolean isChunkLoaded(int x, int z) { public boolean isChunkLoaded(int x, int z) {

View file

@ -198,10 +198,10 @@ index a243dc63eb4c811065c742e61b334864ad582fbe..e8382aabb36f58c55ba47e6495d47af5
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ac3f9298b746d74fbec714dbcd4d0d32a6ed134c..152bba7658cc34d2bdd75be0d8f546459fb42e88 100644 index 3549404ec211e88f6d91bdcf07c661e2d2ac4875..29d88bf1a8c5272822dd26e5e93d102748d9abf2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1940,15 +1940,21 @@ public class CraftWorld implements World { @@ -1949,15 +1949,21 @@ public class CraftWorld implements World {
@Override @Override
public void setKeepSpawnInMemory(boolean keepLoaded) { public void setKeepSpawnInMemory(boolean keepLoaded) {

View file

@ -279,7 +279,7 @@ index 02bd568af727633a6e834d5328683a9ff67b9dd7..341689ac996164b7b53e095495b92b6e
throwable = throwable1; throwable = throwable1;
throw throwable1; throw throwable1;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 152bba7658cc34d2bdd75be0d8f546459fb42e88..8e6b5765bb2a067bcd0b38a3abb28c92ad04f272 100644 index 29d88bf1a8c5272822dd26e5e93d102748d9abf2..412dc3865dfee606c37c06daefeacc6ed14ced7b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -19,6 +19,7 @@ import java.util.Objects; @@ -19,6 +19,7 @@ import java.util.Objects;
@ -290,7 +290,7 @@ index 152bba7658cc34d2bdd75be0d8f546459fb42e88..8e6b5765bb2a067bcd0b38a3abb28c92
import java.util.function.Predicate; import java.util.function.Predicate;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import net.minecraft.server.ArraySetSorted; import net.minecraft.server.ArraySetSorted;
@@ -412,8 +413,22 @@ public class CraftWorld implements World { @@ -413,8 +414,22 @@ public class CraftWorld implements World {
@Override @Override
public boolean isChunkGenerated(int x, int z) { public boolean isChunkGenerated(int x, int z) {
@ -314,7 +314,7 @@ index 152bba7658cc34d2bdd75be0d8f546459fb42e88..8e6b5765bb2a067bcd0b38a3abb28c92
} catch (IOException ex) { } catch (IOException ex) {
throw new RuntimeException(ex); throw new RuntimeException(ex);
} }
@@ -524,20 +539,49 @@ public class CraftWorld implements World { @@ -525,20 +540,49 @@ public class CraftWorld implements World {
@Override @Override
public boolean loadChunk(int x, int z, boolean generate) { public boolean loadChunk(int x, int z, boolean generate) {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot

View file

@ -3998,7 +3998,7 @@ index 4529ccc02f53fadc6ac2df97682b21913487bc22..85b73e65a4c1af052e75473bc239d91d
} }
public void removeTicketsForSpawn(int radiusInBlocks, BlockPosition spawn) { public void removeTicketsForSpawn(int radiusInBlocks, BlockPosition spawn) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 8e6b5765bb2a067bcd0b38a3abb28c92ad04f272..ee44171831350c7baf868b74ed9d5b8bf3ed6d4a 100644 index 412dc3865dfee606c37c06daefeacc6ed14ced7b..310c4446734a7ebfadf0cbd74d1cfcee20ef3668 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -74,6 +74,7 @@ import net.minecraft.server.GroupDataEntity; @@ -74,6 +74,7 @@ import net.minecraft.server.GroupDataEntity;
@ -4009,7 +4009,7 @@ index 8e6b5765bb2a067bcd0b38a3abb28c92ad04f272..ee44171831350c7baf868b74ed9d5b8b
import net.minecraft.server.MovingObjectPosition; import net.minecraft.server.MovingObjectPosition;
import net.minecraft.server.PacketPlayOutCustomSoundEffect; import net.minecraft.server.PacketPlayOutCustomSoundEffect;
import net.minecraft.server.PacketPlayOutUpdateTime; import net.minecraft.server.PacketPlayOutUpdateTime;
@@ -557,22 +558,23 @@ public class CraftWorld implements World { @@ -558,22 +559,23 @@ public class CraftWorld implements World {
return true; return true;
} }
@ -4041,7 +4041,7 @@ index 8e6b5765bb2a067bcd0b38a3abb28c92ad04f272..ee44171831350c7baf868b74ed9d5b8b
// fall through to load // fall through to load
// we do this so we do not re-read the chunk data on disk // we do this so we do not re-read the chunk data on disk
@@ -2470,6 +2472,34 @@ public class CraftWorld implements World { @@ -2479,6 +2481,34 @@ public class CraftWorld implements World {
public DragonBattle getEnderDragonBattle() { public DragonBattle getEnderDragonBattle() {
return (getHandle().getDragonBattle() == null) ? null : new CraftDragonBattle(getHandle().getDragonBattle()); return (getHandle().getDragonBattle() == null) ? null : new CraftDragonBattle(getHandle().getDragonBattle());
} }

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Fix spawning of hanging entities that are not ItemFrames and
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ee44171831350c7baf868b74ed9d5b8bf3ed6d4a..60e3a7422045148447a45685f66ed0ebb5172bf6 100644 index 310c4446734a7ebfadf0cbd74d1cfcee20ef3668..080f600008ce1cba12c2bfe07e014e8adb7b7b2b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1861,7 +1861,12 @@ public class CraftWorld implements World { @@ -1870,7 +1870,12 @@ public class CraftWorld implements World {
height = 9; height = 9;
} }

View file

@ -243,7 +243,7 @@ index 6ac39fc6cafdcbf7883e868ecb58a2ebfad41601..bb4d54ebee573964cf3026888da10858
while (objectbidirectionaliterator.hasNext()) { while (objectbidirectionaliterator.hasNext()) {
Entry<PlayerChunk> entry = (Entry) objectbidirectionaliterator.next(); Entry<PlayerChunk> entry = (Entry) objectbidirectionaliterator.next();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 60e3a7422045148447a45685f66ed0ebb5172bf6..5fb4f31693f1214617e43228450d2435d26202f9 100644 index 080f600008ce1cba12c2bfe07e014e8adb7b7b2b..3ec021746ffaea89f09126538fcaa0555872ac17 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -73,6 +73,7 @@ import net.minecraft.server.GameRules; @@ -73,6 +73,7 @@ import net.minecraft.server.GameRules;
@ -254,7 +254,7 @@ index 60e3a7422045148447a45685f66ed0ebb5172bf6..5fb4f31693f1214617e43228450d2435
import net.minecraft.server.MinecraftKey; import net.minecraft.server.MinecraftKey;
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
import net.minecraft.server.MovingObjectPosition; import net.minecraft.server.MovingObjectPosition;
@@ -293,6 +294,7 @@ public class CraftWorld implements World { @@ -294,6 +295,7 @@ public class CraftWorld implements World {
return ret; return ret;
} }
public int getTileEntityCount() { public int getTileEntityCount() {
@ -262,7 +262,7 @@ index 60e3a7422045148447a45685f66ed0ebb5172bf6..5fb4f31693f1214617e43228450d2435
// We don't use the full world tile entity list, so we must iterate chunks // We don't use the full world tile entity list, so we must iterate chunks
Long2ObjectLinkedOpenHashMap<PlayerChunk> chunks = world.getChunkProvider().playerChunkMap.visibleChunks; Long2ObjectLinkedOpenHashMap<PlayerChunk> chunks = world.getChunkProvider().playerChunkMap.visibleChunks;
int size = 0; int size = 0;
@@ -304,11 +306,13 @@ public class CraftWorld implements World { @@ -305,11 +307,13 @@ public class CraftWorld implements World {
size += chunk.tileEntities.size(); size += chunk.tileEntities.size();
} }
return size; return size;
@ -276,7 +276,7 @@ index 60e3a7422045148447a45685f66ed0ebb5172bf6..5fb4f31693f1214617e43228450d2435
int ret = 0; int ret = 0;
for (PlayerChunk chunkHolder : world.getChunkProvider().playerChunkMap.visibleChunks.values()) { for (PlayerChunk chunkHolder : world.getChunkProvider().playerChunkMap.visibleChunks.values()) {
@@ -317,7 +321,7 @@ public class CraftWorld implements World { @@ -318,7 +322,7 @@ public class CraftWorld implements World {
} }
} }
@ -285,7 +285,7 @@ index 60e3a7422045148447a45685f66ed0ebb5172bf6..5fb4f31693f1214617e43228450d2435
} }
public int getPlayerCount() { public int getPlayerCount() {
return world.players.size(); return world.players.size();
@@ -437,6 +441,14 @@ public class CraftWorld implements World { @@ -438,6 +442,14 @@ public class CraftWorld implements World {
@Override @Override
public Chunk[] getLoadedChunks() { public Chunk[] getLoadedChunks() {

View file

@ -617,10 +617,10 @@ index 365539e53efdb7e729b580f52fb23659cbde4f0a..ba50189b10b54f5b35448c898f8c3495
if (!this.isClientSide && (i & 1) != 0) { if (!this.isClientSide && (i & 1) != 0) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 5fb4f31693f1214617e43228450d2435d26202f9..8a37871bea36bd34b514428acea1acad2ba5897e 100644 index 3ec021746ffaea89f09126538fcaa0555872ac17..11559f9e4b3f5fda6bfe4f70f963ce4f7967f051 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2521,10 +2521,39 @@ public class CraftWorld implements World { @@ -2530,10 +2530,39 @@ public class CraftWorld implements World {
// Spigot start // Spigot start
@Override @Override
public int getViewDistance() { public int getViewDistance() {

View file

@ -1208,10 +1208,10 @@ index d7b9d9fd3a3b607278a3d72b0b306b0be2aa30ad..6fd852db6bcfbfbf84ec2acf6d23b08a
public static <T> TicketType<T> a(String s, Comparator<T> comparator) { public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
return new TicketType<>(s, comparator, 0L); return new TicketType<>(s, comparator, 0L);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 8a37871bea36bd34b514428acea1acad2ba5897e..b973bd8f60412232df53ac52d97135de6a6f083b 100644 index 11559f9e4b3f5fda6bfe4f70f963ce4f7967f051..bf2f602bb07aa4c7c0a22ad9be9e77d7fd017191 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2511,6 +2511,10 @@ public class CraftWorld implements World { @@ -2520,6 +2520,10 @@ public class CraftWorld implements World {
return future; return future;
} }

View file

@ -44,10 +44,10 @@ index f408ef0d488d3f602d9254394c6e2e8ecce2f944..3bbc2d78b38f3e6353e80c7d99c16bef
printSaveWarning = false; printSaveWarning = false;
console.autosavePeriod = configuration.getInt("ticks-per.autosave"); console.autosavePeriod = configuration.getInt("ticks-per.autosave");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed552ba8bd8 100644 index bf2f602bb07aa4c7c0a22ad9be9e77d7fd017191..724c0816d89b0261edf65e1b8459988bd0d5d4d8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -401,9 +401,22 @@ public class CraftWorld implements World { @@ -402,9 +402,22 @@ public class CraftWorld implements World {
@Override @Override
public Chunk getChunkAt(int x, int z) { public Chunk getChunkAt(int x, int z) {
@ -71,7 +71,7 @@ index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed5
@Override @Override
public Chunk getChunkAt(Block block) { public Chunk getChunkAt(Block block) {
Preconditions.checkArgument(block != null, "null block"); Preconditions.checkArgument(block != null, "null block");
@@ -477,7 +490,7 @@ public class CraftWorld implements World { @@ -478,7 +491,7 @@ public class CraftWorld implements World {
public boolean unloadChunkRequest(int x, int z) { public boolean unloadChunkRequest(int x, int z) {
org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot org.spigotmc.AsyncCatcher.catchOp("chunk unload"); // Spigot
if (isChunkLoaded(x, z)) { if (isChunkLoaded(x, z)) {
@ -80,7 +80,7 @@ index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed5
} }
return true; return true;
@@ -554,10 +567,12 @@ public class CraftWorld implements World { @@ -555,10 +568,12 @@ public class CraftWorld implements World {
org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot
// Paper start - Optimize this method // Paper start - Optimize this method
ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(x, z); ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(x, z);
@ -94,7 +94,7 @@ index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed5
if (immediate == null) { if (immediate == null) {
immediate = world.getChunkProvider().playerChunkMap.getUnloadingChunk(x, z); immediate = world.getChunkProvider().playerChunkMap.getUnloadingChunk(x, z);
} }
@@ -565,7 +580,7 @@ public class CraftWorld implements World { @@ -566,7 +581,7 @@ public class CraftWorld implements World {
if (!(immediate instanceof ProtoChunkExtension) && !(immediate instanceof net.minecraft.server.Chunk)) { if (!(immediate instanceof ProtoChunkExtension) && !(immediate instanceof net.minecraft.server.Chunk)) {
return false; // not full status return false; // not full status
} }
@ -103,7 +103,7 @@ index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed5
world.getChunkAt(x, z); // make sure we're at ticket level 32 or lower world.getChunkAt(x, z); // make sure we're at ticket level 32 or lower
return true; return true;
} }
@@ -592,7 +607,7 @@ public class CraftWorld implements World { @@ -593,7 +608,7 @@ public class CraftWorld implements World {
// we do this so we do not re-read the chunk data on disk // we do this so we do not re-read the chunk data on disk
} }
@ -112,7 +112,7 @@ index b973bd8f60412232df53ac52d97135de6a6f083b..fb24b9d072ff3f57cbd40609b1550ed5
world.getChunkProvider().getChunkAt(x, z, ChunkStatus.FULL, true); world.getChunkProvider().getChunkAt(x, z, ChunkStatus.FULL, true);
return true; return true;
// Paper end // Paper end
@@ -2517,6 +2532,7 @@ public class CraftWorld implements World { @@ -2526,6 +2541,7 @@ public class CraftWorld implements World {
} }
return this.world.getChunkProvider().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> { return this.world.getChunkProvider().getChunkAtAsynchronously(x, z, gen, urgent).thenComposeAsync((either) -> {
net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null); net.minecraft.server.Chunk chunk = (net.minecraft.server.Chunk) either.left().orElse(null);

@ -1 +1 @@
Subproject commit 42d5a714f434eb1324dfef1b38218d7e40c67644 Subproject commit e16de3bb167910ba20339d2cb5f5c798827f196a

@ -1 +1 @@
Subproject commit fdf6017fa9ea64ddcfa2f2a7d69cda824b381b38 Subproject commit a13b8cfc71be4eb2c7880024a1ae191bbfd51131