diff --git a/patches/unapplied/server/0043-Entity-Origin-API.patch b/patches/server/0042-Entity-Origin-API.patch similarity index 87% rename from patches/unapplied/server/0043-Entity-Origin-API.patch rename to patches/server/0042-Entity-Origin-API.patch index 17fa38a37c..e151966f10 100644 --- a/patches/unapplied/server/0043-Entity-Origin-API.patch +++ b/patches/server/0042-Entity-Origin-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 13725b794e923a4de0d06edcba1adf1b04611c95..4c0e12d9f36c78eeae4dcb2f58d41503d3a046e4 100644 +index bbc55b349c338d07646e1449804170799bfa434b..6aac0121a833c860a4eec6a69d2710513fc98086 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2149,6 +2149,15 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2173,6 +2173,15 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.inWorld = true; // CraftBukkit - Mark entity as in world entity.valid = true; // CraftBukkit @@ -25,10 +25,10 @@ index 13725b794e923a4de0d06edcba1adf1b04611c95..4c0e12d9f36c78eeae4dcb2f58d41503 public void onTrackingEnd(Entity entity) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 360e322ee298048bd280160a49f000384d930c3a..6f687387d8f817646dacf0e0373d50db8ee80dd5 100644 +index 09ce9511f52f7f8643fedc325c49580eba4e4645..030be85ff601711007bd2e550f3c534d34e73085 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -320,7 +320,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -322,7 +322,27 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public long activatedTick = Integer.MIN_VALUE; public void inactiveTick() { } // Spigot end @@ -56,7 +56,7 @@ index 360e322ee298048bd280160a49f000384d930c3a..6f687387d8f817646dacf0e0373d50db public float getBukkitYaw() { return this.yRot; } -@@ -2055,6 +2075,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -2083,6 +2103,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.bukkitEntity.storeBukkitValues(nbttagcompound); } // CraftBukkit end @@ -72,7 +72,7 @@ index 360e322ee298048bd280160a49f000384d930c3a..6f687387d8f817646dacf0e0373d50db return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); -@@ -2182,6 +2211,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -2210,6 +2239,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // CraftBukkit end @@ -94,10 +94,10 @@ index 360e322ee298048bd280160a49f000384d930c3a..6f687387d8f817646dacf0e0373d50db CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT"); CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded"); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 0f51f05f334d262b3435cebce47c3b9f08936398..85d77772b003e56382f8c3b55fc11a9ae1ec535f 100644 +index 0996bfe664e0085dcacdd2b6c08a2737d3b2fa6a..f117d32f3606917ad3526c9140ef5e40990ede8c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -936,4 +936,21 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -946,4 +946,21 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return this.spigot; } // Spigot end diff --git a/patches/unapplied/server/0044-Prevent-block-entity-and-entity-crashes.patch b/patches/server/0043-Prevent-block-entity-and-entity-crashes.patch similarity index 87% rename from patches/unapplied/server/0044-Prevent-block-entity-and-entity-crashes.patch rename to patches/server/0043-Prevent-block-entity-and-entity-crashes.patch index e2f119f399..9c6c663354 100644 --- a/patches/unapplied/server/0044-Prevent-block-entity-and-entity-crashes.patch +++ b/patches/server/0043-Prevent-block-entity-and-entity-crashes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent block entity and entity crashes diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 953ff52b6e6397a8f81b0935fc2fb8cfadf5cf40..eb6bf467c92cb04c9f1ffcde0b5df64e9a160d59 100644 +index 10e0630d30864f8d38434e58f43c63a6984b974b..d878203f7d013ab5648bca82c9a71cceeda1f11f 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -735,11 +735,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -727,11 +727,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { try { tickConsumer.accept(entity); } catch (Throwable throwable) { @@ -26,11 +26,11 @@ index 953ff52b6e6397a8f81b0935fc2fb8cfadf5cf40..eb6bf467c92cb04c9f1ffcde0b5df64e } diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index b300d12e9e00519028b53aca9c3fb01f589eaa91..66757716b401d4f5b690c895effbbaa46f169238 100644 +index 6eef8da8ead8a044aac757693d719ceea431515e..0883e1755eae316faaeae8bf95763a0f80313c5a 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -213,7 +213,12 @@ public abstract class BlockEntity { - return minecraftkey + " // " + this.getClass().getCanonicalName(); +@@ -262,7 +262,12 @@ public abstract class BlockEntity { + return s + " // " + this.getClass().getCanonicalName(); }); if (this.level != null) { - CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, this.getBlockState()); @@ -44,10 +44,10 @@ index b300d12e9e00519028b53aca9c3fb01f589eaa91..66757716b401d4f5b690c895effbbaa4 } } diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -index c2179ea2a16ae0fac0b59d81a57abf13f563843f..e764eecfb2eea62d641c9444831daae6d50c687e 100644 +index 55b24bf21dce3ab00c19a73b3af797ac1fd2ccc7..c4ff77ed93e17ed816e0325eb5bdfcdb444be4a4 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java -@@ -1063,11 +1063,11 @@ public class LevelChunk extends ChunkAccess { +@@ -1061,11 +1061,11 @@ public class LevelChunk extends ChunkAccess { gameprofilerfiller.pop(); } catch (Throwable throwable) { diff --git a/patches/unapplied/server/0045-Configurable-top-of-nether-void-damage.patch b/patches/server/0044-Configurable-top-of-nether-void-damage.patch similarity index 91% rename from patches/unapplied/server/0045-Configurable-top-of-nether-void-damage.patch rename to patches/server/0044-Configurable-top-of-nether-void-damage.patch index 7885dcabd1..715e63f758 100644 --- a/patches/unapplied/server/0045-Configurable-top-of-nether-void-damage.patch +++ b/patches/server/0044-Configurable-top-of-nether-void-damage.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable top of nether void damage Co-authored-by: Jake Potrebic diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 6f687387d8f817646dacf0e0373d50db8ee80dd5..c582d2f447384ca3b46c3b8159b7114d7efef52c 100644 +index 030be85ff601711007bd2e550f3c534d34e73085..f4e0a10eb936ed9d43c9a2fc3ed03a785bf00901 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -683,7 +683,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S +@@ -696,7 +696,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public void checkBelowWorld() { @@ -23,7 +23,7 @@ index 6f687387d8f817646dacf0e0373d50db8ee80dd5..c582d2f447384ca3b46c3b8159b7114d } diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java -index 02e3322ec41108fe9275510e2daa833d180353dc..550b7bc694d861c084769265f6c49c4d44033296 100644 +index 6987e3e7590a6ddf93622ba5d280db6f4e98310d..f4c8eee7bc574d402a7897a202734047e37c7a67 100644 --- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java +++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java @@ -55,7 +55,7 @@ public class PortalForcer { diff --git a/patches/server/0045-Check-online-mode-before-converting-and-renaming-pla.patch b/patches/server/0045-Check-online-mode-before-converting-and-renaming-pla.patch new file mode 100644 index 0000000000..f89cf885a5 --- /dev/null +++ b/patches/server/0045-Check-online-mode-before-converting-and-renaming-pla.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zach Brown +Date: Wed, 2 Mar 2016 00:03:55 -0600 +Subject: [PATCH] Check online mode before converting and renaming player data + + +diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java +index 79222a04ef104bf2eed85684479384b7c350ea19..e11c8523e633d2a8e3cea7ecd54978b2958b9684 100644 +--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java ++++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java +@@ -78,7 +78,7 @@ public class PlayerDataStorage { + File file1 = new File(file, s1 + s); + // Spigot Start + boolean usingWrongFile = false; +- if ( !file1.exists() ) ++ if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first + { + file1 = new File( file, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + name ).getBytes( java.nio.charset.StandardCharsets.UTF_8 ) ).toString() + s ); + if ( file1.exists() ) diff --git a/patches/unapplied/server/0047-Add-more-entities-to-activation-range-ignore-list.patch b/patches/server/0046-Add-more-entities-to-activation-range-ignore-list.patch similarity index 100% rename from patches/unapplied/server/0047-Add-more-entities-to-activation-range-ignore-list.patch rename to patches/server/0046-Add-more-entities-to-activation-range-ignore-list.patch diff --git a/patches/unapplied/server/0048-Configurable-end-credits.patch b/patches/server/0047-Configurable-end-credits.patch similarity index 85% rename from patches/unapplied/server/0048-Configurable-end-credits.patch rename to patches/server/0047-Configurable-end-credits.patch index 6c261dacae..3229c1d2a5 100644 --- a/patches/unapplied/server/0048-Configurable-end-credits.patch +++ b/patches/server/0047-Configurable-end-credits.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable end credits diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 7bad19b7e17bbdac3e8502b6a7e246070ba67e8c..68a376743e531dfe06bf6bd7b5be3e7d8e3154d8 100644 +index 4277f7c477efe01d4ef917515178b26016bccd7c..d75c3c10dcbd777796e479b9538e5254857ac07c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1030,6 +1030,7 @@ public class ServerPlayer extends Player { +@@ -1097,6 +1097,7 @@ public class ServerPlayer extends Player { this.unRide(); this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); if (!this.wonGame) { diff --git a/patches/unapplied/server/0049-Fix-lag-from-explosions-processing-dead-entities.patch b/patches/server/0048-Fix-lag-from-explosions-processing-dead-entities.patch similarity index 89% rename from patches/unapplied/server/0049-Fix-lag-from-explosions-processing-dead-entities.patch rename to patches/server/0048-Fix-lag-from-explosions-processing-dead-entities.patch index fb7366543b..d1713bcbc2 100644 --- a/patches/unapplied/server/0049-Fix-lag-from-explosions-processing-dead-entities.patch +++ b/patches/server/0048-Fix-lag-from-explosions-processing-dead-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix lag from explosions processing dead entities diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index f8dafdf67447c9627f677fca7160e212239709c4..b600abae1c17e1196ff2b171e054db95cca5c9ff 100644 +index 230bd20a7a8923f4a4bd4023aeac91ea5908ccd4..cd6d831d8519b406571e6f626053afb662799ad9 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -225,7 +225,7 @@ public class Explosion { +@@ -226,7 +226,7 @@ public class Explosion { int i1 = Mth.floor(this.y + (double) f2 + 1.0D); int j1 = Mth.floor(this.z - (double) f2 - 1.0D); int k1 = Mth.floor(this.z + (double) f2 + 1.0D); diff --git a/patches/unapplied/server/0050-Optimize-explosions.patch b/patches/server/0049-Optimize-explosions.patch similarity index 88% rename from patches/unapplied/server/0050-Optimize-explosions.patch rename to patches/server/0049-Optimize-explosions.patch index b7e96f9171..ee597e2426 100644 --- a/patches/unapplied/server/0050-Optimize-explosions.patch +++ b/patches/server/0049-Optimize-explosions.patch @@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving an entity's exposure during an explosion. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 01a1d2af6b4cf66cff8eb6d14116343a121deed2..638ab8ee2a44445baee91ee7e63b96ce6c098ad0 100644 +index de18627c6f09ef911c9cb6d6aec9a5f3bfe5a72b..b5f305c7d0972438a686d9b3a022156e39b130a2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1489,6 +1489,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop holder, int j, int b0) { - { -+ private static void applyEffect(List list, MobEffect effects, int i, int b0, boolean isPrimary, BlockPos worldPosition) { // Paper - BeaconEffectEvent ++ private static void applyEffect(List list, @Nullable Holder holder, int j, int b0, boolean isPrimary, BlockPos worldPosition) { // Paper - BeaconEffectEvent + if (!list.isEmpty()) { // Paper - BeaconEffectEvent Iterator iterator = list.iterator(); Player entityhuman; + // Paper start - BeaconEffectEvent + org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(((Player) list.get(0)).level(), worldPosition); -+ PotionEffect effect = CraftPotionUtil.toBukkit(new MobEffectInstance(effects, i, b0, true, true)); ++ PotionEffect effect = CraftPotionUtil.toBukkit(new MobEffectInstance(holder, j, b0, true, true)); + // Paper end - BeaconEffectEvent while (iterator.hasNext()) { - entityhuman = (Player) iterator.next(); -- entityhuman.addEffect(new MobEffectInstance(mobeffectlist, j, b0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.BEACON); +- entityhuman.addEffect(new MobEffectInstance(holder, j, b0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.BEACON); + // Paper start - BeaconEffectEvent + entityhuman = (ServerPlayer) iterator.next(); + BeaconEffectEvent event = new BeaconEffectEvent(block, effect, (org.bukkit.entity.Player) entityhuman.getBukkitEntity(), isPrimary); @@ -47,7 +51,7 @@ index 9fb27f93a7ccbf64f9babf19f626d1f45b1c7103..25ec3ab534872500a2eb51cd44062e27 } } } -@@ -320,10 +332,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -326,10 +336,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name int j = BeaconBlockEntity.getLevel(beaconLevel); List list = BeaconBlockEntity.getHumansInRange(world, pos, beaconLevel); diff --git a/patches/unapplied/server/0046-Check-online-mode-before-converting-and-renaming-pla.patch b/patches/unapplied/server/0046-Check-online-mode-before-converting-and-renaming-pla.patch deleted file mode 100644 index d6d157d973..0000000000 --- a/patches/unapplied/server/0046-Check-online-mode-before-converting-and-renaming-pla.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Zach Brown -Date: Wed, 2 Mar 2016 00:03:55 -0600 -Subject: [PATCH] Check online mode before converting and renaming player data - - -diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -index 8292978e1386c55d99241c3ee2ead3440b9e2570..2a167a0131d866b4368fc30849c17acdf0ab9af0 100644 ---- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java -@@ -60,7 +60,7 @@ public class PlayerDataStorage { - File file = new File(this.playerDir, player.getStringUUID() + ".dat"); - // Spigot Start - boolean usingWrongFile = false; -- if ( !file.exists() ) -+ if ( org.bukkit.Bukkit.getOnlineMode() && !file.exists() ) // Paper - Check online mode first - { - file = new File( this.playerDir, java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + player.getScoreboardName() ).getBytes( "UTF-8" ) ).toString() + ".dat"); - if ( file.exists() ) diff --git a/patches/unapplied/server/0042-fix-ItemMeta-removing-CustomModelData.patch b/removed-patches-1-20-5/0042-fix-ItemMeta-removing-CustomModelData.patch similarity index 100% rename from patches/unapplied/server/0042-fix-ItemMeta-removing-CustomModelData.patch rename to removed-patches-1-20-5/0042-fix-ItemMeta-removing-CustomModelData.patch