Updated Upstream (Bukkit/CraftBukkit/Spigot)

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:
bf1fa3e3 Update to Minecraft 1.15.1

CraftBukkit Changes:
30a1b691 Update to Minecraft 1.15.1
e2790ae2 Remove outdated build delay.

Spigot Changes:
2ee05fef Update to Minecraft 1.15.1
This commit is contained in:
Shane Freeder 2019-12-17 22:39:07 +00:00
parent 4cf63749d5
commit 8e972bf5aa
No known key found for this signature in database
GPG key ID: A3F61EA5A085289C
31 changed files with 270 additions and 282 deletions

View file

@ -1,11 +1,11 @@
From cc8002ef8dee63701f56047bc02977182517f71a Mon Sep 17 00:00:00 2001
From 9556d6e73175d5674058d56c48928d2e0cab3006 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 00:16:08 +0100
Subject: [PATCH] POM changes
diff --git a/pom.xml b/pom.xml
index 78388c20..3617d769 100644
index fd011758..416da4ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2,34 +2,28 @@
@ -22,7 +22,7 @@ index 78388c20..3617d769 100644
- <artifactId>spigot-api</artifactId>
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId>
<version>1.15-R0.1-SNAPSHOT</version>
<version>1.15.1-R0.1-SNAPSHOT</version>
<packaging>jar</packaging>
- <name>Spigot-API</name>
@ -111,5 +111,5 @@ index 78388c20..3617d769 100644
<shadedArtifactAttached>true</shadedArtifactAttached>
</configuration>
--
2.24.0
2.24.1

View file

@ -1,11 +1,11 @@
From 339971bbe80a3c79b0221846d5714fae8f6c501a Mon Sep 17 00:00:00 2001
From 92d645237db7b0287e09f0610f95643d701fad80 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 5243c0321..ae1de6d01 100644
index b1a12eca1..22e4ce22a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,15 +1,14 @@
@ -16,7 +16,7 @@ index 5243c0321..ae1de6d01 100644
- <artifactId>spigot</artifactId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.15-R0.1-SNAPSHOT</version>
<version>1.15.1-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>https://www.spigotmc.org/</url>
+ <name>Paper</name>
@ -27,7 +27,7 @@ index 5243c0321..ae1de6d01 100644
+ <!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<api.version>unknown</api.version>
<minecraft.version>1.15</minecraft.version>
<minecraft.version>1.15.1</minecraft.version>
@@ -22,16 +21,16 @@
</properties>
@ -159,5 +159,5 @@ index 93046379d..674096cab 100644
if (stream != null) {
--
2.24.0
2.24.1

View file

@ -1,11 +1,11 @@
From ba2a355955cf55d5ece6e390a2316420ceefdd36 Mon Sep 17 00:00:00 2001
From 99ee1ad8a97e5391d783116aa7806180212f601f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
index 960dce2307..253890e537 100644
index 960dce230..253890e53 100644
--- a/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
@@ -54,7 +54,7 @@ public abstract class BiomeBase {
@ -27,7 +27,7 @@ index 960dce2307..253890e537 100644
public List<WorldGenFeatureConfigured<?, ?>> g() {
diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java
index cd277dd17f..ab05425793 100644
index ab03b5568..1cf97cefc 100644
--- a/src/main/java/net/minecraft/server/BlockDataAbstract.java
+++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java
@@ -29,7 +29,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
@ -39,7 +39,7 @@ index cd277dd17f..ab05425793 100644
}
};
protected final O a;
@@ -44,11 +44,11 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
@@ -42,11 +42,11 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
}
public <T extends Comparable<T>> S a(IBlockState<T> iblockstate) {
@ -53,7 +53,7 @@ index cd277dd17f..ab05425793 100644
do {
if (!iterator.hasNext()) {
@@ -91,7 +91,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
@@ -89,7 +89,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
if (comparable == null) {
throw new IllegalArgumentException("Cannot get property " + iblockstate + " as it does not exist in " + this.a);
} else {
@ -62,17 +62,17 @@ index cd277dd17f..ab05425793 100644
}
}
@@ -102,7 +102,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
@@ -100,7 +100,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
if (comparable == null) {
throw new IllegalArgumentException("Cannot set property " + iblockstate + " as it does not exist in " + this.a);
} else if (comparable == v0) {
- return this;
+ return (S) this; // Paper - decompiler fix
} else {
S s0 = this.f.get(iblockstate, v0);
S s0 = this.e.get(iblockstate, v0);
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index e40f9c153b..c88a62f6b7 100644
index e40f9c153..c88a62f6b 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
@ -92,7 +92,7 @@ index e40f9c153b..c88a62f6b7 100644
});
}
diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java
index 28cfbaae28..1486d460c8 100644
index 28cfbaae2..1486d460c 100644
--- a/src/main/java/net/minecraft/server/BlockStateEnum.java
+++ b/src/main/java/net/minecraft/server/BlockStateEnum.java
@@ -20,10 +20,10 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
@ -109,7 +109,7 @@ index 28cfbaae28..1486d460c8 100644
if (this.b.containsKey(s1)) {
diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java
index 68a601bac5..efdf611e66 100644
index 68a601bac..efdf611e6 100644
--- a/src/main/java/net/minecraft/server/ChunkStatus.java
+++ b/src/main/java/net/minecraft/server/ChunkStatus.java
@@ -84,7 +84,7 @@ public class ChunkStatus {
@ -122,7 +122,7 @@ index 68a601bac5..efdf611e66 100644
for (int j = a().size() - 1; j >= 0; --j) {
diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java
index 2dd27edc83..6def3616ef 100644
index 2dd27edc8..6def3616e 100644
--- a/src/main/java/net/minecraft/server/CraftingManager.java
+++ b/src/main/java/net/minecraft/server/CraftingManager.java
@@ -58,7 +58,7 @@ public class CraftingManager extends ResourceDataJson {
@ -135,7 +135,7 @@ index 2dd27edc83..6def3616ef 100644
CraftingManager.LOGGER.info("Loaded {} recipes", map1.size());
}
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
index f2c0e06bab..909d13c427 100644
index f2c0e06ba..909d13c42 100644
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
@@ -376,7 +376,7 @@ public class EnderDragonBattle {
@ -157,7 +157,7 @@ index f2c0e06bab..909d13c427 100644
private EntityEnderDragon o() {
diff --git a/src/main/java/net/minecraft/server/EntityFireballFireball.java b/src/main/java/net/minecraft/server/EntityFireballFireball.java
index 8e28c4725a..3988e68d4f 100644
index 8e28c4725..3988e68d4 100644
--- a/src/main/java/net/minecraft/server/EntityFireballFireball.java
+++ b/src/main/java/net/minecraft/server/EntityFireballFireball.java
@@ -18,7 +18,7 @@ public abstract class EntityFireballFireball extends EntityFireball {
@ -170,7 +170,7 @@ index 8e28c4725a..3988e68d4f 100644
}));
}
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
index 7d44348c78..73ecdd22ea 100644
index 7d44348c7..73ecdd22e 100644
--- a/src/main/java/net/minecraft/server/EntityVindicator.java
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java
@@ -25,7 +25,7 @@ public class EntityVindicator extends EntityIllagerAbstract {
@ -183,7 +183,7 @@ index 7d44348c78..73ecdd22ea 100644
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true));
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true));
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
index 1f3ea23ae1..b098d86e3a 100644
index 1f3ea23ae..b098d86e3 100644
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
@@ -55,7 +55,7 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
@ -213,7 +213,7 @@ index 1f3ea23ae1..b098d86e3a 100644
}
}
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
index 3be9efd22c..3a1ad2346b 100644
index 3be9efd22..3a1ad2346 100644
--- a/src/main/java/net/minecraft/server/IBlockData.java
+++ b/src/main/java/net/minecraft/server/IBlockData.java
@@ -281,12 +281,12 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
@ -253,7 +253,7 @@ index 3be9efd22c..3a1ad2346b 100644
for (i = 0; i < k; ++i) {
diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java
index a2bbca22b5..c8512f9f41 100644
index a2bbca22b..c8512f9f4 100644
--- a/src/main/java/net/minecraft/server/IEntityAccess.java
+++ b/src/main/java/net/minecraft/server/IEntityAccess.java
@@ -47,7 +47,7 @@ public interface IEntityAccess {
@ -314,7 +314,7 @@ index a2bbca22b5..c8512f9f41 100644
if (pathfindertargetcondition.a(entityliving, t0)) {
list1.add(t0);
diff --git a/src/main/java/net/minecraft/server/IOWorker.java b/src/main/java/net/minecraft/server/IOWorker.java
index a986f2912f..c5658c0779 100644
index a986f2912..c5658c077 100644
--- a/src/main/java/net/minecraft/server/IOWorker.java
+++ b/src/main/java/net/minecraft/server/IOWorker.java
@@ -46,7 +46,7 @@ public class IOWorker implements AutoCloseable {
@ -354,7 +354,7 @@ index a986f2912f..c5658c0779 100644
IOWorker.LOGGER.error("Failed to close storage", exception);
this.h.completeExceptionally(exception);
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
index 59bb535431..3ed6a1e785 100644
index 59bb53543..3ed6a1e78 100644
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
@@ -125,7 +125,7 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
@ -382,7 +382,7 @@ index 59bb535431..3ed6a1e785 100644
}
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
index 829a7ae0a2..8b9e47b4c7 100644
index 829a7ae0a..8b9e47b4c 100644
--- a/src/main/java/net/minecraft/server/NBTBase.java
+++ b/src/main/java/net/minecraft/server/NBTBase.java
@@ -18,7 +18,7 @@ public interface NBTBase {
@ -395,7 +395,7 @@ index 829a7ae0a2..8b9e47b4c7 100644
default String asString() {
return this.toString();
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
index 22035b6c0b..5406f4c40f 100644
index 22035b6c0..5406f4c40 100644
--- a/src/main/java/net/minecraft/server/NBTTagList.java
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
@@ -51,7 +51,7 @@ public class NBTTagList extends NBTList<NBTBase> {
@ -408,7 +408,7 @@ index 22035b6c0b..5406f4c40f 100644
private byte type;
diff --git a/src/main/java/net/minecraft/server/NextTickListEntry.java b/src/main/java/net/minecraft/server/NextTickListEntry.java
index 8471920b8b..e9c405fb53 100644
index 8471920b8..e9c405fb5 100644
--- a/src/main/java/net/minecraft/server/NextTickListEntry.java
+++ b/src/main/java/net/minecraft/server/NextTickListEntry.java
@@ -37,13 +37,13 @@ public class NextTickListEntry<T> {
@ -430,7 +430,7 @@ index 8471920b8b..e9c405fb53 100644
}
diff --git a/src/main/java/net/minecraft/server/RegionFileSection.java b/src/main/java/net/minecraft/server/RegionFileSection.java
index 737afc7d71..db9f0196bd 100644
index 737afc7d7..db9f0196b 100644
--- a/src/main/java/net/minecraft/server/RegionFileSection.java
+++ b/src/main/java/net/minecraft/server/RegionFileSection.java
@@ -83,9 +83,9 @@ public class RegionFileSection<R extends MinecraftSerializable> implements AutoC
@ -455,7 +455,7 @@ index 737afc7d71..db9f0196bd 100644
}, dynamic2);
});
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
index 7f89562e90..4efcb8b595 100644
index 7f89562e9..4efcb8b59 100644
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
@@ -27,7 +27,7 @@ public class RegistryBlockID<T> implements Registry<T> {
@ -468,7 +468,7 @@ index 7f89562e90..4efcb8b595 100644
this.c.set(i, t0);
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
index 4cb78c6a3f..e15d286710 100644
index 4cb78c6a3..e15d28671 100644
--- a/src/main/java/net/minecraft/server/RegistryID.java
+++ b/src/main/java/net/minecraft/server/RegistryID.java
@@ -17,9 +17,9 @@ public class RegistryID<K> implements Registry<K> {
@ -496,7 +496,7 @@ index 4cb78c6a3f..e15d286710 100644
this.f = 0;
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
index 8534585eb1..7b92ecfff9 100644
index 8534585eb..7b92ecfff 100644
--- a/src/main/java/net/minecraft/server/SystemUtils.java
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
@@ -45,8 +45,8 @@ public class SystemUtils {
@ -540,7 +540,7 @@ index 8534585eb1..7b92ecfff9 100644
if (throwable != null) {
completablefuture.completeExceptionally(throwable);
diff --git a/src/main/java/net/minecraft/server/Ticket.java b/src/main/java/net/minecraft/server/Ticket.java
index ee2059cf8e..77bb6b092a 100644
index ee2059cf8..77bb6b092 100644
--- a/src/main/java/net/minecraft/server/Ticket.java
+++ b/src/main/java/net/minecraft/server/Ticket.java
@@ -23,7 +23,7 @@ public final class Ticket<T> implements Comparable<Ticket<?>> {
@ -553,7 +553,7 @@ index ee2059cf8e..77bb6b092a 100644
}
diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java
index c137484f66..c999f8c9bf 100644
index c137484f6..c999f8c9b 100644
--- a/src/main/java/net/minecraft/server/VillagePlace.java
+++ b/src/main/java/net/minecraft/server/VillagePlace.java
@@ -165,7 +165,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
@ -584,7 +584,7 @@ index c137484f66..c999f8c9bf 100644
}
diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java
index a06a31534e..3bcf0b385d 100644
index a06a31534..3bcf0b385 100644
--- a/src/main/java/net/minecraft/server/VillagerTrades.java
+++ b/src/main/java/net/minecraft/server/VillagerTrades.java
@@ -15,12 +15,12 @@ import javax.annotation.Nullable;
@ -604,7 +604,7 @@ index a06a31534e..3bcf0b385d 100644
hashmap.put(VillagerProfession.CLERIC, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.ROTTEN_FLESH, 32, 16, 2), new VillagerTrades.h(Items.REDSTONE, 1, 2, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.GOLD_INGOT, 3, 12, 10), new VillagerTrades.h(Items.LAPIS_LAZULI, 1, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.RABBIT_FOOT, 2, 12, 20), new VillagerTrades.h(Blocks.GLOWSTONE, 4, 1, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SCUTE, 4, 12, 30), new VillagerTrades.b(Items.GLASS_BOTTLE, 9, 12, 30), new VillagerTrades.h(Items.ENDER_PEARL, 5, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.NETHER_WART, 22, 12, 30), new VillagerTrades.h(Items.EXPERIENCE_BOTTLE, 3, 1, 30)})));
hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COAL, 15, 16, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 12, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 12, 10), new VillagerTrades.h(new ItemStack(Items.pQ), 36, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 12, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 12, 20), new VillagerTrades.b(Items.DIAMOND, 1, 12, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 12, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 3, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 3, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 3, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 3, 30, 0.2F)})));
diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java b/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
index 555cf6be79..22e14fe1e9 100644
index 555cf6be7..22e14fe1e 100644
--- a/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
+++ b/src/main/java/net/minecraft/server/WorldGenFeatureStateProviderWeighted.java
@@ -40,6 +40,6 @@ public class WorldGenFeatureStateProviderWeighted extends WorldGenFeatureStatePr
@ -616,7 +616,7 @@ index 555cf6be79..22e14fe1e9 100644
}
}
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index 55fe7625af..19e68a7831 100644
index 55fe7625a..19e68a783 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -37,7 +37,7 @@ public class WorldPersistentData {

View file

@ -1,4 +1,4 @@
From f12b98bad12de4ca35307b5f30aad81540538aa3 Mon Sep 17 00:00:00 2001
From a0b808cc25884976a9235109a107fa6f2e6916a2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:55:47 -0400
Subject: [PATCH] MC Utils
@ -28,10 +28,10 @@ index eff6ebcd3..30cbfc8ea 100644
public IBlockData getType(BlockPosition blockposition) {
return Blocks.AIR.getBlockData();
diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java
index ab0542579..b3fe95d85 100644
index 1cf97cefc..2040f1834 100644
--- a/src/main/java/net/minecraft/server/BlockDataAbstract.java
+++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java
@@ -80,6 +80,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
@@ -78,6 +78,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
return Collections.unmodifiableCollection(this.d.keySet());
}
@ -292,7 +292,7 @@ index fe69161e5..b40c8d2f8 100644
super(entitytypes, world);
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 39d7df1d4..e0434ff12 100644
index e1398652a..7ee5eb987 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -144,6 +144,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -425,7 +425,7 @@ index ba315131e..cbe2aa4c0 100644
IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag);
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 06360cf7c..8e8fab497 100644
index b5d45b43c..766b1fe13 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -37,10 +37,19 @@ import org.bukkit.event.world.StructureGrowEvent;
@ -466,8 +466,8 @@ index 06360cf7c..8e8fab497 100644
+ // Paper end
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
this.tag = nbttagcompound;
// CraftBukkit start - ensure null tags do not get inappropriately used (SpigotCraft#463)
@@ -686,6 +706,7 @@ public final class ItemStack {
if (this.getItem().usesDurability()) {
@@ -685,6 +705,7 @@ public final class ItemStack {
return this.tag != null && this.tag.hasKeyOfType("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false;
}
@ -475,7 +475,7 @@ index 06360cf7c..8e8fab497 100644
public void a(String s, NBTBase nbtbase) {
this.getOrCreateTag().set(s, nbtbase);
}
@@ -762,6 +783,7 @@ public final class ItemStack {
@@ -761,6 +782,7 @@ public final class ItemStack {
// CraftBukkit start
@Deprecated
public void setItem(Item item) {
@ -996,7 +996,7 @@ index 6e65306a2..39339fa27 100644
public IBlockData getType(BlockPosition blockposition) {
int i = blockposition.getY();
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 8d1717340..1d0741c1e 100644
index 7b6e0e86b..187c4e0f5 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -88,6 +88,7 @@ public class RegionFile implements AutoCloseable {
@ -1064,7 +1064,7 @@ index 7b92ecfff..7e224ebef 100644
public static long getTimeMillis() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 602a395b3..66f74c106 100644
index 5c3226dd7..3122a02ab 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -196,6 +196,40 @@ public abstract class World implements GeneratorAccess, AutoCloseable {

View file

@ -1,4 +1,4 @@
From 477a2ecc887625d1f34ed0d559958abe1a38b477 Mon Sep 17 00:00:00 2001
From 12ab0732e7d8d1f9effeeaa572a87794c57b2a21 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -335,7 +335,7 @@ index b6d470e59..f402a29b0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 0bae8a335..e485d4a82 100644
index cd72a9c84..5de881371 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -31,6 +31,15 @@ public class Block implements IMaterial {
@ -944,7 +944,7 @@ index 0d78187ae..490de37b6 100644
this.methodProfiler.exit();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index ae0b9208a..b8fa59775 100644
index a4b246dc4..cd1579750 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,7 +1,9 @@
@ -957,7 +957,7 @@ index ae0b9208a..b8fa59775 100644
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
@@ -473,8 +475,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -477,8 +479,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> f(ChunkCoordIntPair chunkcoordintpair) {
return CompletableFuture.supplyAsync(() -> {
@ -971,7 +971,7 @@ index ae0b9208a..b8fa59775 100644
if (nbttagcompound != null) {
boolean flag = nbttagcompound.hasKeyOfType("Level", 10) && nbttagcompound.getCompound("Level").hasKeyOfType("Status", 8);
@@ -511,7 +516,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -515,7 +520,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
});
return completablefuture.thenComposeAsync((either) -> {
@ -980,7 +980,7 @@ index ae0b9208a..b8fa59775 100644
try {
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> {
return this.c(playerchunk);
@@ -564,6 +569,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -568,6 +573,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
ChunkStatus chunkstatus = PlayerChunk.getChunkStatus(playerchunk.getTicketLevel());
return !chunkstatus.b(ChunkStatus.FULL) ? PlayerChunk.UNLOADED_CHUNK_ACCESS : either.mapLeft((ichunkaccess) -> {
@ -988,7 +988,7 @@ index ae0b9208a..b8fa59775 100644
ChunkCoordIntPair chunkcoordintpair = playerchunk.i();
Chunk chunk;
@@ -615,6 +621,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -619,6 +625,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
return chunk;
@ -996,7 +996,7 @@ index ae0b9208a..b8fa59775 100644
});
}, (runnable) -> {
Mailbox mailbox = this.mailboxMain;
@@ -1051,6 +1058,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1055,6 +1062,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker;
ObjectIterator objectiterator;
@ -1004,7 +1004,7 @@ index ae0b9208a..b8fa59775 100644
for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) {
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
@@ -1068,16 +1076,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1072,16 +1080,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
playerchunkmap_entitytracker.e = sectionposition1;
}
}
@ -1201,7 +1201,7 @@ index 820180ab3..fa6400dcc 100644
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
public CraftPersistentDataContainer persistentDataContainer;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 526466c2e..36ed7a7a0 100644
index 3122a02ab..a88ca336d 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,7 @@
@ -1767,7 +1767,7 @@ index e52ef47b7..3d90b3426 100644
this.value = value;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 8e23c4750..48a191ae0 100644
index adad3a0fa..7d22aaffb 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -288,6 +288,13 @@ public final class CraftMagicNumbers implements UnsafeValues {

View file

@ -1,4 +1,4 @@
From 78beb804696f00b03b7d198577819a7d2aaabc0a Mon Sep 17 00:00:00 2001
From f412c674a6f0cae1ba9680b6f8666c9d49f87813 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Wed, 2 Mar 2016 23:13:07 -0600
Subject: [PATCH] Send absolute position the first time an entity is seen
@ -77,10 +77,10 @@ index a75e0ec54..a13fd9b34 100644
this.c();
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index b8fa59775..25eb8f648 100644
index cd1579750..17275c35f 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1177,10 +1177,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1181,10 +1181,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private final Entity tracker;
private final int trackingDistance;
private SectionPosition e;
@ -97,7 +97,7 @@ index b8fa59775..25eb8f648 100644
this.tracker = entity;
this.trackingDistance = i;
this.e = SectionPosition.a(entity);
@@ -1262,7 +1266,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1266,7 +1270,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId()));
// CraftBukkit end
@ -107,5 +107,5 @@ index b8fa59775..25eb8f648 100644
}
} else if (this.trackedPlayers.remove(entityplayer)) {
--
2.24.0
2.24.1

View file

@ -1,4 +1,4 @@
From 2d85b4d6ccdb57f5b99d35b4c16817f7c2cb1906 Mon Sep 17 00:00:00 2001
From 3ac6d5034d4d79744302c6eddf3aefc23ef9678a Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event
@ -121,10 +121,10 @@ index c9c2b0025..1422503e1 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 25eb8f648..1d4eddd93 100644
index 17275c35f..0886ab11d 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -690,6 +690,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -694,6 +694,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.world.checkSession();
} catch (ExceptionWorldConflict exceptionworldconflict) {
PlayerChunkMap.LOGGER.error("Couldn't save chunk; already in use by another instance of Minecraft?", exceptionworldconflict);
@ -132,7 +132,7 @@ index 25eb8f648..1d4eddd93 100644
return false;
}
@@ -717,6 +718,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -721,6 +722,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return true;
} catch (Exception exception) {
PlayerChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception);
@ -141,7 +141,7 @@ index 25eb8f648..1d4eddd93 100644
}
}
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 1d0741c1e..d1f4c4724 100644
index 187c4e0f5..c2312a227 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -241,6 +241,7 @@ public class RegionFile implements AutoCloseable {
@ -189,7 +189,7 @@ index 8ba344df6..02157d051 100644
}
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index a8d1a0727..90e863280 100644
index d5e9bae70..1bcf01c09 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -1,5 +1,7 @@
@ -209,7 +209,7 @@ index a8d1a0727..90e863280 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 464a8da31..5d8404f8a 100644
index 91cde6351..e89ea2403 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2,6 +2,9 @@ package net.minecraft.server;

View file

@ -1,4 +1,4 @@
From 733d2f61b89c8b2061a6352570870c6444b609d8 Mon Sep 17 00:00:00 2001
From 37b97c56b4967b2c92502eb50025a425499501e7 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
@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
ItemMeta API equivalents, and should deprecate the old API's.
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 8e8fab497..0a1596ff0 100644
index 766b1fe13..213e3779d 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader;
@ -67,10 +67,10 @@ index 8e8fab497..0a1596ff0 100644
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
this.tag = nbttagcompound;
+ processEnchantOrder(this.tag); // Paper
// CraftBukkit start - ensure null tags do not get inappropriately used (SpigotCraft#463)
if (this.tag == null && this.item != null && this.item.usesDurability()) {
if (this.getItem().usesDurability()) {
this.setDamage(this.getDamage());
@@ -700,6 +721,7 @@ public final class ItemStack {
}
@@ -699,6 +720,7 @@ public final class ItemStack {
nbttagcompound.setString("id", String.valueOf(IRegistry.ENCHANTMENT.getKey(enchantment)));
nbttagcompound.setShort("lvl", (short) ((byte) i));
nbttaglist.add(nbttagcompound);
@ -79,7 +79,7 @@ index 8e8fab497..0a1596ff0 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 15e3edee2..410444747 100644
index 4a9132c70..3dd912abe 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 {
@ -330,5 +330,5 @@ index 0f901453d..5ee968f2e 100644
+
}
--
2.24.0
2.24.1

View file

@ -1,4 +1,4 @@
From d7df64d30bc7aabaa32fb4a6c58c89b21f33eee7 Mon Sep 17 00:00:00 2001
From 0a6ac5cc3a320acdc364fea28615f8565825bb37 Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Sun, 16 Oct 2016 23:19:30 -0700
Subject: [PATCH] Add EntityZapEvent
@ -22,10 +22,10 @@ index 5c24e22c7..8d277566e 100644
if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
return;
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 27afee2e3..00300c6aa 100644
index 1eca7f354..8b85956e5 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -678,6 +678,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -681,6 +681,12 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
public void onLightningStrike(EntityLightning entitylightning) {
EntityWitch entitywitch = (EntityWitch) EntityTypes.WITCH.a(this.world);
@ -58,5 +58,5 @@ index de26145ee..ba14f66f7 100644
HorseJumpEvent event = new HorseJumpEvent((AbstractHorse) horse.getBukkitEntity(), power);
horse.getBukkitEntity().getServer().getPluginManager().callEvent(event);
--
2.17.1
2.24.1

View file

@ -1,4 +1,4 @@
From f6485f8e7bacc338b5d415867da10c8ea455809f Mon Sep 17 00:00:00 2001
From 0050e0fa6932fe76fa2536579df095b8a45a893b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 16:31:46 -0500
Subject: [PATCH] ExperienceOrbs API for Reason/Source/Triggering player
@ -8,7 +8,7 @@ Adds lots of information about why this orb exists.
Replaces isFromBottle() with logic that persists entity reloads too.
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index e485d4a82c..3e4fc4ee5e 100644
index 5de881371..5f261b9b9 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -511,13 +511,13 @@ public class Block implements IMaterial {
@ -28,7 +28,7 @@ index e485d4a82c..3e4fc4ee5e 100644
}
diff --git a/src/main/java/net/minecraft/server/ContainerGrindstone.java b/src/main/java/net/minecraft/server/ContainerGrindstone.java
index 2d2cd09ad1..ed88e208d0 100644
index 2d2cd09ad..ed88e208d 100644
--- a/src/main/java/net/minecraft/server/ContainerGrindstone.java
+++ b/src/main/java/net/minecraft/server/ContainerGrindstone.java
@@ -81,7 +81,7 @@ public class ContainerGrindstone extends Container {
@ -41,7 +41,7 @@ index 2d2cd09ad1..ed88e208d0 100644
world.triggerEffect(1042, blockposition, 0);
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index e0d240a89a..07abcc1e24 100644
index e0d240a89..07abcc1e2 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -616,7 +616,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
@ -54,7 +54,7 @@ index e0d240a89a..07abcc1e24 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index 0447800d9d..d4275e733d 100644
index 0447800d9..d4275e733 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -16,9 +16,59 @@ public class EntityExperienceOrb extends Entity {
@ -134,7 +134,7 @@ index 0447800d9d..d4275e733d 100644
@Override
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 8ad0d0db18..8d48154e5b 100644
index 8ad0d0db1..8d48154e5 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -401,7 +401,7 @@ public class EntityFishingHook extends Entity {
@ -147,7 +147,7 @@ index 8ad0d0db18..8d48154e5b 100644
// CraftBukkit end
if (itemstack1.getItem().a(TagsItem.FISHES)) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 191e7dfaf6..be85a76acd 100644
index 191e7dfaf..be85a76ac 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1377,7 +1377,8 @@ public abstract class EntityLiving extends Entity {
@ -161,7 +161,7 @@ index 191e7dfaf6..be85a76acd 100644
this.expToDrop = 0;
}
diff --git a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
index 0bfc0a773d..ba2f90cc6a 100644
index 0bfc0a773..ba2f90cc6 100644
--- a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
+++ b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
@@ -43,7 +43,7 @@ public class EntityThrownExpBottle extends EntityProjectileThrowable {
@ -174,7 +174,7 @@ index 0bfc0a773d..ba2f90cc6a 100644
this.die();
diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java
index c73cc9ae4b..76296119a1 100644
index c73cc9ae4..76296119a 100644
--- a/src/main/java/net/minecraft/server/EntityTurtle.java
+++ b/src/main/java/net/minecraft/server/EntityTurtle.java
@@ -510,7 +510,7 @@ public class EntityTurtle extends EntityAnimal {
@ -187,10 +187,10 @@ index c73cc9ae4b..76296119a1 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index fddc28cd13..3b4a3a4fd2 100644
index 8b85956e5..8b0c40147 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -506,7 +506,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -509,7 +509,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
}
if (merchantrecipe.isRewardExp()) {
@ -200,7 +200,7 @@ index fddc28cd13..3b4a3a4fd2 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityVillagerTrader.java b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
index fa814814fc..14ccf33c09 100644
index 530c69996..2ad8dba5c 100644
--- a/src/main/java/net/minecraft/server/EntityVillagerTrader.java
+++ b/src/main/java/net/minecraft/server/EntityVillagerTrader.java
@@ -147,7 +147,7 @@ public class EntityVillagerTrader extends EntityVillagerAbstract {
@ -213,7 +213,7 @@ index fa814814fc..14ccf33c09 100644
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
index 1ab2668e91..2b708761d0 100644
index 1ab2668e9..2b708761d 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
@@ -117,7 +117,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
@ -226,7 +226,7 @@ index 1ab2668e91..2b708761d0 100644
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 46154b2810..56f249c431 100644
index 46154b281..56f249c43 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -374,7 +374,7 @@ public class PlayerInteractManager {
@ -239,7 +239,7 @@ index 46154b2810..56f249c431 100644
return true;
diff --git a/src/main/java/net/minecraft/server/SlotFurnaceResult.java b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
index d2698e847c..edc4a5c34e 100644
index d2698e847..edc4a5c34 100644
--- a/src/main/java/net/minecraft/server/SlotFurnaceResult.java
+++ b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
@@ -2,7 +2,7 @@ package net.minecraft.server;
@ -252,7 +252,7 @@ index d2698e847c..edc4a5c34e 100644
public SlotFurnaceResult(EntityHuman entityhuman, IInventory iinventory, int i, int j, int k) {
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
index 2a51a241ee..0419aea923 100644
index 2a51a241e..0419aea92 100644
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -554,7 +554,7 @@ public abstract class TileEntityFurnace extends TileEntityContainer implements I
@ -265,7 +265,7 @@ index 2a51a241ee..0419aea923 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 2abebd465a..1e59f3f147 100644
index 2abebd465..1e59f3f14 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1773,7 +1773,7 @@ public class CraftWorld implements World {
@ -278,7 +278,7 @@ index 2abebd465a..1e59f3f147 100644
entity = new EntityLightning(world, x, y, z, false);
} else if (Firework.class.isAssignableFrom(clazz)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
index 1b512cc45c..fbad045675 100644
index 1b512cc45..fbad04567 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
@@ -20,6 +20,18 @@ public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb {

View file

@ -1,11 +1,11 @@
From ef5f87f2ce646100c67be2d67abf14c1e210539f Mon Sep 17 00:00:00 2001
From eb4aafb32370e25b946c1ea98df597aae2c31e84 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 7 Feb 2017 16:55:35 -0600
Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 1d4eddd931..492d1538fa 100644
index 0886ab11d..122e46e66 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -110,7 +110,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -17,7 +17,7 @@ index 1d4eddd931..492d1538fa 100644
this.definedStructureManager = definedstructuremanager;
this.w = worldserver.getWorldProvider().getDimensionManager().a(file);
this.world = worldserver;
@@ -356,7 +356,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -360,7 +360,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// Spigot start
org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant;
activityAccountant.startActivity(0.5);
@ -26,7 +26,7 @@ index 1d4eddd931..492d1538fa 100644
// Spigot end
while (longiterator.hasNext()) { // Spigot
long j = longiterator.nextLong();
@@ -378,7 +378,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -382,7 +382,8 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
Runnable runnable;

View file

@ -1,4 +1,4 @@
From 36a38d68e42ce672b6fd3e116f292b911b2458bc Mon Sep 17 00:00:00 2001
From 7dce63362bb6c3841f8c6418d4eeae0271fbcbfb Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 14 Jan 2018 17:36:02 -0500
Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent
@ -9,10 +9,10 @@ from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 492d1538fa..df24bac3bb 100644
index 122e46e66..6012b86f1 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -843,12 +843,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -847,12 +847,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange;
chunkRange = (chunkRange > 8) ? 8 : chunkRange;

View file

@ -1,4 +1,4 @@
From 602aee708d913111e6007e8fd3171a22eb56d68e Mon Sep 17 00:00:00 2001
From 9d46828b5e69a5ea24167b4696db0428520a559a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 30 Apr 2018 13:15:55 -0400
Subject: [PATCH] EndermanEscapeEvent
@ -8,7 +8,7 @@ Fires an event anytime an enderman intends to teleport away from the player
You may cancel this, enabling ranged attacks to damage the enderman for example.
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
index 4519be39ad..60ff027700 100644
index 1cc66108d..37ca65209 100644
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
@ -33,7 +33,7 @@ index 4519be39ad..60ff027700 100644
public boolean setGoalTarget(EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) {
if (!super.setGoalTarget(entityliving, reason, fireEvent)) {
@@ -177,7 +184,7 @@ public class EntityEnderman extends EntityMonster {
if (this.world.J() && this.ticksLived >= this.bA + 600) {
if (this.world.isDay() && this.ticksLived >= this.bA + 600) {
float f = this.aI();
- if (f > 0.5F && this.world.f(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {

View file

@ -1,4 +1,4 @@
From 104ce7173d93de75875e8bbc031b0f732e146a50 Mon Sep 17 00:00:00 2001
From b4ce7aea9124f040e0957161a0968112fc2ff61f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 08:25:40 -0400
Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
Add -Ddebug.entities=true to your JVM flags to gain more information
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 5823b3740d..3458333c9b 100644
index 5823b3740..3458333c9 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -76,6 +76,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -19,10 +19,10 @@ index 5823b3740d..3458333c9b 100644
if (bukkitEntity == null) {
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index df24bac3bb..a2b09597f3 100644
index 6012b86f1..c97349010 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1022,6 +1022,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1026,6 +1026,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
} else {
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker = new PlayerChunkMap.EntityTracker(entity, i, j, entitytypes.isDeltaTracking());
@ -30,7 +30,7 @@ index df24bac3bb..a2b09597f3 100644
this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker);
playerchunkmap_entitytracker.track(this.world.getPlayers());
if (entity instanceof EntityPlayer) {
@@ -1064,7 +1065,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1068,7 +1069,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
if (playerchunkmap_entitytracker1 != null) {
playerchunkmap_entitytracker1.a();
}
@ -40,7 +40,7 @@ index df24bac3bb..a2b09597f3 100644
protected void g() {
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 8b2ee61b3b..5d04d13012 100644
index 838651c78..5d0a14577 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -67,6 +67,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -52,7 +52,7 @@ index 8b2ee61b3b..5d04d13012 100644
public boolean captureBlockStates = false;
public boolean captureTreeGeneration = false;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7d99d34ae5..0cd48c5bcf 100644
index 7d99d34ae..0cd48c5bc 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -75,6 +75,9 @@ public class WorldServer extends World {

View file

@ -1,11 +1,11 @@
From 7b08bd7cae7ecf463db026f974328faaa3ef6956 Mon Sep 17 00:00:00 2001
From 1ed0683c782e99636f6ba63841577d7f335dca2b Mon Sep 17 00:00:00 2001
From: Anthony MacAllister <anthonymmacallister@gmail.com>
Date: Thu, 26 Jul 2018 15:30:03 -0400
Subject: [PATCH] EntityTransformedEvent
diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java
index 1fff4ce63c..efde7bd1d7 100644
index 1fff4ce63..efde7bd1d 100644
--- a/src/main/java/net/minecraft/server/EntityMushroomCow.java
+++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java
@@ -116,6 +116,7 @@ public class EntityMushroomCow extends EntityCow {
@ -17,10 +17,10 @@ index 1fff4ce63c..efde7bd1d7 100644
this.die(); // CraftBukkit - from above
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 3b4a3a4fd2..11e168a8ea 100644
index 8b0c40147..572723005 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -696,6 +696,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
@@ -699,6 +699,7 @@ public class EntityVillager extends EntityVillagerAbstract implements Reputation
if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) {
return;
}
@ -29,7 +29,7 @@ index 3b4a3a4fd2..11e168a8ea 100644
// CraftBukkit end
this.die();
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 6333d2234b..c8e4dcdaca 100644
index 6333d2234..c8e4dcdac 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -257,6 +257,7 @@ public class EntityZombie extends EntityMonster {
@ -49,7 +49,7 @@ index 6333d2234b..c8e4dcdaca 100644
this.world.addEntity(entityzombievillager, CreatureSpawnEvent.SpawnReason.INFECTION); // CraftBukkit - add SpawnReason
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java
index 91cac5d530..8082fa617a 100644
index 91cac5d53..8082fa617 100644
--- a/src/main/java/net/minecraft/server/EntityZombieVillager.java
+++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java
@@ -197,6 +197,7 @@ public class EntityZombieVillager extends EntityZombie implements VillagerDataHo

View file

@ -1,11 +1,11 @@
From 7fb5d1f255437c8bdee1549abcac6cbafc4b3b59 Mon Sep 17 00:00:00 2001
From dfeec0c304273748ef2d8c84c8f709c4a0a9c986 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 Oct 2018 00:54:21 -0500
Subject: [PATCH] Add sun related API
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index eadac07f69..cbaed08f52 100644
index 5ca281172..e259c868e 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -1334,6 +1334,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -14,22 +14,10 @@ index eadac07f69..cbaed08f52 100644
+ public boolean isInDaylight() { return this.en(); } // Paper - OBFHELPER
protected boolean en() {
if (this.world.J() && !this.world.isClientSide) {
if (this.world.isDay() && !this.world.isClientSide) {
float f = this.aI();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 39e85f80ca..75c539d72d 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -636,6 +636,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
}
}
+ public boolean isDayTime() { return J(); } // Paper - OBFHELPER
public boolean J() {
return this.worldProvider.getDimensionManager().getType() == DimensionManager.OVERWORLD && this.c < 4; // CraftBukkit
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 8a0675037a..aec657952c 100644
index 8a0675037..9def4b01f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -855,6 +855,13 @@ public class CraftWorld implements World {
@ -39,7 +27,7 @@ index 8a0675037a..aec657952c 100644
+ // Paper start
+ @Override
+ public boolean isDayTime() {
+ return getHandle().isDayTime();
+ return getHandle().isDay();
+ }
+ // Paper end
+
@ -47,7 +35,7 @@ index 8a0675037a..aec657952c 100644
public boolean createExplosion(double x, double y, double z, float power) {
return createExplosion(x, y, z, power, false, true);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
index 53c2d154ed..56c233872b 100644
index 53c2d154e..56c233872 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
@@ -68,4 +68,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {

View file

@ -1,4 +1,4 @@
From 91071dd74395c9e6e25e23696421927e18e6b64c Mon Sep 17 00:00:00 2001
From 324c940c895a6b81e18157a5aa86c6bae9592b00 Mon Sep 17 00:00:00 2001
From: theosib <millerti@172.16.221.1>
Date: Thu, 27 Sep 2018 01:43:35 -0600
Subject: [PATCH] Optimize redstone algorithm
@ -19,7 +19,7 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee
Just added Bukkit's event system and took a few liberties with dead code and comment misspellings.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index dd5e263d71..357c7cf1df 100644
index dd5e263d7..357c7cf1d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -430,4 +430,14 @@ public class PaperWorldConfig {
@ -39,7 +39,7 @@ index dd5e263d71..357c7cf1df 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
new file mode 100644
index 0000000000..cf5661f1c5
index 000000000..cf5661f1c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
@@ -0,0 +1,912 @@
@ -956,7 +956,7 @@ index 0000000000..cf5661f1c5
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 5bf2fc0b3f..52a4982ecd 100644
index 5bf2fc0b3..52a4982ec 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -1,5 +1,7 @@
@ -1124,7 +1124,7 @@ index 5bf2fc0b3f..52a4982ecd 100644
c(iblockdata, world, blockposition);
world.a(blockposition, false);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 75c539d72d..380833ee54 100644
index 1fbecceb9..ced4e5e00 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -543,6 +543,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -1135,7 +1135,7 @@ index 75c539d72d..380833ee54 100644
public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) {
if (!this.isClientSide) {
IBlockData iblockdata = this.getType(blockposition);
@@ -1292,6 +1293,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1291,6 +1292,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0))));
}

View file

@ -1,4 +1,4 @@
From f1b1e9e78c69791d2d44b82c0ac83b34ab780770 Mon Sep 17 00:00:00 2001
From f3eedcffb0f48d7fe53324a16b9d39024c97dd90 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 15 Feb 2019 01:08:19 -0500
Subject: [PATCH] Allow Saving of Oversized Chunks
@ -31,7 +31,7 @@ this fix, as the data will remain in the oversized file. Once the server returns
to a jar with this fix, the data will be restored.
diff --git a/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java
index db66d4ac7d..2322c0c8c5 100644
index db66d4ac7..2322c0c8c 100644
--- a/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java
+++ b/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java
@@ -69,6 +69,7 @@ public class NBTCompressedStreamTools {
@ -51,7 +51,7 @@ index db66d4ac7d..2322c0c8c5 100644
a((NBTBase) nbttagcompound, dataoutput);
}
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 4ff261091b..c12fb3c10f 100644
index cee1ea8f4..6b543f89d 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -17,6 +17,8 @@ import java.nio.file.Files;
@ -80,7 +80,7 @@ index 4ff261091b..c12fb3c10f 100644
this.freeSectors = new RegionFileBitSet();
this.e = regionfilecompression;
if (!Files.isDirectory(java_nio_file_path1, new LinkOption[0])) {
@@ -380,6 +385,74 @@ public class RegionFile implements AutoCloseable {
@@ -384,6 +389,74 @@ public class RegionFile implements AutoCloseable {
void run() throws IOException;
}
@ -156,7 +156,7 @@ index 4ff261091b..c12fb3c10f 100644
private final ChunkCoordIntPair b;
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index 57ce53cfdc..b3d1bb5fd8 100644
index 57ce53cfd..b3d1bb5fd 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -42,10 +42,84 @@ public final class RegionFileCache implements AutoCloseable {

View file

@ -1,4 +1,4 @@
From fbad0a84e22cbbe24b2b113150eb24e307c1a6ce Mon Sep 17 00:00:00 2001
From ce387ed73b42b470bffc930031a18ced0b092f0d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 6 Apr 2019 10:16:48 -0400
Subject: [PATCH] Optimize Captured TileEntity Lookup
@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null.
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 59f7900b4e..a99b2405c9 100644
index 45389f2ab..f59bdd1b9 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1017,12 +1017,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1016,12 +1016,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
return null;
} else {
// CraftBukkit start

View file

@ -1,4 +1,4 @@
From 29ae4e3fa5ee62b1b9b004d9e795451ca0d6d861 Mon Sep 17 00:00:00 2001
From 68bda6379bcd93dc02eaba78af9deddd735e1b56 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 14:27:34 -0400
Subject: [PATCH] Duplicate UUID Resolve Option
@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 357c7cf1df..2b2c82d5ee 100644
index 357c7cf1d..2b2c82d5e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -440,4 +440,43 @@ public class PaperWorldConfig {
@ -81,7 +81,7 @@ index 357c7cf1df..2b2c82d5ee 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index c7c600b80c..64c3276692 100644
index c7c600b80..64c327669 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -391,6 +391,7 @@ public class Chunk implements IChunkAccess {
@ -93,7 +93,7 @@ index c7c600b80c..64c3276692 100644
int k = MathHelper.floor(entity.locY() / 16.0D);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 96b0917a3b..f0d1a5b14d 100644
index 96b0917a3..f0d1a5b14 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2735,6 +2735,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -105,7 +105,7 @@ index 96b0917a3b..f0d1a5b14d 100644
this.uniqueID = uuid;
this.am = this.uniqueID.toString();
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index a2b09597f3..5fd001170b 100644
index c97349010..ca3f9d3d3 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,6 +1,7 @@
@ -134,7 +134,7 @@ index a2b09597f3..5fd001170b 100644
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CompletionException;
import java.util.concurrent.Executor;
@@ -594,19 +598,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -598,19 +602,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
for (int j = 0; j < i; ++j) {
List<Entity> entityslice = aentityslice[j]; // Spigot
@ -201,7 +201,7 @@ index a2b09597f3..5fd001170b 100644
if (list == null) {
list = Lists.newArrayList(new Entity[]{entity});
} else {
@@ -614,6 +654,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -618,6 +658,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
}
}
@ -210,7 +210,7 @@ index a2b09597f3..5fd001170b 100644
if (list != null) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 0138738b33..d59eee27a1 100644
index 0138738b3..d59eee27a 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -3,6 +3,8 @@ package net.minecraft.server;

View file

@ -1,11 +1,11 @@
From c61854173c32b93a6752633b85340a9c1569f058 Mon Sep 17 00:00:00 2001
From 60ac4e9386f6eb54c76727dd1b42f59b9be8d98d Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 9 Jun 2019 03:53:22 +0100
Subject: [PATCH] incremental chunk saving
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 778de46305..99f1541b90 100644
index 778de4630..99f1541b9 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -485,4 +485,19 @@ public class PaperWorldConfig {
@ -29,7 +29,7 @@ index 778de46305..99f1541b90 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 64c3276692..14ec31f0a5 100644
index 64c327669..14ec31f0a 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess {
@ -42,7 +42,7 @@ index 64c3276692..14ec31f0a5 100644
private long inhabitedTime;
@Nullable
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 9b2bafdbd1..f138b112fe 100644
index 9b2bafdbd..f138b112f 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -335,6 +335,15 @@ public class ChunkProviderServer extends IChunkProvider {
@ -62,7 +62,7 @@ index 9b2bafdbd1..f138b112fe 100644
public void close() throws IOException {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6be2e1e2ff..f632691578 100644
index 6be2e1e2f..f63269157 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -168,6 +168,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -108,11 +108,11 @@ index 6be2e1e2ff..f632691578 100644
this.methodProfiler.enter("snooper");
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 827831aabc..4379434f67 100644
index dfbac1b3b..4acb03c9e 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -298,6 +298,36 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
super.close();
@@ -302,6 +302,36 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
+ // Paper start - derived from below
@ -149,7 +149,7 @@ index 827831aabc..4379434f67 100644
if (flag) {
List<PlayerChunk> list = (List) this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).peek(PlayerChunk::m).collect(Collectors.toList());
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index c28c0431a2..4bfa6ea0e7 100644
index c28c0431a..4bfa6ea0e 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -791,11 +791,44 @@ public class WorldServer extends World {

View file

@ -1,4 +1,4 @@
From b17621c33805ced9221bf0dc3cf969159b1466bb Mon Sep 17 00:00:00 2001
From 65a4a817870660f425c2fd1abed0d2443e1bc79b Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sat, 15 Jun 2019 08:54:33 -0700
Subject: [PATCH] Fix World#isChunkGenerated calls
@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that
its only purpose is to cache the status on DISK)
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index f138b112fe..e9cd44fae1 100644
index f138b112f..e9cd44fae 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -28,7 +28,7 @@ public class ChunkProviderServer extends IChunkProvider {
@ -43,7 +43,7 @@ index f138b112fe..e9cd44fae1 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 6371f2f5b1..961228e9df 100644
index 6371f2f5b..961228e9d 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -391,6 +391,17 @@ public class ChunkRegionLoader {
@ -65,7 +65,7 @@ index 6371f2f5b1..961228e9df 100644
if (nbttagcompound != null) {
ChunkStatus chunkstatus = ChunkStatus.a(nbttagcompound.getCompound("Level").getString("Status"));
diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java
index efdf611e66..134a4f0b7d 100644
index efdf611e6..134a4f0b7 100644
--- a/src/main/java/net/minecraft/server/ChunkStatus.java
+++ b/src/main/java/net/minecraft/server/ChunkStatus.java
@@ -176,6 +176,7 @@ public class ChunkStatus {
@ -95,7 +95,7 @@ index efdf611e66..134a4f0b7d 100644
return (ChunkStatus) IRegistry.CHUNK_STATUS.get(MinecraftKey.a(s));
}
diff --git a/src/main/java/net/minecraft/server/IChunkLoader.java b/src/main/java/net/minecraft/server/IChunkLoader.java
index f0a052eec2..2f95174fcc 100644
index f0a052eec..2f95174fc 100644
--- a/src/main/java/net/minecraft/server/IChunkLoader.java
+++ b/src/main/java/net/minecraft/server/IChunkLoader.java
@@ -8,7 +8,7 @@ import javax.annotation.Nullable;
@ -108,7 +108,7 @@ index f0a052eec2..2f95174fcc 100644
@Nullable
private PersistentStructureLegacy c;
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 43d9a56340..6f2cca07e0 100644
index 43d9a5634..6f2cca07e 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -70,6 +70,19 @@ public class PlayerChunk {
@ -132,10 +132,10 @@ index 43d9a56340..6f2cca07e0 100644
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getStatusFutureUnchecked(ChunkStatus chunkstatus) {
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 4379434f67..8e22084227 100644
index 4acb03c9e..bdbadca64 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -898,11 +898,61 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -902,11 +902,61 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
@Nullable
@ -200,7 +200,7 @@ index 4379434f67..8e22084227 100644
boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) {
// Spigot start
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index c12fb3c10f..4295e2d8d6 100644
index 6b543f89d..d37abf2cf 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -36,6 +36,30 @@ public class RegionFile implements AutoCloseable {
@ -249,7 +249,7 @@ index c12fb3c10f..4295e2d8d6 100644
this.c();
} finally {
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index b3d1bb5fd8..e07ae98540 100644
index b3d1bb5fd..e07ae9854 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -18,7 +18,14 @@ public final class RegionFileCache implements AutoCloseable {
@ -279,7 +279,7 @@ index b3d1bb5fd8..e07ae98540 100644
throwable = throwable1;
throw throwable1;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ceb638c988..b824518a21 100644
index 2dd137b94..891ce4977 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -18,6 +18,7 @@ import java.util.Objects;

View file

@ -1,4 +1,4 @@
From cefa16377ffe16c3bc283b3dc6f449e956bb35f3 Mon Sep 17 00:00:00 2001
From 4d05ea5ef9cd7228debac748c43e05aa8adda786 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sat, 22 Jun 2019 04:20:47 -0700
Subject: [PATCH] Use ChunkStatus cache when saving protochunks
@ -7,10 +7,10 @@ The cache should contain the chunk status when saving. If not it
will load it.
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 8e22084227..cbab813d94 100644
index bdbadca64..bfaabfdfe 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -775,8 +775,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -779,8 +779,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
NBTTagCompound nbttagcompound;
if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) {

View file

@ -1,11 +1,11 @@
From 288969b67635f4db3e6dce73fbb0b4e8c294195d Mon Sep 17 00:00:00 2001
From fca668c719538bda3e7b9e7a67f615e3e0822dad Mon Sep 17 00:00:00 2001
From: stonar96 <minecraft.stonar96@gmail.com>
Date: Mon, 20 Aug 2018 03:03:58 +0200
Subject: [PATCH] Anti-Xray
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 99f1541b90..6634ef923a 100644
index 99f1541b9..6634ef923 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -1,7 +1,11 @@
@ -66,7 +66,7 @@ index 99f1541b90..6634ef923a 100644
}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
new file mode 100644
index 0000000000..f7e376ce6a
index 000000000..f7e376ce6
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
@@ -0,0 +1,46 @@
@ -118,7 +118,7 @@ index 0000000000..f7e376ce6a
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
new file mode 100644
index 0000000000..23626bef3a
index 000000000..23626bef3
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
@@ -0,0 +1,782 @@
@ -906,7 +906,7 @@ index 0000000000..23626bef3a
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
new file mode 100644
index 0000000000..a68bace353
index 000000000..a68bace35
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
@@ -0,0 +1,81 @@
@ -993,7 +993,7 @@ index 0000000000..a68bace353
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
new file mode 100644
index 0000000000..067dfb2f14
index 000000000..067dfb2f1
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
@@ -0,0 +1,31 @@
@ -1030,7 +1030,7 @@ index 0000000000..067dfb2f14
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
new file mode 100644
index 0000000000..cc586827aa
index 000000000..cc586827a
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
@@ -0,0 +1,56 @@
@ -1092,7 +1092,7 @@ index 0000000000..cc586827aa
+}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
new file mode 100644
index 0000000000..37093419cf
index 000000000..37093419c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
@@ -0,0 +1,84 @@
@ -1181,7 +1181,7 @@ index 0000000000..37093419cf
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 14ec31f0a5..863a2222f5 100644
index 14ec31f0a..863a2222f 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -315,7 +315,7 @@ public class Chunk implements IChunkAccess {
@ -1194,7 +1194,7 @@ index 14ec31f0a5..863a2222f5 100644
}
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 961228e9df..a950ad801d 100644
index 961228e9d..a950ad801 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -57,7 +57,7 @@ public class ChunkRegionLoader {
@ -1216,7 +1216,7 @@ index 961228e9df..a950ad801d 100644
protochunk.a(biomestorage);
object = protochunk;
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 0d5deee365..4526527aca 100644
index 0d5deee36..4526527ac 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -6,21 +6,31 @@ public class ChunkSection {
@ -1255,7 +1255,7 @@ index 0d5deee365..4526527aca 100644
public IBlockData getType(int i, int j, int k) {
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
index 2c1d1b1a55..44aed67274 100644
index 2c1d1b1a5..44aed6727 100644
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
@@ -3,6 +3,7 @@ package net.minecraft.server;
@ -1377,7 +1377,7 @@ index 2c1d1b1a55..44aed67274 100644
if (this.h == this.b) {
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index e156804f7a..96a785af27 100644
index e156804f7..96a785af2 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -42,7 +42,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@ -1440,7 +1440,7 @@ index e156804f7a..96a785af27 100644
public void a() {
this.o();
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
index 47710067a6..ef7ade797b 100644
index 47710067a..ef7ade797 100644
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
@@ -1,5 +1,6 @@
@ -1533,7 +1533,7 @@ index 47710067a6..ef7ade797b 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 6f2cca07e0..7a1578afaa 100644
index 6f2cca07e..7a1578afa 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -176,6 +176,11 @@ public class PlayerChunk {
@ -1558,10 +1558,10 @@ index 6f2cca07e0..7a1578afaa 100644
this.a(new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, chunk), false);
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index cbab813d94..6a54ccb864 100644
index bfaabfdfe..3825520fa 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -540,7 +540,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -544,7 +544,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
PlayerChunkMap.LOGGER.error("Couldn't load chunk {}", chunkcoordintpair, exception);
}
@ -1570,7 +1570,7 @@ index cbab813d94..6a54ccb864 100644
}, this.executor);
}
@@ -1251,7 +1251,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1255,7 +1255,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
private void a(EntityPlayer entityplayer, Packet<?>[] apacket, Chunk chunk) {
if (apacket[0] == null) {
@ -1580,7 +1580,7 @@ index cbab813d94..6a54ccb864 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 18ff6dd686..8720dd1209 100644
index 18ff6dd68..8720dd120 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -264,6 +264,8 @@ public class PlayerInteractManager {
@ -1593,7 +1593,7 @@ index 18ff6dd686..8720dd1209 100644
public void a(BlockPosition blockposition, PacketPlayInBlockDig.EnumPlayerDigType packetplayinblockdig_enumplayerdigtype, String s) {
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
index 39339fa275..f376e21068 100644
index 39339fa27..f376e2106 100644
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
@@ -45,16 +45,28 @@ public class ProtoChunk implements IChunkAccess {
@ -1636,7 +1636,7 @@ index 39339fa275..f376e21068 100644
return this.j[i];
diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java
index a905a29e75..335b644351 100644
index a905a29e7..335b64435 100644
--- a/src/main/java/net/minecraft/server/TicketType.java
+++ b/src/main/java/net/minecraft/server/TicketType.java
@@ -21,6 +21,7 @@ public class TicketType<T> {
@ -1648,7 +1648,7 @@ index a905a29e75..335b644351 100644
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
return new TicketType<>(s, comparator, 0L);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 46c810376e..fcc013d803 100644
index 2fd76add2..040610ecd 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -2,6 +2,8 @@ package net.minecraft.server;
@ -1685,7 +1685,7 @@ index 46c810376e..fcc013d803 100644
if (iblockdata1 == null) {
// CraftBukkit start - remove blockstate if failed
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
index 7772d59005..4570ed9991 100644
index 7772d5900..4570ed999 100644
--- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
@@ -21,9 +21,11 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {

View file

@ -1,4 +1,4 @@
From 224c34dfa40d0ef432f6fee9682155b3e309a914 Mon Sep 17 00:00:00 2001
From 28e64d87c6aeed98e0d5d105fe41f7401985658d Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sat, 13 Jul 2019 09:23:10 -0700
Subject: [PATCH] Asynchronous chunk IO and loading
@ -121,7 +121,7 @@ tasks required to be executed by the chunk load task (i.e lighting
and some poi tasks).
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
index 3a79cde595..8de6c4816c 100644
index 3a79cde59..8de6c4816 100644
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -63,6 +63,17 @@ public class WorldTimingsHandler {
@ -161,7 +161,7 @@ index 3a79cde595..8de6c4816c 100644
public static Timing getTickList(WorldServer worldserver, String timingsType) {
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 546a1cfe0a..1d7d1ffbf7 100644
index 546a1cfe0..1d7d1ffbf 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -1,5 +1,6 @@
@ -237,7 +237,7 @@ index 546a1cfe0a..1d7d1ffbf7 100644
+ }
}
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
index 23626bef3a..1edcecd2ee 100644
index 23626bef3..1edcecd2e 100644
--- a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
@@ -9,6 +9,7 @@ import java.util.concurrent.Executors;
@ -318,7 +318,7 @@ index 23626bef3a..1edcecd2ee 100644
diff --git a/src/main/java/com/destroystokyo/paper/io/IOUtil.java b/src/main/java/com/destroystokyo/paper/io/IOUtil.java
new file mode 100644
index 0000000000..5af0ac3d9e
index 000000000..5af0ac3d9
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/IOUtil.java
@@ -0,0 +1,62 @@
@ -386,7 +386,7 @@ index 0000000000..5af0ac3d9e
+}
diff --git a/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java b/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java
new file mode 100644
index 0000000000..4f10a8311e
index 000000000..4f10a8311
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java
@@ -0,0 +1,661 @@
@ -1053,7 +1053,7 @@ index 0000000000..4f10a8311e
+}
diff --git a/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java b/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java
new file mode 100644
index 0000000000..78bd238f4c
index 000000000..78bd238f4
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java
@@ -0,0 +1,276 @@
@ -1335,7 +1335,7 @@ index 0000000000..78bd238f4c
+}
diff --git a/src/main/java/com/destroystokyo/paper/io/QueueExecutorThread.java b/src/main/java/com/destroystokyo/paper/io/QueueExecutorThread.java
new file mode 100644
index 0000000000..ee906b594b
index 000000000..ee906b594
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/QueueExecutorThread.java
@@ -0,0 +1,241 @@
@ -1582,7 +1582,7 @@ index 0000000000..ee906b594b
+}
diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java
new file mode 100644
index 0000000000..305da47868
index 000000000..305da4786
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java
@@ -0,0 +1,149 @@
@ -1737,7 +1737,7 @@ index 0000000000..305da47868
+}
diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkSaveTask.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkSaveTask.java
new file mode 100644
index 0000000000..60312b85f9
index 000000000..60312b85f
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkSaveTask.java
@@ -0,0 +1,112 @@
@ -1855,7 +1855,7 @@ index 0000000000..60312b85f9
+}
diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTask.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTask.java
new file mode 100644
index 0000000000..1dfa8abfd8
index 000000000..1dfa8abfd
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTask.java
@@ -0,0 +1,40 @@
@ -1901,7 +1901,7 @@ index 0000000000..1dfa8abfd8
+}
diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java
new file mode 100644
index 0000000000..59d73bfad7
index 000000000..59d73bfad
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java
@@ -0,0 +1,453 @@
@ -2359,7 +2359,7 @@ index 0000000000..59d73bfad7
+
+}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index e9cd44fae1..1f6b1c4f16 100644
index e9cd44fae..1f6b1c4f1 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -124,11 +124,137 @@ public class ChunkProviderServer extends IChunkProvider {
@ -2529,7 +2529,7 @@ index e9cd44fae1..1f6b1c4f16 100644
} finally {
playerChunkMap.callbackExecutor.run();
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index a950ad801d..26f1a4b095 100644
index a950ad801..26f1a4b09 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
@ -2798,7 +2798,7 @@ index a950ad801d..26f1a4b095 100644
nbttagcompound1.set("PostProcessing", a(ichunkaccess.l()));
diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java
index 134a4f0b7d..88f1674616 100644
index 134a4f0b7..88f167461 100644
--- a/src/main/java/net/minecraft/server/ChunkStatus.java
+++ b/src/main/java/net/minecraft/server/ChunkStatus.java
@@ -153,6 +153,7 @@ public class ChunkStatus {
@ -2810,7 +2810,7 @@ index 134a4f0b7d..88f1674616 100644
return ChunkStatus.r.getInt(chunkstatus.c());
}
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
index 7210217913..f7156acb89 100644
index 721021791..f7156acb8 100644
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
@@ -91,7 +91,7 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
@ -2823,7 +2823,7 @@ index 7210217913..f7156acb89 100644
;
}
diff --git a/src/main/java/net/minecraft/server/IChunkLoader.java b/src/main/java/net/minecraft/server/IChunkLoader.java
index 2f95174fcc..134c76065b 100644
index 2f95174fc..134c76065 100644
--- a/src/main/java/net/minecraft/server/IChunkLoader.java
+++ b/src/main/java/net/minecraft/server/IChunkLoader.java
@@ -3,37 +3,49 @@ package net.minecraft.server;
@ -2948,7 +2948,7 @@ index 2f95174fcc..134c76065b 100644
+// Paper end
}
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
index 25a87c2d37..c02c53b50b 100644
index 25a87c2d3..c02c53b50 100644
--- a/src/main/java/net/minecraft/server/MCUtil.java
+++ b/src/main/java/net/minecraft/server/MCUtil.java
@@ -530,4 +530,9 @@ public final class MCUtil {
@ -2962,7 +2962,7 @@ index 25a87c2d37..c02c53b50b 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f632691578..664c48d688 100644
index f63269157..664c48d68 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -788,6 +788,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@ -2974,7 +2974,7 @@ index f632691578..664c48d688 100644
public String getServerIp() {
diff --git a/src/main/java/net/minecraft/server/NextTickListEntry.java b/src/main/java/net/minecraft/server/NextTickListEntry.java
index e9c405fb53..33cfeabdee 100644
index e9c405fb5..33cfeabde 100644
--- a/src/main/java/net/minecraft/server/NextTickListEntry.java
+++ b/src/main/java/net/minecraft/server/NextTickListEntry.java
@@ -4,7 +4,7 @@ import java.util.Comparator;
@ -2996,7 +2996,7 @@ index e9c405fb53..33cfeabdee 100644
this.e = t0;
this.b = i;
diff --git a/src/main/java/net/minecraft/server/NibbleArray.java b/src/main/java/net/minecraft/server/NibbleArray.java
index ed8c4a87b5..996c832638 100644
index ed8c4a87b..996c83263 100644
--- a/src/main/java/net/minecraft/server/NibbleArray.java
+++ b/src/main/java/net/minecraft/server/NibbleArray.java
@@ -71,6 +71,7 @@ public class NibbleArray {
@ -3008,7 +3008,7 @@ index ed8c4a87b5..996c832638 100644
return this.a == null ? new NibbleArray() : new NibbleArray((byte[]) this.a.clone());
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 7a1578afaa..0fb9c1e441 100644
index 7a1578afa..0fb9c1e44 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -310,7 +310,7 @@ public class PlayerChunk {
@ -3034,7 +3034,7 @@ index 7a1578afaa..0fb9c1e441 100644
completablefuture = (CompletableFuture) this.statusFutures.get(i);
if (completablefuture != null) {
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 6a54ccb864..fce37d0d67 100644
index 3825520fa..d9faef8a6 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -63,7 +63,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@ -3073,15 +3073,15 @@ index 6a54ccb864..fce37d0d67 100644
return (PlayerChunk) this.visibleChunks.get(i);
}
@@ -294,6 +294,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@Override
@@ -295,6 +295,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
public void close() throws IOException {
this.p.close();
+ this.world.asyncChunkTaskManager.close(true); // Paper - Required since we're closing regionfiles in the next line
this.m.close();
super.close();
}
@@ -314,7 +315,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
try {
this.p.close();
+ this.world.asyncChunkTaskManager.close(true); // Paper - Required since we're closing regionfiles in the next line
this.m.close();
} finally {
super.close();
@@ -318,7 +319,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
shouldSave = ((Chunk) ichunkaccess).lastSaved + world.paperConfig.autoSavePeriod <= world.getTime();
}
@ -3090,7 +3090,7 @@ index 6a54ccb864..fce37d0d67 100644
++savedThisTick;
playerchunk.m();
}
@@ -346,7 +347,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -350,7 +351,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return (IChunkAccess) completablefuture.join();
}).filter((ichunkaccess) -> {
return ichunkaccess instanceof ProtoChunkExtension || ichunkaccess instanceof Chunk;
@ -3099,7 +3099,7 @@ index 6a54ccb864..fce37d0d67 100644
mutableboolean.setTrue();
});
} while (mutableboolean.isTrue());
@@ -354,18 +355,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -358,18 +359,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
this.b(() -> {
return true;
});
@ -3122,7 +3122,7 @@ index 6a54ccb864..fce37d0d67 100644
}
}
@@ -375,11 +378,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -379,11 +382,15 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
protected void unloadChunks(BooleanSupplier booleansupplier) {
GameProfilerFiller gameprofilerfiller = this.world.getMethodProfiler();
@ -3138,7 +3138,7 @@ index 6a54ccb864..fce37d0d67 100644
}
gameprofilerfiller.exit();
@@ -419,6 +426,60 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -423,6 +430,60 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
@ -3199,7 +3199,7 @@ index 6a54ccb864..fce37d0d67 100644
private void a(long i, PlayerChunk playerchunk) {
CompletableFuture<IChunkAccess> completablefuture = playerchunk.getChunkSave();
Consumer<IChunkAccess> consumer = (ichunkaccess) -> { // CraftBukkit - decompile error
@@ -432,13 +493,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -436,13 +497,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
((Chunk) ichunkaccess).setLoaded(false);
}
@ -3221,7 +3221,7 @@ index 6a54ccb864..fce37d0d67 100644
this.lightEngine.a(ichunkaccess.getPos());
this.lightEngine.queueUpdate();
this.worldLoadListener.a(ichunkaccess.getPos(), (ChunkStatus) null);
@@ -508,26 +576,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -512,26 +580,31 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
}
@ -3267,7 +3267,7 @@ index 6a54ccb864..fce37d0d67 100644
} catch (ReportedException reportedexception) {
Throwable throwable = reportedexception.getCause();
@@ -541,7 +614,27 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -545,7 +618,27 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
return Either.left(new ProtoChunk(chunkcoordintpair, ChunkConverter.a, this.world)); // Paper - Anti-Xray
@ -3296,7 +3296,7 @@ index 6a54ccb864..fce37d0d67 100644
}
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> b(PlayerChunk playerchunk, ChunkStatus chunkstatus) {
@@ -753,18 +846,43 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -757,18 +850,43 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
return this.u.get();
}
@ -3348,7 +3348,7 @@ index 6a54ccb864..fce37d0d67 100644
ichunkaccess.setLastSaved(this.world.getTime());
ichunkaccess.setNeedsSaving(false);
@@ -775,27 +893,33 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -779,27 +897,33 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
NBTTagCompound nbttagcompound;
if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) {
@ -3385,7 +3385,7 @@ index 6a54ccb864..fce37d0d67 100644
}
protected void setViewDistance(int i) {
@@ -899,6 +1023,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -903,6 +1027,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
}
@ -3428,7 +3428,7 @@ index 6a54ccb864..fce37d0d67 100644
@Nullable
public NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { // Paper - private -> public
NBTTagCompound nbttagcompound = this.read(chunkcoordintpair);
@@ -921,33 +1081,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -925,33 +1085,53 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
// Paper start - chunk status cache "api"
public ChunkStatus getChunkStatusOnDiskIfCached(ChunkCoordIntPair chunkPos) {
@ -3493,7 +3493,7 @@ index 6a54ccb864..fce37d0d67 100644
}
public IChunkAccess getUnloadingChunk(int chunkX, int chunkZ) {
@@ -956,6 +1136,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -960,6 +1140,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
// Paper end
@ -3533,7 +3533,7 @@ index 6a54ccb864..fce37d0d67 100644
boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) {
// Spigot start
return isOutsideOfRange(chunkcoordintpair, false);
@@ -1300,6 +1513,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
@@ -1304,6 +1517,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
}
@ -3542,7 +3542,7 @@ index 6a54ccb864..fce37d0d67 100644
return this.m;
}
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index 4295e2d8d6..d0354531d3 100644
index d37abf2cf..0de24c792 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -224,7 +224,7 @@ public class RegionFile implements AutoCloseable {
@ -3564,7 +3564,7 @@ index 4295e2d8d6..d0354531d3 100644
try {
this.c();
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index e07ae98540..d927f93211 100644
index e07ae9854..d927f9321 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -9,7 +9,7 @@ import java.io.File;
@ -3610,7 +3610,7 @@ index e07ae98540..d927f93211 100644
return regionfile != null ? regionfile.chunkExists(pos) : false;
diff --git a/src/main/java/net/minecraft/server/RegionFileSection.java b/src/main/java/net/minecraft/server/RegionFileSection.java
index db9f0196bd..a6d8ef5eb4 100644
index db9f0196b..a6d8ef5eb 100644
--- a/src/main/java/net/minecraft/server/RegionFileSection.java
+++ b/src/main/java/net/minecraft/server/RegionFileSection.java
@@ -20,28 +20,29 @@ import javax.annotation.Nullable;
@ -3746,7 +3746,7 @@ index db9f0196bd..a6d8ef5eb4 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java
index 335b644351..481d954808 100644
index 335b64435..481d95480 100644
--- a/src/main/java/net/minecraft/server/TicketType.java
+++ b/src/main/java/net/minecraft/server/TicketType.java
@@ -22,6 +22,7 @@ public class TicketType<T> {
@ -3758,7 +3758,7 @@ index 335b644351..481d954808 100644
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
return new TicketType<>(s, comparator, 0L);
diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java
index c999f8c9bf..b59ef1a633 100644
index c999f8c9b..b59ef1a63 100644
--- a/src/main/java/net/minecraft/server/VillagePlace.java
+++ b/src/main/java/net/minecraft/server/VillagePlace.java
@@ -24,8 +24,16 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
@ -3847,7 +3847,7 @@ index c999f8c9bf..b59ef1a633 100644
HAS_SPACE(VillagePlaceRecord::d), IS_OCCUPIED(VillagePlaceRecord::e), ANY((villageplacerecord) -> {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 049d4ef4ee..59b2fc6297 100644
index 049d4ef4e..59b2fc629 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -81,6 +81,79 @@ public class WorldServer extends World {
@ -3940,7 +3940,7 @@ index 049d4ef4ee..59b2fc6297 100644
// CraftBukkit start
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index b824518a21..739968a69b 100644
index 891ce4977..31667d667 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -555,22 +555,23 @@ public class CraftWorld implements World {
@ -4002,7 +4002,7 @@ index b824518a21..739968a69b 100644
@Override
public int getViewDistance() {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index a1d93200e6..6ca0ebfdee 100644
index a1d93200e..6ca0ebfde 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -6,6 +6,7 @@ import java.lang.management.ThreadInfo;

View file

@ -1,4 +1,4 @@
From b9bb2bda54faef996b8bd0d87e974b1c69318bcb Mon Sep 17 00:00:00 2001
From abed93f940fe53e748ee26128e7958c0cd9300b4 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Mon, 8 Jul 2019 00:13:36 -0700
Subject: [PATCH] Use getChunkIfLoadedImmediately in places
@ -8,7 +8,7 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk
load in that case).
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index f0d1a5b14d..8c88cf6370 100644
index f0d1a5b14..8c88cf637 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -204,7 +204,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -21,7 +21,7 @@ index f0d1a5b14d..8c88cf6370 100644
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 8c54022e07..f6fbba36f4 100644
index 8c54022e0..f6fbba36f 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -989,7 +989,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -34,7 +34,7 @@ index 8c54022e07..f6fbba36f4 100644
return;
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index fcc013d803..b0bfa2602b 100644
index 040610ecd..cdedbee87 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -130,8 +130,16 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@ -55,7 +55,7 @@ index fcc013d803..b0bfa2602b 100644
protected World(WorldData worlddata, DimensionManager dimensionmanager, BiFunction<World, WorldProvider, IChunkProvider> bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) {
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
@@ -1128,14 +1136,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1127,14 +1135,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
}
public boolean n(BlockPosition blockposition) {
@ -73,7 +73,7 @@ index fcc013d803..b0bfa2602b 100644
return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).a((IBlockAccess) this, blockposition, entity);
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index f86404f83a..92601c581c 100644
index f86404f83..92601c581 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -143,9 +143,10 @@ public class ActivationRange

View file

@ -1,4 +1,4 @@
From 6597437c3be4202f87ee7aa19084b30a14f5a5c1 Mon Sep 17 00:00:00 2001
From ba6f66a868796491a225b910a2fe42337bc838e6 Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Fri, 19 Jul 2019 03:29:14 -0700
Subject: [PATCH] Reduce sync loads
@ -11,7 +11,7 @@ it must be enabled by setting the startup flag -Dpaper.debug-sync-loads=true
To get a debug log for sync loads, the command is /paper syncloadinfo
diff --git a/src/main/java/com/destroystokyo/paper/PaperCommand.java b/src/main/java/com/destroystokyo/paper/PaperCommand.java
index 09efbf7250..132397b3f3 100644
index 09efbf725..132397b3f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperCommand.java
+++ b/src/main/java/com/destroystokyo/paper/PaperCommand.java
@@ -1,9 +1,13 @@
@ -91,7 +91,7 @@ index 09efbf7250..132397b3f3 100644
if (args.length < 2 || args[1].equals("*")) {
diff --git a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
new file mode 100644
index 0000000000..59aec10329
index 000000000..59aec1032
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
@@ -0,0 +1,172 @@
@ -268,7 +268,7 @@ index 0000000000..59aec10329
+ }
+}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 1f6b1c4f16..58654f4538 100644
index 1f6b1c4f1..58654f453 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -280,6 +280,7 @@ public class ChunkProviderServer extends IChunkProvider {
@ -280,10 +280,10 @@ index 1f6b1c4f16..58654f4538 100644
this.serverThreadQueue.awaitTasks(completablefuture::isDone);
com.destroystokyo.paper.io.chunk.ChunkTaskManager.popChunkWait(); // Paper - async chunk debug
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index b0bfa2602b..2c92d3390a 100644
index cdedbee87..2c33ba49c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1191,7 +1191,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1190,7 +1190,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
for (int i1 = i; i1 <= j; ++i1) {
for (int j1 = k; j1 <= l; ++j1) {
@ -292,7 +292,7 @@ index b0bfa2602b..2c92d3390a 100644
if (chunk != null) {
chunk.a(entity, axisalignedbb, list, predicate);
@@ -1211,7 +1211,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1210,7 +1210,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
for (int i1 = i; i1 < j; ++i1) {
for (int j1 = k; j1 < l; ++j1) {
@ -301,7 +301,7 @@ index b0bfa2602b..2c92d3390a 100644
if (chunk != null) {
chunk.a(entitytypes, axisalignedbb, list, predicate);
@@ -1233,7 +1233,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
@@ -1232,7 +1232,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
for (int i1 = i; i1 < j; ++i1) {
for (int j1 = k; j1 < l; ++j1) {
@ -311,7 +311,7 @@ index b0bfa2602b..2c92d3390a 100644
if (chunk != null) {
chunk.a(oclass, axisalignedbb, list, predicate);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 59b2fc6297..9aaa28e6cd 100644
index 59b2fc629..9aaa28e6c 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -153,6 +153,12 @@ public class WorldServer extends World {

@ -1 +1 @@
Subproject commit f845c6ee8a6d41562c71dc218c7d5b7b9eeb03d6
Subproject commit bcded15a2b4e78ea3c3e53843736ebac013471c2

@ -1 +1 @@
Subproject commit 333b9f02897384708573682fa35605d71a78a4db
Subproject commit bf1fa3e3e2524c08cdc8a35410a878bea3515cd6

@ -1 +1 @@
Subproject commit e631456c7deac6ce4fae656405723faa8571d736
Subproject commit 30a1b6911f829ea544aa27ab41179b67d3d09b9b

@ -1 +1 @@
Subproject commit 3b314f5953d6b5f4e0a0bd0345495c30c4c48aa8
Subproject commit 2ee05fef193e8c7ca00622672d059b2820a411a3