diff --git a/PATCHES.md b/PATCHES.md index e2ad6bda..280d865d 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -14,7 +14,6 @@ # Patches | server | Actually unload POI data | Spottedleaf | | | server | Add /ping command | William Blake Galbreath | | | server | Add 5 second tps average in /tps | William Blake Galbreath | | -| api | Add ChatColor.getById | Aikar | | | api | Add EntityTeleportHinderedEvent | Mariell Hoversholm | | | server | Add EntityTeleportHinderedEvent | Mariell Hoversholm | | | api | Add GameProfileLookupEvent | tr7zw | | @@ -30,6 +29,7 @@ # Patches | server | Add allow water in end world option | William Blake Galbreath | | | server | Add boat fall damage config | BillyGalbreath | | | server | Add canSaveToDisk to Entity | William Blake Galbreath | | +| server | Add config change multiplier critical damage value | DoctaEnkoda | | | server | Add config for allowing Endermen to despawn even while | jmp | | | server | Add config for snow on blue ice | BillyGalbreath | | | server | Add config for villager trading | Ben Kerllenevich | | @@ -99,10 +99,12 @@ # Patches | server | Avoid double I/O operation on load player file | ㄗㄠˋ ㄑㄧˊ | | | server | Barrels and enderchests 6 rows | William Blake Galbreath | | | server | Be aware of entity teleports when chunk checking entities | Spottedleaf | | +| server | Better checking for useless move packets | Paul Sauve | | | server | Brand changes | Spottedleaf | | | server | Brandings | YatopiaMC | | | server | Break individual slabs when sneaking | BillyGalbreath | | | server | Breedable Polar Bears | William Blake Galbreath | | +| server | Breedable parrots | BillyGalbreath | | | api | Bring back server name | William Blake Galbreath | | | server | Bring back server name | William Blake Galbreath | | | server | C2ME Port | ishland | Simon Gardling | @@ -118,8 +120,10 @@ # Patches | server | Chickens can retaliate | William Blake Galbreath | | | server | Config for Enderman to aggro spawned Endermites | Encode42 | | | server | Config for changing the blocks that turn into paths | 12emin34 | | +| server | Config for health to impact Creeper explosion radius | Encode42 | | | server | Config for powered rail activation distance | Encode42 | | | server | Config for skipping night | Ben Kerllenevich | | +| server | Config for unverified username message | Ben Kerllenevich | | | server | Config for wither explosion radius | Ben Kerllenevich | | | server | Config migration: climbing should not bypass cramming | jmp | | | server | Config migration: disable saving projectiles to disk -> | jmp | | @@ -152,6 +156,7 @@ # Patches | server | Configurable jockey options | William Blake Galbreath | | | server | Configurable movement checks | l_MrBoom_l | | | api | Configurable permission message upgrades | William Blake Galbreath | | +| server | Configurable powered rail boost modifier | Callum Seabrook | | | server | Configurable ravager griefable blocks list | BillyGalbreath | | | server | Configurable server mod name | William Blake Galbreath | | | server | Configurable sponge absorption | Encode42 | | @@ -238,10 +243,11 @@ # Patches | server | Global Eula file | tr7zw | | | server | Heavily optimize furnance fuel and recipe lookups | tr7zw | Mykyta Komarn | | server | Heavily optimize recipe lookups in CraftingManager | Mykyta Komarn | Ivan Pekov, ishland | +| server | Hide hidden players from entity selector | BillyGalbreath | | | server | Highly optimise single and multi-AABB VoxelShapes and | Spottedleaf | | | server | Highly optimize VillagePlace filtering | Ivan Pekov | | -| server | Hopper Optimizations | Phoenix616 | | | server | Illusioners AI settings | William Blake Galbreath | | +| server | Implement Mob Blindness | Encode42 | | | server | Implement TPSBar | BillyGalbreath | | | server | Implement bed explosion options | William Blake Galbreath | | | server | Implement configurable search radius for villagers to spawn | William Blake Galbreath | | @@ -250,11 +256,13 @@ # Patches | server | Implement respawn anchor explosion options | William Blake Galbreath | | | server | Improve abnormal server shutdown process | Spottedleaf | | | server | Improve async tp to not load chunks when crossing worlds | Spottedleaf | | +| server | Improve container checking with a bitset | Paul Sauve | | | server | Improve fluid direction caching | Paul Sauve | | | server | Improve paper prevent moving into unloaded chunk check | Spottedleaf | | -| server | Improved oversized chunk data packet handling | Spottedleaf | | | server | Infinite fuel furnace | William Blake Galbreath | | | server | Infinity bow settings | William Blake Galbreath | | +| api | Iron golem poppy calms anger | BillyGalbreath | | +| server | Iron golem poppy calms anger | BillyGalbreath | | | api | Item entity immunities | William Blake Galbreath | | | server | Item entity immunities | William Blake Galbreath | | | server | Item stuck sleep config | tr7zw | | @@ -281,6 +289,7 @@ # Patches | server | MC-Dev fixes | Spottedleaf | | | server | Make CallbackExecutor strict again | Spottedleaf | | | server | Make Iron Golems Swim | William Blake Galbreath | | +| server | Make VoxelShapeCollisionEntity lazier | Paul Sauve | | | server | Make entity breeding times configurable | jmp | | | server | Make entity tracker use highest range of passengers | Spottedleaf | | | server | Make lava flow speed configurable | William Blake Galbreath | | @@ -317,6 +326,7 @@ # Patches | server | Optimize TileEntity load/unload | tr7zw | | | server | Optimize Villagers | Ivan Pekov | | | server | Optimize advancement loading | Ivan Pekov | | +| server | Optimize collisions | DoctaEnkoda | | | server | Optimize inventory API item handling | Phoenix616 | | | server | Optimize random calls in chunk ticking | Paul Sauve | | | server | Optimize redundant calls | Paul Sauve | | @@ -325,6 +335,7 @@ # Patches | server | Option for Villager Clerics to farm Nether Wart | jmp | | | server | Option for chests to open even with a solid block on top | jmp | | | server | Option for simpler Villagers | tr7zw | | +| server | Option to disable dragon egg teleporting | BillyGalbreath | | | server | Option to make doors require redstone | BillyGalbreath | | | server | Option to toggle milk curing bad omen | William Blake Galbreath | | | server | Origami - Fix ProtocolLib issues on Java 15 | Phoenix616 | | @@ -427,9 +438,12 @@ # Patches | api | Tuinity config | Spottedleaf | | | server | Tulips change fox type | William Blake Galbreath | | | server | Update version fetcher repo | JRoy | | +| server | Use array for gamerule storage | Paul Sauve | | | server | Use configured height for nether surface builders | William Blake Galbreath | | | server | Use entity ticking chunk map for entity tracker | Spottedleaf | | | server | Use hash table for maintaing changed block set | Spottedleaf | | +| server | Use list for fast iteration over pathfinder goals | Paul Sauve | | +| server | Use raw iterator where possible | Paul Sauve | | | server | Use unmodifiableMap instead of making copy | Paul Sauve | | | server | Util patch | Spottedleaf | | | server | Utilities | YatopiaMC | Mykyta Komarnytskyy, Ivan Pekov | @@ -448,7 +462,6 @@ # Patches | server | lithium HashedList | JellySquid | | | server | lithium MixinBox | JellySquid | | | server | lithium MixinDirection | JellySquid | | -| server | lithium MixinGoalSelector | JellySquid | | | server | lithium MultiNoiseBiomeSourceMixin | ishland | | | server | lithium NoiseChunkGeneratorMixin | JellySquid | | | server | lithium PerlinNoiseSamplerMixin | JellySquid | Bud Gidiere | diff --git a/Paper b/Paper index b3cc8879..41e6073c 160000 --- a/Paper +++ b/Paper @@ -1 +1 @@ -Subproject commit b3cc88799f83500b0d4277a46818e422a6a623f6 +Subproject commit 41e6073cedee9035355f09a3cd1f48e85dbad70f diff --git a/SECURITY.md b/SECURITY.md index cbe63195..c6685f3b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,7 +6,7 @@ ## Supported Versions: | Version | Supported | | ------- | ------------------ | | 1.16.5 | :white_check_mark: | -| 1.16.4 | :white_check_mark: | +| 1.16.4 | :x: | | 1.16.3 | :x: | | 1.16.2 | :x: | | 1.16.1 | :x: | diff --git a/patches/Airplane/patches/api/0001-Expose-findClass-for-profiler.patch b/patches/Airplane/patches/api/0001-Expose-findClass-for-profiler.patch index 62e4b163..f3df4391 100644 --- a/patches/Airplane/patches/api/0001-Expose-findClass-for-profiler.patch +++ b/patches/Airplane/patches/api/0001-Expose-findClass-for-profiler.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Expose findClass for profiler diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -index 7760be3e34fa20825faf145d9fb5b2855c1a4602..79d839034d38c941745c6b91f973f908d6cdb8ee 100644 +index 81da90531cc3a7ab13d455860f89411081825949..6ced06643cd9740e2c62bc8f10d150a2f9a92e31 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -@@ -111,6 +111,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot - return findClass(name, true); +@@ -114,6 +114,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot + return loadClass0(name, resolve, true, true); } + public Class _airplane_findClass(@NotNull String name) throws ClassNotFoundException { return this.classes.get(name); } // Airplane - Class findClass(@NotNull String name, boolean checkGlobal) throws ClassNotFoundException { - if (name.startsWith("org.bukkit.") || name.startsWith("net.minecraft.")) { - throw new ClassNotFoundException(name); + Class loadClass0(@NotNull String name, boolean resolve, boolean checkGlobal, boolean checkLibraries) throws ClassNotFoundException { + try { + return super.loadClass(name, resolve); diff --git a/patches/Airplane/patches/server/0001-Airplane-MC-Dev-Fixes.patch b/patches/Airplane/patches/server/0001-Airplane-MC-Dev-Fixes.patch index 4490e09f..9669f88e 100644 --- a/patches/Airplane/patches/server/0001-Airplane-MC-Dev-Fixes.patch +++ b/patches/Airplane/patches/server/0001-Airplane-MC-Dev-Fixes.patch @@ -119,3 +119,33 @@ index 95d0c9f22d79194ca83ca6f6a8e6d91180a3c8da..5c712af849abf1e5f58a7760b19c5434 } public LootTableInfo build(LootContextParameterSet lootcontextparameterset) { +diff --git a/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java b/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java +index dcb3e4b0cf34699ed77208f8122710bbdfa3d063..45e6943d141082f510833dc92e41a016de766ca5 100644 +--- a/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java ++++ b/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java +@@ -35,6 +35,8 @@ public class VoxelShapeCollisionEntity implements VoxelShapeCollision { + + @Deprecated + protected VoxelShapeCollisionEntity(Entity entity) { ++ // Airplane start - compile fixes ++ /* + boolean flag = entity.by(); + double d0 = entity.locY(); + Item item = entity instanceof EntityLiving ? ((EntityLiving) entity).getItemInMainHand().getItem() : Items.AIR; +@@ -50,8 +52,15 @@ public class VoxelShapeCollisionEntity implements VoxelShapeCollision { + return false; + }; + } ++ */ + +- this(flag, d0, item, predicate); ++ this( ++ entity.by(), ++ entity.locY(), ++ entity instanceof EntityLiving ? ((EntityLiving) entity).getItemInMainHand().getItem() : Items.AIR, ++ entity instanceof EntityLiving ? ((EntityLiving) entity)::a : (fluidtype) -> false ++ ); ++ // Airplane end + } + + @Override diff --git a/patches/Airplane/patches/server/0002-Airplane-Branding-Changes.patch b/patches/Airplane/patches/server/0002-Airplane-Branding-Changes.patch index 4ff17d16..bc67eb48 100644 --- a/patches/Airplane/patches/server/0002-Airplane-Branding-Changes.patch +++ b/patches/Airplane/patches/server/0002-Airplane-Branding-Changes.patch @@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/pom.xml b/pom.xml -index de7da911833569c97b7f800a43ee7354d19677e2..ed18cc4a00761d3a4f435bcccbfd651a3201238d 100644 +index 642ee96ead8176f5c5a811946b050f4fa5dab6e2..6dc6469928051a2a38e8eba43aa237b0f21a502f 100644 --- a/pom.xml +++ b/pom.xml @@ -39,8 +39,8 @@ @@ -72,10 +72,10 @@ index 7063f1da3654b382e26b0093ad5d0ff04a2b38c2..b9c5479e5561f8fe68ea8f94fbf4e64d return history != null ? TextComponent.ofChildren(updateMessage, Component.newline(), history) : updateMessage; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2767a9369ddc922f1d9c7cb6c7acc8270545535a..7b4b9f54510b3a05aad3f7e50e32ee0bf977244a 100644 +index 72d1c1202581abc284848000663ada5514cfcb15..3fc494965ff56a2195af437093e5f227ab8b5554 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant. diff --git a/pom.xml b/pom.xml -index ed18cc4a00761d3a4f435bcccbfd651a3201238d..a148af69be216d2869538d402d9a0d12c81b5df6 100644 +index 6dc6469928051a2a38e8eba43aa237b0f21a502f..65c8a649cb0e4d2d8d1b1c21ec30405f60539b9f 100644 --- a/pom.xml +++ b/pom.xml -@@ -166,6 +166,13 @@ +@@ -193,6 +193,13 @@ 1.1.0-SNAPSHOT compile @@ -183,7 +183,7 @@ index 0000000000000000000000000000000000000000..807cf274619b8f7be839e249cb62b981 + } +} diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index fa7a78549a9bb92b93c305dc16f43a9ace7f6f43..858bd62d2a17c15ee573c5cd607a876d3a99c2b1 100644 +index 392a707d7d71f2009134741529fb9539bd025619..60aad444eec3af7364b84ec3f696d3b78586cd6a 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -216,6 +216,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer diff --git a/patches/Airplane/patches/server/0005-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch b/patches/Airplane/patches/server/0005-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch index 94d008ee..4fd22ee7 100644 --- a/patches/Airplane/patches/server/0005-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch +++ b/patches/Airplane/patches/server/0005-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch @@ -55,7 +55,7 @@ index cc566784c7dd21cc2c44e0f351347f657e57ddcf..e9e7fcf2b63febe2a7d055826fabb86b return d0 == 0.0D ? 0 : (d0 > 0.0D ? 1 : -1); } diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 96cc46a26eef701b0579f3407e67af9176e1743b..5c7ce20609a1c18687696581a76f21a1b182ea7c 100644 +index 33f689b1c9f4c00969fbdd8ddb21901637afb81c..785c210414ca11584bc51087616845f0d5badc91 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -111,6 +111,7 @@ import net.minecraft.world.phys.AxisAlignedBB; @@ -76,7 +76,7 @@ index 96cc46a26eef701b0579f3407e67af9176e1743b..5c7ce20609a1c18687696581a76f21a1 @Override diff --git a/src/main/java/net/minecraft/world/level/IBlockAccess.java b/src/main/java/net/minecraft/world/level/IBlockAccess.java -index e612e1d30f76e217b1aa23488ab025adce048f57..c9198d242b9053fad6fa5b53c1894679002d50a7 100644 +index e612e1d30f76e217b1aa23488ab025adce048f57..6109d59c02d0c7877e213213c6aec6f8513ccc47 100644 --- a/src/main/java/net/minecraft/world/level/IBlockAccess.java +++ b/src/main/java/net/minecraft/world/level/IBlockAccess.java @@ -14,9 +14,11 @@ import net.minecraft.world.level.block.state.IBlockData; @@ -91,12 +91,13 @@ index e612e1d30f76e217b1aa23488ab025adce048f57..c9198d242b9053fad6fa5b53c1894679 public interface IBlockAccess { -@@ -56,6 +58,15 @@ public interface IBlockAccess { +@@ -56,6 +58,16 @@ public interface IBlockAccess { return BlockPosition.a(axisalignedbb).map(this::getType); } + // Airplane start - broken down variant of below rayTraceBlock, used by World#rayTraceDirect + default MovingObjectPosition.EnumMovingObjectType rayTraceBlockDirect(Vec3D vec3d, Vec3D vec3d1, BlockPosition blockposition, IBlockData iblockdata, VoxelShapeCollision voxelshapecoll) { ++ if (iblockdata.isAir()) return null; // Tuinity - optimise air cases + VoxelShape voxelshape = RayTrace.BlockCollisionOption.COLLIDER.get(iblockdata, this, blockposition, voxelshapecoll); + MovingObjectPositionBlock movingobjectpositionblock = this.rayTrace(vec3d, vec3d1, blockposition, voxelshape, iblockdata); + @@ -108,7 +109,7 @@ index e612e1d30f76e217b1aa23488ab025adce048f57..c9198d242b9053fad6fa5b53c1894679 default MovingObjectPositionBlock rayTraceBlock(RayTrace raytrace1, BlockPosition blockposition) { // Paper start - Prevent raytrace from loading chunks diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index af01f5d635eada7175b9d7fdb47a65530686a539..3e08e56f67516333e7d880fdc595447a3ae4dc83 100644 +index 276b1f0c9c9af7db31fba9be0593ae9def540caf..6ab528223682d57bec1cdbd383acd8ab06904e4a 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java @@ -69,6 +69,8 @@ import net.minecraft.world.level.saveddata.maps.WorldMap; @@ -120,7 +121,7 @@ index af01f5d635eada7175b9d7fdb47a65530686a539..3e08e56f67516333e7d880fdc595447a import net.minecraft.world.phys.shapes.OperatorBoolean; import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraft.world.phys.shapes.VoxelShapeCollision; -@@ -378,6 +380,91 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -387,6 +389,91 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return null; } diff --git a/patches/Airplane/patches/server/0008-Swap-priority-of-checks-in-chunk-ticking.patch b/patches/Airplane/patches/server/0008-Swap-priority-of-checks-in-chunk-ticking.patch index b9795e46..691e2c3e 100644 --- a/patches/Airplane/patches/server/0008-Swap-priority-of-checks-in-chunk-ticking.patch +++ b/patches/Airplane/patches/server/0008-Swap-priority-of-checks-in-chunk-ticking.patch @@ -23,7 +23,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index a8a2c29874e95dc08b85eb41882fc947108fbe5b..fc3a5a9d86978e52f0906ef004dd9f1abdf83f1b 100644 +index 6fc215df5ed3aa6ef0c23a57e8444602ff9309e8..239af30d85bff561d14a96de97e1215378018f85 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -1212,7 +1212,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/Airplane/patches/server/0010-Optimize-random-calls-in-chunk-ticking.patch b/patches/Airplane/patches/server/0010-Optimize-random-calls-in-chunk-ticking.patch index 245ade62..648cbfaf 100644 --- a/patches/Airplane/patches/server/0010-Optimize-random-calls-in-chunk-ticking.patch +++ b/patches/Airplane/patches/server/0010-Optimize-random-calls-in-chunk-ticking.patch @@ -46,7 +46,7 @@ index fe040615ff03478a20cdf8376f89a6b7d100ba61..207a9c3928aad7c6e89a120b54d87e00 boolean flag2 = world.ticksPerAnimalSpawns != 0L && worlddata.getTime() % world.ticksPerAnimalSpawns == 0L; // CraftBukkit diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index fc3a5a9d86978e52f0906ef004dd9f1abdf83f1b..b2343d4e5c4dd6ec44503c275c374739bba28536 100644 +index 239af30d85bff561d14a96de97e1215378018f85..39b978c6e61e675249743d082699bb9882fd39ff 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -1202,6 +1202,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/Airplane/patches/server/0011-Don-t-get-entity-equipment-if-not-needed.patch b/patches/Airplane/patches/server/0011-Don-t-get-entity-equipment-if-not-needed.patch index ecada923..5e0d17bd 100644 --- a/patches/Airplane/patches/server/0011-Don-t-get-entity-equipment-if-not-needed.patch +++ b/patches/Airplane/patches/server/0011-Don-t-get-entity-equipment-if-not-needed.patch @@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 5c7ce20609a1c18687696581a76f21a1b182ea7c..74f80b6af18c0b91d9613384ca6bafd9c89f23a4 100644 +index 785c210414ca11584bc51087616845f0d5badc91..c6d551ad958711dec777902f02c9f5dadac26ff8 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -910,11 +910,13 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Airplane/patches/server/0012-Dynamic-activation-range.patch b/patches/Airplane/patches/server/0012-Dynamic-activation-range.patch index cd3e3bbd..23315688 100644 --- a/patches/Airplane/patches/server/0012-Dynamic-activation-range.patch +++ b/patches/Airplane/patches/server/0012-Dynamic-activation-range.patch @@ -68,7 +68,7 @@ index ab019b577002677a4ce788106f8e5a1d7757a2ae..0e452ea9c5d098326d22a20aa67e423f + } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index feab0ae1930b5271fe0d06a40c180317dcbc9d1d..c6b4af810fe3bda7797ab94316b2357178c9cd49 100644 +index 6b6abf401cc7c7c79ffb472c35550596fc8e55b5..ebcb668b7f793d9c19bb098ff54007280c6d07d8 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -289,6 +289,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne @@ -82,7 +82,7 @@ index feab0ae1930b5271fe0d06a40c180317dcbc9d1d..c6b4af810fe3bda7797ab94316b23571 public float getBukkitYaw() { return this.yaw; diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index aae13c2e6c2a30b69c33417932c6a4d0aefeb7f5..f4440a5c4aedb1d7d303517f86a07c856dd1309b 100644 +index bd66ee1b93fc776f77218b87717e0915668e7c04..d325b2437887afad634d569e8c6483a14d3b967c 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -201,10 +201,10 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/patches/Airplane/patches/server/0017-Airplane-Profiler.patch b/patches/Airplane/patches/server/0017-Airplane-Profiler.patch index 2b2b66f2..3792a2a6 100644 --- a/patches/Airplane/patches/server/0017-Airplane-Profiler.patch +++ b/patches/Airplane/patches/server/0017-Airplane-Profiler.patch @@ -20,10 +20,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/pom.xml b/pom.xml -index a148af69be216d2869538d402d9a0d12c81b5df6..c917f825378dd16a329105b4e7fcc8882755bc5a 100644 +index 65c8a649cb0e4d2d8d1b1c21ec30405f60539b9f..efa2ea6b8422f900643eb2f0f65cf067c034cea3 100644 --- a/pom.xml +++ b/pom.xml -@@ -173,6 +173,13 @@ +@@ -200,6 +200,13 @@ fe3dbb4420 compile diff --git a/patches/Airplane/patches/server/0018-Skip-copying-unloading-tile-entities.patch b/patches/Airplane/patches/server/0018-Skip-copying-unloading-tile-entities.patch index e58685bc..9e74fe4c 100644 --- a/patches/Airplane/patches/server/0018-Skip-copying-unloading-tile-entities.patch +++ b/patches/Airplane/patches/server/0018-Skip-copying-unloading-tile-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Skip copying unloading tile entities diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index 3e08e56f67516333e7d880fdc595447a3ae4dc83..f0420b87025a090a659542a00614e805bf850fd2 100644 +index 6ab528223682d57bec1cdbd383acd8ab06904e4a..3abea117b29e57013fb556855ef9def023069bf9 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java @@ -106,7 +106,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -17,7 +17,7 @@ index 3e08e56f67516333e7d880fdc595447a3ae4dc83..f0420b87025a090a659542a00614e805 public final Thread serverThread; private final boolean debugWorld; private int d; -@@ -986,12 +986,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -995,12 +995,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { gameprofilerfiller.enter("blockEntities"); timings.tileEntityTick.startTiming(); // Spigot if (!this.tileEntityListUnload.isEmpty()) { diff --git a/patches/Airplane/patches/server/0022-More-debug-for-plugins-not-shutting-down-tasks.patch b/patches/Airplane/patches/server/0022-More-debug-for-plugins-not-shutting-down-tasks.patch index 55d0c0b7..b70a06ab 100644 --- a/patches/Airplane/patches/server/0022-More-debug-for-plugins-not-shutting-down-tasks.patch +++ b/patches/Airplane/patches/server/0022-More-debug-for-plugins-not-shutting-down-tasks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More debug for plugins not shutting down tasks diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f7ea02d8791d9fe2250522646ecc001c30cf3f50..34b9fe484ba16193cfcb938cb0dc51b2066acc5f 100644 +index 4d0a9c89ca6838907b25ac4b2b1a849844efa7ec..e476806646c89c22da7e733d8072e0073383bd79 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -978,6 +978,11 @@ public final class CraftServer implements Server { +@@ -995,6 +995,11 @@ public final class CraftServer implements Server { plugin.getDescription().getName(), "This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies." )); diff --git a/patches/Airplane/patches/server/0023-Improve-fluid-direction-caching.patch b/patches/Airplane/patches/server/0023-Improve-fluid-direction-caching.patch index 26c4cc7f..d52bac40 100644 --- a/patches/Airplane/patches/server/0023-Improve-fluid-direction-caching.patch +++ b/patches/Airplane/patches/server/0023-Improve-fluid-direction-caching.patch @@ -9,10 +9,10 @@ big javadoc on the FluidDirectionCache with some more information. diff --git a/src/main/java/gg/airplane/structs/FluidDirectionCache.java b/src/main/java/gg/airplane/structs/FluidDirectionCache.java new file mode 100644 -index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8ff0cbb47 +index 0000000000000000000000000000000000000000..aa8467b9dda1f7707e41f50ac7b3e9d7343723ec --- /dev/null +++ b/src/main/java/gg/airplane/structs/FluidDirectionCache.java -@@ -0,0 +1,142 @@ +@@ -0,0 +1,136 @@ +package gg.airplane.structs; + +import it.unimi.dsi.fastutil.HashCommon; @@ -44,8 +44,8 @@ index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8 + private static class FluidDirectionEntry { + private final T data; + private final boolean flag; -+ private short uses = 0; -+ private short age = 0; ++ private int uses = 0; ++ private int age = 0; + + private FluidDirectionEntry(T data, boolean flag) { + this.data = data; @@ -57,15 +57,11 @@ index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8 + } + + public void incrementUses() { -+ if (this.uses < Short.MAX_VALUE) { -+ this.uses++; -+ } ++ this.uses = this.uses + 1 & Integer.MAX_VALUE; + } + + public void incrementAge() { -+ if (this.age < Short.MAX_VALUE) { -+ this.age++; -+ } ++ this.age = this.age + 1 & Integer.MAX_VALUE; + } + } + @@ -74,12 +70,10 @@ index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8 + private final int maxDistance; // the most amount of entries to check for a value + + public FluidDirectionCache(int size) { -+ float fill = 0.75f; -+ -+ int arraySize = HashCommon.arraySize(size, fill); ++ int arraySize = HashCommon.nextPowerOfTwo(size); + this.entries = new FluidDirectionEntry[arraySize]; + this.mask = arraySize - 1; -+ this.maxDistance = Math.max(4, arraySize >> 4); ++ this.maxDistance = Math.min(arraySize, 4); + } + + public Boolean getValue(T data) { @@ -138,11 +132,11 @@ index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8 + int expectedPos = HashCommon.mix(data.hashCode()) & this.mask; + + int toRemovePos = expectedPos; -+ FluidDirectionEntry entryToRemove = this.entries[toRemovePos]; ++ FluidDirectionEntry entryToRemove = this.entries[toRemovePos]; + + for (int i = expectedPos + 1; i < expectedPos + this.maxDistance; i++) { + int pos = i & this.mask; -+ FluidDirectionEntry entry = this.entries[pos]; ++ FluidDirectionEntry entry = this.entries[pos]; + if (entry.getValue() < entryToRemove.getValue()) { + toRemovePos = pos; + entryToRemove = entry; @@ -156,7 +150,7 @@ index 0000000000000000000000000000000000000000..11279fb136bbaf3e51d9b080a9e283d8 + } +} diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 596b4597313b87296d39027b13555b5ad1cba9e6..f8a982add50862f1bc977f3039e7e9aeed9138ae 100644 +index 7279893d599351785652279c8827fe0efbd72f12..96d7990c66bd569b1b5ee287c0238c7dbb4c503e 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -392,6 +392,7 @@ public class Block extends BlockBase implements IMaterial { @@ -168,7 +162,7 @@ index 596b4597313b87296d39027b13555b5ad1cba9e6..f8a982add50862f1bc977f3039e7e9ae return this.aA; } diff --git a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java -index 6bb4ec00e40795ced73648fefcd1f5027e0113cd..b14b0134b42aa6d1eb285aa453ec6067cc702878 100644 +index 6bb4ec00e40795ced73648fefcd1f5027e0113cd..3b8fa837db21c5f67eab2ff8752e906ea97c288d 100644 --- a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java +++ b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java @@ -45,6 +45,8 @@ public abstract class FluidTypeFlowing extends FluidType { @@ -187,8 +181,8 @@ index 6bb4ec00e40795ced73648fefcd1f5027e0113cd..b14b0134b42aa6d1eb285aa453ec6067 + */ + private static final ThreadLocal> localFluidDirectionCache = ThreadLocal.withInitial(() -> { + // Airplane todo - mess with this number for performance -+ // with 1024 it seems very infrequent on a small world that it has to remove old entries -+ return new gg.airplane.structs.FluidDirectionCache<>(1024); ++ // with 2048 it seems very infrequent on a small world that it has to remove old entries ++ return new gg.airplane.structs.FluidDirectionCache<>(2048); + }); + // Airplane end private final Map f = Maps.newIdentityHashMap(); diff --git a/patches/Airplane/patches/server/0025-Skip-creating-hashset-for-entity-track-range.patch b/patches/Airplane/patches/server/0025-Skip-creating-hashset-for-entity-track-range.patch index c69f96f7..1004c33e 100644 --- a/patches/Airplane/patches/server/0025-Skip-creating-hashset-for-entity-track-range.patch +++ b/patches/Airplane/patches/server/0025-Skip-creating-hashset-for-entity-track-range.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Skip creating hashset for entity track range diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c6b4af810fe3bda7797ab94316b2357178c9cd49..99c93d48726b4b92a341ba98721173df8b4ff30a 100644 +index ebcb668b7f793d9c19bb098ff54007280c6d07d8..2a779f1219de2eb1d2ba7d28110bed4824b1d5c5 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -319,10 +319,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/patches/Airplane/patches/server/0026-Cache-climbing-check-for-activation.patch b/patches/Airplane/patches/server/0026-Cache-climbing-check-for-activation.patch index 8e1d4779..401b13cd 100644 --- a/patches/Airplane/patches/server/0026-Cache-climbing-check-for-activation.patch +++ b/patches/Airplane/patches/server/0026-Cache-climbing-check-for-activation.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cache climbing check for activation diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 74f80b6af18c0b91d9613384ca6bafd9c89f23a4..003e1f6dc8efbabcb2e0f7a6b379196f02203903 100644 +index c6d551ad958711dec777902f02c9f5dadac26ff8..a49dbcffecc971f797651984cb72c455d40f9331 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -1745,6 +1745,19 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Airplane/patches/server/0027-Reduce-frequency-of-checking-for-entity-despawn.patch b/patches/Airplane/patches/server/0027-Reduce-frequency-of-checking-for-entity-despawn.patch index d7050db0..3a94d330 100644 --- a/patches/Airplane/patches/server/0027-Reduce-frequency-of-checking-for-entity-despawn.patch +++ b/patches/Airplane/patches/server/0027-Reduce-frequency-of-checking-for-entity-despawn.patch @@ -26,7 +26,7 @@ index 7ec84ef1d1cbb1fabf4c590a2f2c1da3cc181010..c9e00334655ccd273ba108a541ed1cb0 + } diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index f4440a5c4aedb1d7d303517f86a07c856dd1309b..dc78bafeddf6b584181c818b90efa7ff531377a3 100644 +index d325b2437887afad634d569e8c6483a14d3b967c..91eecf296905b85d7cc602dbc3a7b14479ec686a 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -774,8 +774,15 @@ public abstract class EntityInsentient extends EntityLiving { diff --git a/patches/Airplane/patches/server/0029-Config-to-disable-method-profiler.patch b/patches/Airplane/patches/server/0029-Config-to-disable-method-profiler.patch index cd39d1e2..ffe71403 100644 --- a/patches/Airplane/patches/server/0029-Config-to-disable-method-profiler.patch +++ b/patches/Airplane/patches/server/0029-Config-to-disable-method-profiler.patch @@ -23,10 +23,10 @@ index c9e00334655ccd273ba108a541ed1cb0633f69b7..65adf3ceda012c8cfdea675c40e2bb27 + } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7b4b9f54510b3a05aad3f7e50e32ee0bf977244a..2bb00a42492b08036e984d3e1d9a564d4b4226c2 100644 +index 3fc494965ff56a2195af437093e5f227ab8b5554..06d0592bebaefc16c1995781a9e8a3554f4a3205 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2196,7 +2196,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant +Date: Sun, 9 May 2021 16:49:49 -0500 +Subject: [PATCH] Use array for gamerule storage + + +diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java +index 3783f3a83e3e70d77cf0fa1021f62a89c5950af5..d0c63be6ebfa2f95fb3d63eed2e11b1c5cd6384e 100644 +--- a/src/main/java/net/minecraft/world/level/GameRules.java ++++ b/src/main/java/net/minecraft/world/level/GameRules.java +@@ -86,6 +86,7 @@ public class GameRules { + public static final GameRules.GameRuleKey FORGIVE_DEAD_PLAYERS = a("forgiveDeadPlayers", GameRules.GameRuleCategory.MOBS, GameRules.GameRuleBoolean.b(true)); + public static final GameRules.GameRuleKey UNIVERSAL_ANGER = a("universalAnger", GameRules.GameRuleCategory.MOBS, GameRules.GameRuleBoolean.b(false)); + private final Map, GameRules.GameRuleValue> J; ++ private final GameRules.GameRuleValue[] gameruleArray; + + private static > GameRules.GameRuleKey a(String s, GameRules.GameRuleCategory gamerules_gamerulecategory, GameRules.GameRuleDefinition gamerules_gameruledefinition) { + GameRules.GameRuleKey gamerules_gamerulekey = new GameRules.GameRuleKey<>(s, gamerules_gamerulecategory); +@@ -104,17 +105,31 @@ public class GameRules { + } + + public GameRules() { +- this.J = (Map) GameRules.I.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry) -> { ++ // Airplane start - use this() ++ this((Map) GameRules.I.entrySet().stream().collect(ImmutableMap.toImmutableMap(Entry::getKey, (entry) -> { + return ((GameRules.GameRuleDefinition) entry.getValue()).getValue(); +- })); ++ }))); ++ // Airplane end + } + + private GameRules(Map, GameRules.GameRuleValue> map) { + this.J = map; ++ ++ int arraySize = map.keySet().stream().mapToInt(key -> key.gameRuleIndex).max().orElse(-1) + 1; ++ GameRules.GameRuleValue[] values = new GameRules.GameRuleValue[arraySize]; ++ ++ for (Entry, GameRuleValue> entry : map.entrySet()) { ++ values[entry.getKey().gameRuleIndex] = entry.getValue(); ++ } ++ ++ this.gameruleArray = values; + } + + public > T get(GameRules.GameRuleKey gamerules_gamerulekey) { +- return (T) this.J.get(gamerules_gamerulekey); // CraftBukkit - decompile error ++ // Airplane start ++ return gamerules_gamerulekey == null ? null : (T) this.gameruleArray[gamerules_gamerulekey.gameRuleIndex]; ++ //return (T) this.J.get(gamerules_gamerulekey); // CraftBukkit - decompile error ++ // Airplane end + } + + public NBTTagCompound a() { +@@ -357,6 +372,10 @@ public class GameRules { + } + + public static final class GameRuleKey> { ++ // Airplane start ++ private static int lastGameRuleIndex = 0; ++ public final int gameRuleIndex = lastGameRuleIndex++; ++ // Airplane end + + private final String a; + private final GameRules.GameRuleCategory b; diff --git a/patches/Airplane/patches/server/0031-Make-VoxelShapeCollisionEntity-lazier.patch b/patches/Airplane/patches/server/0031-Make-VoxelShapeCollisionEntity-lazier.patch new file mode 100644 index 00000000..ced8a71f --- /dev/null +++ b/patches/Airplane/patches/server/0031-Make-VoxelShapeCollisionEntity-lazier.patch @@ -0,0 +1,54 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Paul Sauve +Date: Sun, 9 May 2021 18:35:05 -0500 +Subject: [PATCH] Make VoxelShapeCollisionEntity lazier + + +diff --git a/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java b/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java +index 45e6943d141082f510833dc92e41a016de766ca5..dbb6a68eea01a3484f2ac862745b57d1d832b80c 100644 +--- a/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java ++++ b/src/main/java/net/minecraft/world/phys/shapes/VoxelShapeCollisionEntity.java +@@ -23,14 +23,16 @@ public class VoxelShapeCollisionEntity implements VoxelShapeCollision { + }; + private final boolean b; + private final double c; +- private final Item d; +- private final Predicate e; ++ private Item d; // Airplane ++ private Entity entity; // Airplane ++ private Predicate e; // Airplane + + protected VoxelShapeCollisionEntity(boolean flag, double d0, Item item, Predicate predicate) { + this.b = flag; + this.c = d0; + this.d = item; + this.e = predicate; ++ this.entity = null; // Airplane + } + + @Deprecated +@@ -57,19 +59,22 @@ public class VoxelShapeCollisionEntity implements VoxelShapeCollision { + this( + entity.by(), + entity.locY(), +- entity instanceof EntityLiving ? ((EntityLiving) entity).getItemInMainHand().getItem() : Items.AIR, +- entity instanceof EntityLiving ? ((EntityLiving) entity)::a : (fluidtype) -> false ++ null, //entity instanceof EntityLiving ? ((EntityLiving) entity).getItemInMainHand().getItem() : Items.AIR, // Airplane - lazy ++ null //entity instanceof EntityLiving ? ((EntityLiving) entity)::a : (fluidtype) -> false + ); ++ this.entity = entity; + // Airplane end + } + + @Override + public boolean a(Item item) { ++ if (this.d == null) this.d = this.entity instanceof EntityLiving ? ((EntityLiving) this.entity).getItemInMainHand().getItem() : Items.AIR; // Airplane + return this.d == item; + } + + @Override + public boolean a(Fluid fluid, FluidTypeFlowing fluidtypeflowing) { ++ if (this.e == null) return this.entity instanceof EntityLiving && ((EntityLiving) this.entity).a(fluidtypeflowing); // Airplane + return this.e.test(fluidtypeflowing) && !fluid.getType().a((FluidType) fluidtypeflowing); + } + diff --git a/patches/Airplane/patches/server/0032-Use-list-for-fast-iteration-over-pathfinder-goals.patch b/patches/Airplane/patches/server/0032-Use-list-for-fast-iteration-over-pathfinder-goals.patch new file mode 100644 index 00000000..76f04d56 --- /dev/null +++ b/patches/Airplane/patches/server/0032-Use-list-for-fast-iteration-over-pathfinder-goals.patch @@ -0,0 +1,101 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Paul Sauve +Date: Sun, 9 May 2021 19:32:29 -0500 +Subject: [PATCH] Use list for fast iteration over pathfinder goals + + +diff --git a/src/main/java/gg/airplane/structs/LinkedHashSetArrayList.java b/src/main/java/gg/airplane/structs/LinkedHashSetArrayList.java +new file mode 100644 +index 0000000000000000000000000000000000000000..36eea0acd815e08e0be10bf55541ea0bb605b8f5 +--- /dev/null ++++ b/src/main/java/gg/airplane/structs/LinkedHashSetArrayList.java +@@ -0,0 +1,35 @@ ++package gg.airplane.structs; ++ ++import java.util.AbstractSet; ++import java.util.ArrayList; ++import java.util.Iterator; ++import java.util.List; ++ ++/* ++ * Used when you want fast iteration more than fast contain/remove ++ */ ++public class LinkedHashSetArrayList extends AbstractSet { ++ private final List internal = new ArrayList<>(); ++ ++ @Override ++ public boolean add(E e) { ++ if (this.internal.contains(e)) { ++ return false; ++ } ++ return this.internal.add(e); ++ } ++ ++ @Override ++ public Iterator iterator() { ++ return this.internal.iterator(); ++ } ++ ++ public E get(int index) { ++ return this.internal.get(index); ++ } ++ ++ @Override ++ public int size() { ++ return this.internal.size(); ++ } ++} +diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java +index 02e8288473138dcea008d6157318758e8d7ee3be..697e666a027d5e2ace7d0758909be5a658c480d2 100644 +--- a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java ++++ b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java +@@ -28,7 +28,7 @@ public class PathfinderGoalSelector { + } + }; + private final Map c = new EnumMap(PathfinderGoal.Type.class); +- private final Set d = Sets.newLinkedHashSet(); public final Set getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public ++ private final gg.airplane.structs.LinkedHashSetArrayList d = new gg.airplane.structs.LinkedHashSetArrayList<>(); public final Set getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public // Airplane - it's a set, but it's an arraylist + private final Supplier e; + private final EnumSet f = EnumSet.noneOf(PathfinderGoal.Type.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be. + private final OptimizedSmallEnumSet goalTypes = new OptimizedSmallEnumSet<>(PathfinderGoal.Type.class); // Paper - remove streams from pathfindergoalselector +@@ -85,8 +85,11 @@ public class PathfinderGoalSelector { + + gameprofilerfiller.enter("goalCleanup"); + // Paper start - remove streams from pathfindergoalselector +- for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { +- PathfinderGoalWrapped wrappedGoal = iterator.next(); ++ // Airplane start - remove iterators from pathfindergoalselector ++ //for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { ++ // PathfinderGoalWrapped wrappedGoal = iterator.next(); ++ for (int goalIndex = 0; goalIndex < this.d.size(); goalIndex++) { ++ PathfinderGoalWrapped wrappedGoal = this.d.get(goalIndex); + if (!wrappedGoal.g()) { + continue; + } +@@ -105,8 +108,10 @@ public class PathfinderGoalSelector { + gameprofilerfiller.exit(); + gameprofilerfiller.enter("goalUpdate"); + // Paper start - remove streams from pathfindergoalselector +- goal_update_loop: for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { +- PathfinderGoalWrapped wrappedGoal = iterator.next(); ++ // Airplane start - remove iterators from pathfindergoalselector ++ goal_update_loop: for (int goalIndex = 0; goalIndex < this.d.size(); goalIndex++) { //for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { ++ PathfinderGoalWrapped wrappedGoal = this.d.get(goalIndex); ++ // Airplane end + if (wrappedGoal.g()) { + continue; + } +@@ -149,8 +154,11 @@ public class PathfinderGoalSelector { + gameprofilerfiller.exit(); + gameprofilerfiller.enter("goalTick"); + // Paper start - remove streams from pathfindergoalselector +- for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { +- PathfinderGoalWrapped wrappedGoal = iterator.next(); ++ // Airplane start - remove iterators from pathfindergoalselector ++ //for (Iterator iterator = this.d.iterator(); iterator.hasNext();) { ++ // PathfinderGoalWrapped wrappedGoal = iterator.next(); ++ for (int goalIndex = 0; goalIndex < this.d.size(); goalIndex++) { PathfinderGoalWrapped wrappedGoal = this.d.get(goalIndex); ++ // Airplane end + if (wrappedGoal.g()) { + wrappedGoal.e(); + } diff --git a/patches/Airplane/patches/server/0033-Improve-container-checking-with-a-bitset.patch b/patches/Airplane/patches/server/0033-Improve-container-checking-with-a-bitset.patch new file mode 100644 index 00000000..c82f220c --- /dev/null +++ b/patches/Airplane/patches/server/0033-Improve-container-checking-with-a-bitset.patch @@ -0,0 +1,510 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Paul Sauve +Date: Wed, 19 May 2021 13:08:26 -0500 +Subject: [PATCH] Improve container checking with a bitset + + +diff --git a/src/main/java/gg/airplane/structs/ItemListWithBitset.java b/src/main/java/gg/airplane/structs/ItemListWithBitset.java +new file mode 100644 +index 0000000000000000000000000000000000000000..bd3b58cb1a48da2f5259b0c64290b2be2ff1fdf7 +--- /dev/null ++++ b/src/main/java/gg/airplane/structs/ItemListWithBitset.java +@@ -0,0 +1,105 @@ ++package gg.airplane.structs; ++ ++import net.minecraft.core.NonNullList; ++import net.minecraft.world.item.ItemStack; ++import org.apache.commons.lang.Validate; ++import org.jetbrains.annotations.NotNull; ++ ++import java.util.Arrays; ++ ++public class ItemListWithBitset extends NonNullList { ++ public static ItemListWithBitset fromNonNullList(NonNullList list) { ++ if (list instanceof ItemListWithBitset) { ++ return (ItemListWithBitset) list; ++ } ++ return new ItemListWithBitset(list); ++ } ++ ++ private static ItemStack[] createArray(int size) { ++ ItemStack[] array = new ItemStack[size]; ++ Arrays.fill(array, ItemStack.NULL_ITEM); ++ return array; ++ } ++ ++ private final ItemStack[] items; ++ ++ private int bitSet = 0; ++ private final int allBits; ++ ++ private ItemListWithBitset(NonNullList list) { ++ this(list.size()); ++ ++ for (int i = 0; i < list.size(); i++) { ++ this.set(i, list.get(i)); ++ } ++ } ++ ++ public ItemListWithBitset(int size) { ++ super(null, ItemStack.NULL_ITEM); ++ ++ Validate.isTrue(size < Integer.BYTES * 8, "size is too large"); ++ ++ this.items = createArray(size); ++ this.allBits = ((1 << size) - 1); ++ } ++ ++ public boolean isCompletelyEmpty() { ++ return this.bitSet == 0; ++ } ++ ++ public boolean hasFullStacks() { ++ return (this.bitSet & this.allBits) == allBits; ++ } ++ ++ @Override ++ public ItemStack set(int index, ItemStack itemStack) { ++ ItemStack existing = this.items[index]; ++ ++ this.items[index] = itemStack; ++ ++ if (itemStack == ItemStack.NULL_ITEM) { ++ this.bitSet &= ~(1 << index); ++ } else { ++ this.bitSet |= 1 << index; ++ } ++ ++ return existing; ++ } ++ ++ @NotNull ++ @Override ++ public ItemStack get(int var0) { ++ return this.items[var0]; ++ } ++ ++ @Override ++ public int size() { ++ return this.items.length; ++ } ++ ++ @Override ++ public void clear() { ++ Arrays.fill(this.items, ItemStack.NULL_ITEM); ++ } ++ ++ // these are unsupported for block inventories which have a static size ++ @Override ++ public void add(int var0, ItemStack var1) { ++ throw new UnsupportedOperationException(); ++ } ++ ++ @Override ++ public ItemStack remove(int var0) { ++ throw new UnsupportedOperationException(); ++ } ++ ++ @Override ++ public String toString() { ++ return "ItemListWithBitset{" + ++ "items=" + Arrays.toString(items) + ++ ", bitSet=" + Long.toString(bitSet, 2) + ++ ", allBits=" + Long.toString(allBits, 2) + ++ ", size=" + this.items.length + ++ '}'; ++ } ++} +diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java +index 39b978c6e61e675249743d082699bb9882fd39ff..b11af463045bbd3bab8d269fde34071ca5f026af 100644 +--- a/src/main/java/net/minecraft/server/level/WorldServer.java ++++ b/src/main/java/net/minecraft/server/level/WorldServer.java +@@ -846,6 +846,22 @@ public class WorldServer extends World implements GeneratorAccessSeed { + return result; + } + ++ // Airplane start - skip type lookup if already completed, but still run check ++ public TileEntity getAndCheckTileEntity(IBlockData data, BlockPosition pos) { ++ TileEntity result = super.getTileEntity(pos, false); ++ Block type = data.getBlock(); ++ ++ // copied from above ++ if (result != null && type != Blocks.AIR) { ++ if (!result.getTileType().isValidBlock(type)) { ++ result = fixTileEntity(pos, type, result); ++ } ++ } ++ ++ return result; ++ } ++ // Airplane end ++ + private TileEntity fixTileEntity(BlockPosition pos, Block type, TileEntity found) { + this.getServer().getLogger().log(Level.SEVERE, "Block at {0}, {1}, {2} is {3} but has {4}" + ". " + + "Bukkit will attempt to fix this, but there may be additional damage that we cannot recover.", new Object[]{pos.getX(), pos.getY(), pos.getZ(), type, found}); +diff --git a/src/main/java/net/minecraft/world/IInventory.java b/src/main/java/net/minecraft/world/IInventory.java +index 774ba6a923f7e329f6af5efc17e1c46e87ed2d77..8faf3850f4c965feec42f6998563b7265a8f599e 100644 +--- a/src/main/java/net/minecraft/world/IInventory.java ++++ b/src/main/java/net/minecraft/world/IInventory.java +@@ -1,6 +1,8 @@ + package net.minecraft.world; + + import java.util.Set; ++ ++import net.minecraft.core.EnumDirection; // Airplane + import net.minecraft.world.entity.player.EntityHuman; + import net.minecraft.world.item.Item; + import net.minecraft.world.item.ItemStack; +@@ -18,6 +20,70 @@ public interface IInventory extends Clearable { + + ItemStack getItem(int i); + ++ // Airplane start - allow the inventory to override and optimize these frequent calls ++ default boolean hasEmptySlot(EnumDirection enumdirection) { // there is a slot with 0 items in it ++ if (this instanceof IWorldInventory) { ++ for (int i : ((IWorldInventory) this).getSlotsForFace(enumdirection)) { ++ if (this.getHopperItem(i).isEmpty()) { ++ return true; ++ } ++ } ++ } else { ++ int size = this.getSize(); ++ for (int i = 0; i < size; i++) { ++ if (this.getHopperItem(i).isEmpty()) { ++ return true; ++ } ++ } ++ } ++ return false; ++ } ++ ++ default boolean isCompletelyFull(EnumDirection enumdirection) { // every stack is maxed ++ if (this instanceof IWorldInventory) { ++ for (int i : ((IWorldInventory) this).getSlotsForFace(enumdirection)) { ++ ItemStack itemStack = this.getHopperItem(i); ++ if (itemStack.getCount() < itemStack.getMaxStackSize()) { ++ return false; ++ } ++ } ++ } else { ++ int size = this.getSize(); ++ for (int i = 0; i < size; i++) { ++ ItemStack itemStack = this.getHopperItem(i); ++ if (itemStack.getCount() < itemStack.getMaxStackSize()) { ++ return false; ++ } ++ } ++ } ++ return true; ++ } ++ ++ default boolean isCompletelyEmpty(EnumDirection enumdirection) { ++ if (this instanceof IWorldInventory) { ++ for (int i : ((IWorldInventory) this).getSlotsForFace(enumdirection)) { ++ if (!this.getHopperItem(i).isEmpty()) { ++ return false; ++ } ++ } ++ } else { ++ int size = this.getSize(); ++ for (int i = 0; i < size; i++) { ++ if (!this.getHopperItem(i).isEmpty()) { ++ return false; ++ } ++ } ++ } ++ return true; ++ } ++ // Airplane end ++ ++ // Airplane start - way for inventories to know it's a hopper, skipping certain steps ++ default ItemStack getHopperItem(int index) { ++ return this.getItem(index); ++ } ++ // Airplane end ++ + ItemStack splitStack(int i, int j); + + ItemStack splitWithoutUpdate(int i); +diff --git a/src/main/java/net/minecraft/world/InventoryLargeChest.java b/src/main/java/net/minecraft/world/InventoryLargeChest.java +index 92818df3689e35b921eb04678c84d2dd4b21ddbe..f6b723062a9cd0667efcc0171df71e9df93def06 100644 +--- a/src/main/java/net/minecraft/world/InventoryLargeChest.java ++++ b/src/main/java/net/minecraft/world/InventoryLargeChest.java +@@ -1,5 +1,6 @@ + package net.minecraft.world; + ++import net.minecraft.core.EnumDirection; // Airplane + import net.minecraft.world.entity.player.EntityHuman; + import net.minecraft.world.item.ItemStack; + +@@ -91,6 +92,30 @@ public class InventoryLargeChest implements IInventory { + return i >= this.left.getSize() ? this.right.getItem(i - this.left.getSize()) : this.left.getItem(i); + } + ++ // Airplane start ++ @Override ++ public boolean hasEmptySlot(EnumDirection enumdirection) { ++ return this.left.hasEmptySlot(null) || this.right.hasEmptySlot(null); ++ } ++ ++ @Override ++ public boolean isCompletelyFull(EnumDirection enumdirection) { ++ return this.left.isCompletelyFull(null) && this.right.isCompletelyFull(null); ++ } ++ ++ @Override ++ public boolean isCompletelyEmpty(EnumDirection enumdirection) { ++ return this.left.isCompletelyEmpty(null) && this.right.isCompletelyEmpty(null); ++ } ++ // Airplane end ++ ++ // Airplane start ++ @Override ++ public ItemStack getHopperItem(int i) { ++ return i >= this.left.getSize() ? this.right.getHopperItem(i - this.left.getSize()) : this.left.getHopperItem(i); ++ } ++ // Airplane end ++ + @Override + public ItemStack splitStack(int i, int j) { + return i >= this.left.getSize() ? this.right.splitStack(i - this.left.getSize(), j) : this.left.splitStack(i, j); +diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java +index 111f62d0e5b40e945793b8f504f2c035c0884a6a..cfabc9047cd3e972af84700725355d0fe149b221 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java +@@ -36,7 +36,7 @@ import org.bukkit.entity.HumanEntity; + + public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITickable + +- private NonNullList items; ++ private gg.airplane.structs.ItemListWithBitset items; // Airplane + protected float a; + protected float b; + public int viewingCount; +@@ -75,9 +75,31 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic + + protected TileEntityChest(TileEntityTypes tileentitytypes) { + super(tileentitytypes); ++ // Airplane start ++ /* + this.items = NonNullList.a(27, ItemStack.b); ++ */ ++ this.items = new gg.airplane.structs.ItemListWithBitset(27); ++ // Airplane end + } + ++ // Airplane start ++ @Override ++ public boolean hasEmptySlot(EnumDirection enumdirection) { ++ return !this.items.hasFullStacks(); ++ } ++ ++ @Override ++ public boolean isCompletelyFull(EnumDirection enumdirection) { ++ return this.items.hasFullStacks() && super.isCompletelyFull(enumdirection); ++ } ++ ++ @Override ++ public boolean isCompletelyEmpty(EnumDirection enumdirection) { ++ return this.items.isCompletelyEmpty() || super.isCompletelyEmpty(enumdirection); ++ } ++ // Airplane end ++ + public TileEntityChest() { + this(TileEntityTypes.CHEST); + } +@@ -95,7 +117,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic + @Override + public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) { + super.load(iblockdata, nbttagcompound); +- this.items = NonNullList.a(this.getSize(), ItemStack.b); ++ this.items = new gg.airplane.structs.ItemListWithBitset(this.getSize()); // Airplane + if (!this.b(nbttagcompound)) { + ContainerUtil.b(nbttagcompound, this.items); + } +@@ -295,7 +317,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic + + @Override + protected void a(NonNullList nonnulllist) { +- this.items = nonnulllist; ++ this.items = gg.airplane.structs.ItemListWithBitset.fromNonNullList(nonnulllist); // Airplane + } + + public static int a(IBlockAccess iblockaccess, BlockPosition blockposition) { +diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java +index 537dc52e5ff3325555ee6049bc7f277952983b76..056d280c7db6fc532d83b2a547d6a01402a49bd0 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java +@@ -46,7 +46,7 @@ import org.bukkit.inventory.Inventory; + + public class TileEntityHopper extends TileEntityLootable implements IHopper, ITickable { + +- private NonNullList items; ++ private gg.airplane.structs.ItemListWithBitset items; // Airplane + private int j; + private long k; + +@@ -82,14 +82,31 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + + public TileEntityHopper() { + super(TileEntityTypes.HOPPER); +- this.items = NonNullList.a(5, ItemStack.b); ++ this.items = new gg.airplane.structs.ItemListWithBitset(5); // Airplane + this.j = -1; + } + ++ // Airplane start ++ @Override ++ public boolean hasEmptySlot(EnumDirection enumdirection) { ++ return !this.items.hasFullStacks(); ++ } ++ ++ @Override ++ public boolean isCompletelyFull(EnumDirection enumdirection) { ++ return this.items.hasFullStacks() && super.isCompletelyFull(enumdirection); ++ } ++ ++ @Override ++ public boolean isCompletelyEmpty(EnumDirection enumdirection) { ++ return this.items.isCompletelyEmpty() || super.isCompletelyEmpty(enumdirection); ++ } ++ // Airplane end ++ + @Override + public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) { + super.load(iblockdata, nbttagcompound); +- this.items = NonNullList.a(this.getSize(), ItemStack.b); ++ this.items = new gg.airplane.structs.ItemListWithBitset(this.getSize()); // Airplane + if (!this.b(nbttagcompound)) { + ContainerUtil.b(nbttagcompound, this.items); + } +@@ -181,16 +198,19 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + } + + private boolean j() { +- Iterator iterator = this.items.iterator(); ++ // Airplane start - no iterator ++ //Iterator iterator = this.items.iterator(); ++ int i = 0; + + ItemStack itemstack; + + do { +- if (!iterator.hasNext()) { ++ if (i >= this.items.size()) { + return true; + } + +- itemstack = (ItemStack) iterator.next(); ++ itemstack = (ItemStack) this.items.get(i++); ++ // Airplane end + } while (!itemstack.isEmpty() && itemstack.getCount() == itemstack.getMaxStackSize()); + + return false; +@@ -205,7 +225,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + skipPushModeEventFire = skipHopperEvents; + boolean foundItem = false; + for (int i = 0; i < this.getSize(); ++i) { +- ItemStack item = this.getItem(i); ++ ItemStack item = this.getHopperItem(i); // Airplane + if (!item.isEmpty()) { + foundItem = true; + ItemStack origItemStack = item; +@@ -429,14 +449,14 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + private static boolean anyMatch(IInventory iinventory, EnumDirection enumdirection, java.util.function.BiPredicate test) { + if (iinventory instanceof IWorldInventory) { + for (int i : ((IWorldInventory) iinventory).getSlotsForFace(enumdirection)) { +- if (test.test(iinventory.getItem(i), i)) { ++ if (test.test(iinventory.getHopperItem(i), i)) { // Airplane + return true; + } + } + } else { + int size = iinventory.getSize(); + for (int i = 0; i < size; i++) { +- if (test.test(iinventory.getItem(i), i)) { ++ if (test.test(iinventory.getHopperItem(i), i)) { // Airplane + return true; + } + } +@@ -450,12 +470,22 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + + private boolean b(IInventory iinventory, EnumDirection enumdirection) { + // Paper start - no streams ++ // Airplane start - use direct method ++ /* + return allMatch(iinventory, enumdirection, STACK_SIZE_TEST); ++ */ ++ return iinventory.isCompletelyFull(enumdirection); ++ // Airplane end + // Paper end + } + + private static boolean c(IInventory iinventory, EnumDirection enumdirection) { ++ // Airplane start - use direct method ++ /* + return allMatch(iinventory, enumdirection, IS_EMPTY_TEST); ++ */ ++ return iinventory.isCompletelyEmpty(enumdirection); ++ // Airplane end + } + + public static boolean a(IHopper ihopper) { +@@ -594,7 +624,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + + if (a(iinventory1, itemstack, i, enumdirection)) { + boolean flag = false; +- boolean flag1 = iinventory1.isEmpty(); ++ boolean flag1 = iinventory1.isCompletelyEmpty(enumdirection); // Airplane + + if (itemstack1.isEmpty()) { + IGNORE_TILE_UPDATES = true; // Paper +@@ -677,7 +707,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + if (block instanceof IInventoryHolder) { + object = ((IInventoryHolder) block).a(iblockdata, world, blockposition); + } else if (block.isTileEntity()) { +- TileEntity tileentity = world.getTileEntity(blockposition); ++ TileEntity tileentity = ((net.minecraft.server.level.WorldServer) world).getAndCheckTileEntity(iblockdata, blockposition); // Airplane - skip validation check, since we already looked it up + + if (tileentity instanceof IInventory) { + object = (IInventory) tileentity; +@@ -736,7 +766,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi + + @Override + protected void a(NonNullList nonnulllist) { +- this.items = nonnulllist; ++ this.items = gg.airplane.structs.ItemListWithBitset.fromNonNullList(nonnulllist); // Airplane + } + + public void a(Entity entity) { +diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java +index f0da819627035bed83561128a11059424d2b7e30..36ef5b11f12da1a7e3c8031ec84d28ba22d59a5c 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java +@@ -98,7 +98,11 @@ public abstract class TileEntityLootable extends TileEntityContainer { + public boolean isEmpty() { + this.d((EntityHuman) null); + // Paper start +- for (ItemStack itemStack : this.f()) { ++ // Airplane start - don't use abstract iterator ++ java.util.List list = this.f(); ++ for (int i = 0, size = list.size(); i < size; i++) { ++ ItemStack itemStack = list.get(i); ++ // Airplane end + if (!itemStack.isEmpty()) { + return false; + } +@@ -107,6 +111,13 @@ public abstract class TileEntityLootable extends TileEntityContainer { + return true; + } + ++ // Airplane start - skip loot check for hoppers ++ @Override ++ public final ItemStack getHopperItem(int index) { ++ return this.f().get(index); ++ } ++ // Airplane end ++ + @Override + public ItemStack getItem(int i) { + if (i == 0) this.d((EntityHuman) null); // Paper diff --git a/patches/Airplane/patches/server/0034-Use-raw-iterator-where-possible.patch b/patches/Airplane/patches/server/0034-Use-raw-iterator-where-possible.patch new file mode 100644 index 00000000..cc702f96 --- /dev/null +++ b/patches/Airplane/patches/server/0034-Use-raw-iterator-where-possible.patch @@ -0,0 +1,76 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Paul Sauve +Date: Wed, 19 May 2021 20:36:24 -0500 +Subject: [PATCH] Use raw iterator where possible + + +diff --git a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java +index 207a9c3928aad7c6e89a120b54d87e003ebd232c..06864951af539e22f6e459c0f0c097b7c2fb929b 100644 +--- a/src/main/java/net/minecraft/server/level/ChunkProviderServer.java ++++ b/src/main/java/net/minecraft/server/level/ChunkProviderServer.java +@@ -1033,10 +1033,12 @@ public class ChunkProviderServer extends IChunkProvider { + //Collections.shuffle(list); // Paper + // Paper - moved up + // Tuinity start - optimise chunk tick iteration +- com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator iterator = this.entityTickingChunks.iterator(); ++ // Airplane start - use raw iterator ++ //com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator iterator = this.entityTickingChunks.iterator(); ++ int iterator = this.entityTickingChunks.createRawIterator(); + try { +- while (iterator.hasNext()) { +- Chunk chunk = iterator.next(); ++ while (iterator != -1) { ++ Chunk chunk = this.entityTickingChunks.rawGet(iterator); + PlayerChunk playerchunk = chunk.playerChunk; + if (playerchunk != null) { // make sure load event has been called along with the load logic we put there + // Tuinity end - optimise chunk tick iteration +@@ -1064,10 +1066,12 @@ public class ChunkProviderServer extends IChunkProvider { + } + } + } ++ iterator = this.entityTickingChunks.advanceRawIterator(iterator); + } // Tuinity start - optimise chunk tick iteration + } finally { +- iterator.finishedIterating(); ++ this.entityTickingChunks.finishRawIterator(); + } ++ // Airplane end + // Tuinity end - optimise chunk tick iteration + this.world.getMethodProfiler().enter("customSpawners"); + if (flag1) { +diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +index 33429be7da4d4c2b2469b8140e46e66d9921652c..38919488ce5917a751605c4ddcf0296ff0340b91 100644 +--- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java ++++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +@@ -2170,10 +2170,13 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + private final void processTrackQueue() { + this.world.timings.tracker1.startTiming(); + try { +- com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator iterator = this.world.getChunkProvider().entityTickingChunks.iterator(); ++ // Airplane start - raw iterator ++ //com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet.Iterator iterator = this.world.getChunkProvider().entityTickingChunks.iterator(); ++ com.tuinity.tuinity.util.maplist.IteratorSafeOrderedReferenceSet chunks = this.world.getChunkProvider().entityTickingChunks; ++ int iterator = chunks.createRawIterator(); + try { +- while (iterator.hasNext()) { +- Chunk chunk = iterator.next(); ++ while (iterator != -1) { ++ Chunk chunk = chunks.rawGet(iterator); + Entity[] entities = chunk.entities.getRawData(); + for (int i = 0, len = chunk.entities.size(); i < len; ++i) { + Entity entity = entities[i]; +@@ -2183,10 +2186,13 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { + tracker.trackerEntry.tick(); + } + } ++ ++ iterator = chunks.advanceRawIterator(iterator); + } + } finally { +- iterator.finishedIterating(); ++ chunks.finishRawIterator(); + } ++ // Airplane end + } finally { + this.world.timings.tracker1.stopTiming(); + } diff --git a/patches/Airplane/patches/server/0035-Better-checking-for-useless-move-packets.patch b/patches/Airplane/patches/server/0035-Better-checking-for-useless-move-packets.patch new file mode 100644 index 00000000..d514f8ec --- /dev/null +++ b/patches/Airplane/patches/server/0035-Better-checking-for-useless-move-packets.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Paul Sauve +Date: Thu, 20 May 2021 12:05:47 -0500 +Subject: [PATCH] Better checking for useless move packets + + +diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java +index 67ca28463f5add7c18f7f16b918c3f36f8feeeda..6aad662d823e0a64b8e18156b5f084399bc4f228 100644 +--- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java ++++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java +@@ -186,6 +186,7 @@ public class EntityTrackerEntry { + boolean flag4 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i1 < -32768L || i1 > 32767L; + + if (!flag4 && this.o <= 400 && !this.q && this.r == this.tracker.isOnGround() && !(com.tuinity.tuinity.config.TuinityConfig.sendFullPosForHardCollidingEntities && this.tracker.hardCollides())) { // Tuinity - send full pos for hard colliding entities to prevent collision problems due to desync ++ if (flag2 || flag3 || this.tracker instanceof EntityArrow) { // Airplane + if ((!flag2 || !flag3) && !(this.tracker instanceof EntityArrow)) { + if (flag2) { + packet1 = new PacketPlayOutEntity.PacketPlayOutRelEntityMove(this.tracker.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.tracker.isOnGround()); +@@ -195,6 +196,7 @@ public class EntityTrackerEntry { + } else { + packet1 = new PacketPlayOutEntity.PacketPlayOutRelEntityMoveLook(this.tracker.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), (byte) i, (byte) j, this.tracker.isOnGround()); + } ++ } // Airplane + } else { + this.r = this.tracker.isOnGround(); + this.o = 0; diff --git a/patches/Akarin/patches/server/0001-Disable-the-Snooper.patch b/patches/Akarin/patches/server/0001-Disable-the-Snooper.patch index c155dc84..97beef4d 100644 --- a/patches/Akarin/patches/server/0001-Disable-the-Snooper.patch +++ b/patches/Akarin/patches/server/0001-Disable-the-Snooper.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable the Snooper diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 137c52999666ea331ac52c230f0674d489a95524..7bba8508c22233ac524d782d159d97f6609748af 100644 +index 61603bda0d1e305679ab2463188c3f6cf9c8c18d..dd2f3d79693710ddb3c1d34dffdc7925260e5de5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1450,6 +1450,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 100) { // Spigot this.snooper.a(); } -@@ -1457,6 +1459,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant -Date: Mon, 24 Apr 2017 20:27:23 -0400 -Subject: [PATCH] Add ChatColor.getById - -Bukkit has had a map of this for years and it was totally unused... - -diff --git a/src/main/java/org/bukkit/ChatColor.java b/src/main/java/org/bukkit/ChatColor.java -index 499b222dee1f11d497a29a9a263a5596401ca1eb..c6df76ea58f131ed066fa3cbf2808e6e79785743 100644 ---- a/src/main/java/org/bukkit/ChatColor.java -+++ b/src/main/java/org/bukkit/ChatColor.java -@@ -263,6 +263,15 @@ public enum ChatColor { - return net.md_5.bungee.api.ChatColor.RESET; - }; - -+ /** -+ * Gets the numeric ID associated with this color -+ * -+ * @return An int value of this color code -+ */ -+ public int getId() { -+ return intCode; -+ } -+ - /** - * Gets the char value associated with this color - * -@@ -296,6 +305,18 @@ public enum ChatColor { - return !isFormat && this != RESET; - } - -+ /** -+ * Gets the color represented by the specified color ID -+ * -+ * @param id Code to check -+ * @return Associative {@link org.bukkit.ChatColor} with the given id, -+ * or null if it doesn't exist -+ */ -+ @Nullable // Yatopia -+ public static ChatColor getById(int id) { -+ return BY_ID.get(id); -+ } -+ - /** - * Gets the color represented by the specified color code - * diff --git a/patches/Empirecraft/patches/server/0001-Don-t-trigger-Lootable-Refresh-for-non-player-intera.patch b/patches/Empirecraft/patches/server/0001-Don-t-trigger-Lootable-Refresh-for-non-player-intera.patch index 56a69dc9..350555d9 100644 --- a/patches/Empirecraft/patches/server/0001-Don-t-trigger-Lootable-Refresh-for-non-player-intera.patch +++ b/patches/Empirecraft/patches/server/0001-Don-t-trigger-Lootable-Refresh-for-non-player-intera.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't trigger Lootable Refresh for non player interaction diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java -index f0da819627035bed83561128a11059424d2b7e30..806a2e1a654bd917f635759725e6d7836b672f7d 100644 +index 36ef5b11f12da1a7e3c8031ec84d28ba22d59a5c..316bdfc5c14774336214e83fbd4e6c1f02b94024 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityLootable.java @@ -69,6 +69,7 @@ public abstract class TileEntityLootable extends TileEntityContainer { diff --git a/patches/Empirecraft/patches/server/0003-dont-load-chunks-for-physics.patch b/patches/Empirecraft/patches/server/0003-dont-load-chunks-for-physics.patch index a46fb487..94684eea 100644 --- a/patches/Empirecraft/patches/server/0003-dont-load-chunks-for-physics.patch +++ b/patches/Empirecraft/patches/server/0003-dont-load-chunks-for-physics.patch @@ -5,10 +5,10 @@ Subject: [PATCH] dont load chunks for physics diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index ad9ccd07cc9f49c9d5b106b9078a4ed2ae8d3413..1814f9fe3a43b7bd06e920066e3500606708e08c 100644 +index e71f76df887681f48702456378be4e9da86fb658..42933a84c1a52316317188107f5bc3a57f7d7727 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -868,7 +868,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -878,7 +878,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public void neighborChanged(BlockPosition pos, Block blockIn, BlockPosition fromPos) { a(pos, blockIn, fromPos); } // Paper - OBFHELPER public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { if (!this.isClientSide) { @@ -19,7 +19,7 @@ index ad9ccd07cc9f49c9d5b106b9078a4ed2ae8d3413..1814f9fe3a43b7bd06e920066e350060 try { // CraftBukkit start diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java -index 370378b3b153720bf79a3d61d30d3f3d614a5d10..760370c3920b89469a6c79f062777c42726cd59e 100644 +index 0990eb8b2e2d8a5f7c1a2640727d86c37a50298e..d894e7f16d232596ec308f3de3ea5da410588cbe 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java @@ -647,7 +647,8 @@ public abstract class BlockBase { diff --git a/patches/Origami/patches/server/0001-Origami-Server-Config.patch b/patches/Origami/patches/server/0001-Origami-Server-Config.patch index c43055b3..fda2454b 100644 --- a/patches/Origami/patches/server/0001-Origami-Server-Config.patch +++ b/patches/Origami/patches/server/0001-Origami-Server-Config.patch @@ -129,10 +129,10 @@ index 0000000000000000000000000000000000000000..fe7330fabe386966c2d203a190a00a78 +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index 1814f9fe3a43b7bd06e920066e3500606708e08c..e6daeb25aecc1759b505a2ad74a6e32d89597fd8 100644 +index 42933a84c1a52316317188107f5bc3a57f7d7727..b38ae7942cb1c99ed3d0046a7b813da428d0867c 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -160,6 +160,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -161,6 +161,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public final com.tuinity.tuinity.config.TuinityConfig.WorldConfig tuinityConfig; // Tuinity - Server Config public final net.pl3x.purpur.PurpurWorldConfig purpurConfig; // Purpur @@ -141,7 +141,7 @@ index 1814f9fe3a43b7bd06e920066e3500606708e08c..e6daeb25aecc1759b505a2ad74a6e32d public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPosition lastPhysicsProblem; // Spigot private org.spigotmc.TickLimiter entityLimiter; -@@ -291,6 +293,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -301,6 +303,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { protected World(WorldDataMutable worlddatamutable, ResourceKey resourcekey, final DimensionManager dimensionmanager, Supplier supplier, boolean flag, boolean flag1, long i, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env, java.util.concurrent.Executor executor) { // Paper this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName()); // Spigot this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper @@ -150,10 +150,10 @@ index 1814f9fe3a43b7bd06e920066e3500606708e08c..e6daeb25aecc1759b505a2ad74a6e32d this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()), env); // Purpur diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 49214eaab41998781b1d2e519f65075366754fea..da33704efcce38a6c335adec0564cf7f826aa701 100644 +index af3c01156a9a5f6f08fff9db67c9c089a321cb29..560020bf1372f68186f78b53502e3d2c145ab098 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -866,6 +866,7 @@ public final class CraftServer implements Server { +@@ -883,6 +883,7 @@ public final class CraftServer implements Server { com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper com.tuinity.tuinity.config.TuinityConfig.init((File) console.options.valueOf("tuinity-settings")); // Tuinity - Server Config net.pl3x.purpur.PurpurConfig.init((File) console.options.valueOf("purpur-settings")); // Purpur @@ -161,7 +161,7 @@ index 49214eaab41998781b1d2e519f65075366754fea..da33704efcce38a6c335adec0564cf7f for (WorldServer world : console.getWorlds()) { world.worldDataServer.setDifficulty(config.difficulty); world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals); -@@ -902,6 +903,7 @@ public final class CraftServer implements Server { +@@ -919,6 +920,7 @@ public final class CraftServer implements Server { world.paperConfig.init(); // Paper world.tuinityConfig.init(); // Tuinity - Server Config world.purpurConfig.init(); // Purpur @@ -170,10 +170,10 @@ index 49214eaab41998781b1d2e519f65075366754fea..da33704efcce38a6c335adec0564cf7f Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 326548230af7f64aabc8cdd1a1c804e734c9e0e0..17d0d0ec4e22ed8b344a2208925a2e9cba5dd58c 100644 +index 51cdc7e87413302a73416a5da724d873efb29657..8b344d69b9076e1bf2a5ba310ecf3f8ddd375fdc 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -156,6 +156,14 @@ public class Main { +@@ -162,6 +162,14 @@ public class Main { .describedAs("Yml file"); // Purpur end @@ -188,7 +188,7 @@ index 326548230af7f64aabc8cdd1a1c804e734c9e0e0..17d0d0ec4e22ed8b344a2208925a2e9c // Paper start acceptsAll(asList("server-name"), "Name of the server") .withRequiredArg() -@@ -288,6 +296,7 @@ public class Main { +@@ -300,6 +308,7 @@ public class Main { } // Paper end System.setProperty( "library.jansi.version", "Paper" ); // Paper - set meaningless jansi version to prevent git builds from crashing on Windows diff --git a/patches/Origami/patches/server/0002-Optimize-inventory-API-item-handling.patch b/patches/Origami/patches/server/0002-Optimize-inventory-API-item-handling.patch index 669a4c52..c7bde4cb 100644 --- a/patches/Origami/patches/server/0002-Optimize-inventory-API-item-handling.patch +++ b/patches/Origami/patches/server/0002-Optimize-inventory-API-item-handling.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Optimize inventory API item handling diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index 40e5a2fae032445467ac453f1fab7e366e911283..0fa7c1c9b5237b098fc7bde5ac7851f3a8208021 100644 +index 922a15097bdfe64be657fdf157145d1e882b6a40..fe648a00d834410837c923ab3c15ecc33b808851 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -274,11 +274,13 @@ public class CraftInventory implements Inventory { diff --git a/patches/Origami/patches/server/0005-Add-option-to-disable-observer-clocks.patch b/patches/Origami/patches/server/0004-Add-option-to-disable-observer-clocks.patch similarity index 84% rename from patches/Origami/patches/server/0005-Add-option-to-disable-observer-clocks.patch rename to patches/Origami/patches/server/0004-Add-option-to-disable-observer-clocks.patch index 333ef00b..fb826ec1 100644 --- a/patches/Origami/patches/server/0005-Add-option-to-disable-observer-clocks.patch +++ b/patches/Origami/patches/server/0004-Add-option-to-disable-observer-clocks.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Add option to disable observer clocks diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java -index adee28db7c3eecae30b2b05f3eef3fb1bcc1cfbd..bd81abc4dc17491c9c4bb10c2edb4e1ca103c8f8 100644 +index fe7330fabe386966c2d203a190a00a785ea21be0..f9762c7f40bbb850d14fb7b0c9ff4f3c09921155 100644 --- a/src/main/java/de/minebench/origami/OrigamiConfig.java +++ b/src/main/java/de/minebench/origami/OrigamiConfig.java -@@ -118,6 +118,11 @@ public final class OrigamiConfig { - tickEmptyHoppers = getBoolean("tick-empty-hoppers", tickEmptyHoppers); - fullHopperCooldown = getInt("ticks-per.full-hopper-cooldown", fullHopperCooldown); +@@ -112,6 +112,11 @@ public final class OrigamiConfig { + config.addDefault("worlds.default." + path, Double.valueOf(dfl)); + return config.getDouble("worlds." + worldName + "." + path, config.getDouble("worlds.default." + path, dfl)); } + + public boolean disableObserverClocks = false; diff --git a/patches/Origami/patches/server/0004-Hopper-Optimizations.patch b/patches/Origami/patches/server/0004-Hopper-Optimizations.patch deleted file mode 100644 index 6ad4a296..00000000 --- a/patches/Origami/patches/server/0004-Hopper-Optimizations.patch +++ /dev/null @@ -1,262 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Phoenix616 -Date: Tue, 24 Mar 2020 17:40:50 +0100 -Subject: [PATCH] Hopper Optimizations - -- Don't tick empty hoppers: This avoids ticking hoppers that are only used to transport items in a -chain. -- Add config option to increase the full hopper cooldown -- Only set check cooldown if it's bigger than already set cooldown - -diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java -index fe7330fabe386966c2d203a190a00a785ea21be0..adee28db7c3eecae30b2b05f3eef3fb1bcc1cfbd 100644 ---- a/src/main/java/de/minebench/origami/OrigamiConfig.java -+++ b/src/main/java/de/minebench/origami/OrigamiConfig.java -@@ -112,6 +112,12 @@ public final class OrigamiConfig { - config.addDefault("worlds.default." + path, Double.valueOf(dfl)); - return config.getDouble("worlds." + worldName + "." + path, config.getDouble("worlds.default." + path, dfl)); - } -+ public boolean tickEmptyHoppers = false; -+ public int fullHopperCooldown = 128; -+ private void hopperOptimizations() { -+ tickEmptyHoppers = getBoolean("tick-empty-hoppers", tickEmptyHoppers); -+ fullHopperCooldown = getInt("ticks-per.full-hopper-cooldown", fullHopperCooldown); -+ } - } - - } -\ No newline at end of file -diff --git a/src/main/java/net/minecraft/world/entity/item/EntityItem.java b/src/main/java/net/minecraft/world/entity/item/EntityItem.java -index 51663e58def93cc38157a99069db86603faf4c0a..e4525a934cc1b189f80fc7eb8aad5b6d326e05fd 100644 ---- a/src/main/java/net/minecraft/world/entity/item/EntityItem.java -+++ b/src/main/java/net/minecraft/world/entity/item/EntityItem.java -@@ -168,6 +168,13 @@ public class EntityItem extends Entity { - } - } - -+ // Origami start - don't tick empty hoppers -+ if (!world.origamiConfig.tickEmptyHoppers && locY() >= 1 && (this.age < 10 || this.age > this.getDespawnRate() - 10 -+ || (int) locX() != (int) lastX || (int) locZ() != (int) lastZ || (int) locY() != (int) lastY)) { -+ net.minecraft.world.level.block.entity.TileEntityHopper.enableTicking(world.getTileEntity(new BlockPosition(locX(), locY() - 1, locZ())), 0); -+ } -+ // Origami end -+ - if (!this.world.isClientSide && this.age >= this.getDespawnRate()) { // Spigot // Paper - // CraftBukkit start - fire ItemDespawnEvent - if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) { -diff --git a/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java -index 0166d11cb540a536390f486e1069d6119d8d23d6..b688ff6534e069bc631e2cb84bb1deb3e4f1914a 100644 ---- a/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java -+++ b/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java -@@ -164,7 +164,6 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp - if (!itemstack.isEmpty() && itemstack.getCount() > this.getMaxStackSize()) { - itemstack.setCount(this.getMaxStackSize()); - } -- - } - - @Override -@@ -178,7 +177,25 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp - } - - @Override -- public void update() {} -+ public void update() { -+ // Origami start - don't tick empty hoppers -+ checkHopperBelow(); -+ } -+ -+ @Override -+ public void tick() { -+ super.tick(); -+ if (locY() >= 1 && ((int) locX() != (int) lastX || (int) locZ() != (int) lastZ || (int) locY() != (int) lastY)) { -+ checkHopperBelow(); -+ } -+ } -+ -+ private void checkHopperBelow() { -+ if (!world.origamiConfig.tickEmptyHoppers && !this.isEmpty()) { -+ net.minecraft.world.level.block.entity.TileEntityHopper.enableTicking(world.getTileEntity(new net.minecraft.core.BlockPosition(locX(), locY() - 1, locZ())), 0); -+ } -+ } -+ // Origami end - - @Override - public boolean a(EntityHuman entityhuman) { -diff --git a/src/main/java/net/minecraft/world/level/block/BlockComposter.java b/src/main/java/net/minecraft/world/level/block/BlockComposter.java -index c0b235d5edf3cd14021696d1b4f76ce3de41f5d5..802139cf4e15191be0e4afddda12a01079e9ce35 100644 ---- a/src/main/java/net/minecraft/world/level/block/BlockComposter.java -+++ b/src/main/java/net/minecraft/world/level/block/BlockComposter.java -@@ -23,6 +23,7 @@ import net.minecraft.world.level.GeneratorAccess; - import net.minecraft.world.level.IBlockAccess; - import net.minecraft.world.level.IMaterial; - import net.minecraft.world.level.World; -+import net.minecraft.world.level.block.entity.TileEntityHopper; - import net.minecraft.world.level.block.state.BlockBase; - import net.minecraft.world.level.block.state.BlockStateList; - import net.minecraft.world.level.block.state.IBlockData; -@@ -302,6 +303,7 @@ public class BlockComposter extends Block implements IInventoryHolder { - if ((Integer) iblockdata.get(BlockComposter.a) == 7) { - worldserver.setTypeAndData(blockposition, (IBlockData) iblockdata.a((IBlockState) BlockComposter.a), 3); - worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.BLOCK_COMPOSTER_READY, SoundCategory.BLOCKS, 1.0F, 1.0F); -+ net.minecraft.world.level.block.entity.TileEntityHopper.enableTicking(worldserver.getTileEntity(new BlockPosition(blockposition.getX(), blockposition.getY() - 1, blockposition.getZ())), 0); // Origami - don't tick empty hoppers - } - - } -diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java -index fb7a1a854efcf42f0351ef521aff67d5fcc4ab27..96dfe05ed57f7e2c3dac3a784ae3445ad9975c40 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityContainer.java -@@ -98,4 +98,14 @@ public abstract class TileEntityContainer extends TileEntity implements IInvento - return new org.bukkit.Location(world.getWorld(), position.getX(), position.getY(), position.getZ()); - } - // CraftBukkit end -+ -+ // Origami start - don't tick empty hoppers -+ @Override -+ public void update() { -+ super.update(); -+ if (world != null && !world.origamiConfig.tickEmptyHoppers) { -+ TileEntityHopper.enableTicking(world.getTileEntity(position.shift(net.minecraft.core.EnumDirection.DOWN)), world.spigotConfig.hopperCheck); -+ } -+ } -+ // Origami end - } -diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java -index 537dc52e5ff3325555ee6049bc7f277952983b76..a859e12571ceff2199842e03df77b21ee9d689f2 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityHopper.java -@@ -47,8 +47,9 @@ import org.bukkit.inventory.Inventory; - public class TileEntityHopper extends TileEntityLootable implements IHopper, ITickable { - - private NonNullList items; -- private int j; -+ private int j; public int getCooldown() { return this.j; } // Origami - OBFHELPER - private long k; -+ public boolean shouldTick = true; // Origami - don't tick empty hoppers - - // CraftBukkit start - add fields and methods - public List transaction = new java.util.ArrayList(); -@@ -126,7 +127,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - if (itemstack.getCount() > this.getMaxStackSize()) { - itemstack.setCount(this.getMaxStackSize()); - } -- -+ shouldTick = true; // Origami - don't tick empty hoppers - } - - @Override -@@ -136,7 +137,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - - @Override - public void tick() { -- if (this.world != null && !this.world.isClientSide) { -+ if (this.world != null && !this.world.isClientSide && (shouldTick || world.origamiConfig.tickEmptyHoppers)) { // Origami - don't tick empty hoppers - --this.j; - this.k = this.world.getTime(); - if (!this.m()) { -@@ -145,7 +146,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - boolean result = this.a(() -> { - return a((IHopper) this); - }); -- if (!result && this.world.spigotConfig.hopperCheck > 1) { -+ if (!result && this.world.spigotConfig.hopperCheck > 1 && this.world.spigotConfig.hopperCheck > this.getCooldown()) { // Origami - only set check cooldown if it's bigger than already set one - this.setCooldown(this.world.spigotConfig.hopperCheck); - } - // Spigot end -@@ -154,6 +155,26 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - } - } - -+ // Origami start - don't tick empty hoppers -+ @Override -+ public void update() { -+ shouldTick = true; -+ super.update(); -+ } -+ -+ public static void enableTicking(TileEntity tileEntity, int cooldown) { -+ if (tileEntity instanceof TileEntityHopper) { -+ if (!((TileEntityHopper) tileEntity).shouldTick) { -+ if (((TileEntityHopper) tileEntity).getCooldown() > cooldown && tileEntity.getBlock().get(BlockHopper.ENABLED)) { -+ // Force the hopper to update if it is enabled and didn't tick/decrease cooldown before -+ ((TileEntityHopper) tileEntity).setCooldown(cooldown); -+ } -+ ((TileEntityHopper) tileEntity).shouldTick = true; -+ } -+ } -+ } -+ // Origami end -+ - private boolean a(Supplier supplier) { - if (this.world != null && !this.world.isClientSide) { - if (!this.m() && (Boolean) this.getBlock().get(BlockHopper.ENABLED)) { -@@ -161,6 +182,10 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - - if (!this.isEmpty()) { - flag = this.k(); -+ // Origami - don't tick empty hoppers -+ } else { -+ shouldTick = world.origamiConfig.tickEmptyHoppers; -+ // Origami end - } - - if (!this.j()) { -@@ -240,7 +265,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - } - } - if (foundItem && world.paperConfig.cooldownHopperWhenFull) { // Inventory was full - cooldown -- this.setCooldown(world.spigotConfig.hopperTransfer); -+ this.setCooldown(world.origamiConfig.fullHopperCooldown > -1 ? world.origamiConfig.fullHopperCooldown : world.spigotConfig.hopperTransfer); // Origami - full hopper cooldown config - } - return false; - } -@@ -280,7 +305,13 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - origItemStack.setCount(origCount); - - if (world.paperConfig.cooldownHopperWhenFull) { -- cooldownHopper(ihopper); -+ // Origami start - full hopper cooldown config -+ if (ihopper instanceof TileEntityHopper) { -+ ((TileEntityHopper) ihopper).setCooldown(world.origamiConfig.fullHopperCooldown > -1 ? world.origamiConfig.fullHopperCooldown : world.spigotConfig.hopperTransfer); -+ } else if (ihopper instanceof EntityMinecartHopper) { -+ ((EntityMinecartHopper) ihopper).setCooldown(world.spigotConfig.hopperTransfer / 2); -+ } -+ // Origami end - full hopper cooldown config - } - - return false; -@@ -488,6 +519,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - entityitem = (EntityItem) iterator.next(); - } while (!a((IInventory) ihopper, entityitem)); - -+ if (ihopper instanceof TileEntityHopper) ((TileEntityHopper) ihopper).shouldTick = true; // Origami - don't tick empty hoppers - return true; - } - } -@@ -576,7 +608,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - itemstack = a(iinventory, iinventory1, itemstack, k, enumdirection); - } - } -- -+ if (iinventory1 instanceof TileEntityHopper) ((TileEntityHopper) iinventory1).shouldTick = true; // Origami - don't tick empty hoppers - return itemstack; - } - -@@ -717,7 +749,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - return (double) this.position.getZ() + 0.5D; - } - -- private void setCooldown(int i) { -+ public void setCooldown(int i) { // Origami - make public - this.j = i; - } - -@@ -744,6 +776,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi - BlockPosition blockposition = this.getPosition(); - - if (VoxelShapes.c(VoxelShapes.a(entity.getBoundingBox().d((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()))), this.aa_(), OperatorBoolean.AND)) { -+ enableTicking(this, 0); // Origami - don't tick empty hoppers - this.a(() -> { - return a((IInventory) this, (EntityItem) entity); - }); diff --git a/patches/Origami/patches/server/0006-Add-timings-for-Behavior.patch b/patches/Origami/patches/server/0005-Add-timings-for-Behavior.patch similarity index 100% rename from patches/Origami/patches/server/0006-Add-timings-for-Behavior.patch rename to patches/Origami/patches/server/0005-Add-timings-for-Behavior.patch diff --git a/patches/Origami/patches/server/0007-Don-t-wake-up-entities-when-damage-event-is-cancelle.patch b/patches/Origami/patches/server/0006-Don-t-wake-up-entities-when-damage-event-is-cancelle.patch similarity index 86% rename from patches/Origami/patches/server/0007-Don-t-wake-up-entities-when-damage-event-is-cancelle.patch rename to patches/Origami/patches/server/0006-Don-t-wake-up-entities-when-damage-event-is-cancelle.patch index b5762c15..b3b59ae2 100644 --- a/patches/Origami/patches/server/0007-Don-t-wake-up-entities-when-damage-event-is-cancelle.patch +++ b/patches/Origami/patches/server/0006-Don-t-wake-up-entities-when-damage-event-is-cancelle.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't wake up entities when damage event is cancelled diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 89b8840e5cfc0fe0aa023882375c9b83826d1037..255f6b53db10191e8a6a2241d4cb4d6d8cad3a0b 100644 +index 9e0c00bf0c1fb41d09de39d2a3831b6bc6658259..02c7110759d6104afb673fe56f4fdbac137644d3 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -1214,9 +1214,12 @@ public abstract class EntityLiving extends Entity { +@@ -1226,9 +1226,12 @@ public abstract class EntityLiving extends Entity { } else if (damagesource.isFire() && this.hasEffect(MobEffects.FIRE_RESISTANCE)) { return false; } else { @@ -24,7 +24,7 @@ index 89b8840e5cfc0fe0aa023882375c9b83826d1037..255f6b53db10191e8a6a2241d4cb4d6d this.ticksFarFromPlayer = 0; float f1 = f; -@@ -1982,6 +1985,11 @@ public abstract class EntityLiving extends Entity { +@@ -1994,6 +1997,11 @@ public abstract class EntityLiving extends Entity { if (event.isCancelled()) { return false; } diff --git a/patches/Origami/patches/server/0008-Fix-exp-drop-of-zombie-pigmen-MC-56653.patch b/patches/Origami/patches/server/0007-Fix-exp-drop-of-zombie-pigmen-MC-56653.patch similarity index 92% rename from patches/Origami/patches/server/0008-Fix-exp-drop-of-zombie-pigmen-MC-56653.patch rename to patches/Origami/patches/server/0007-Fix-exp-drop-of-zombie-pigmen-MC-56653.patch index 02381aee..bbfc885f 100644 --- a/patches/Origami/patches/server/0008-Fix-exp-drop-of-zombie-pigmen-MC-56653.patch +++ b/patches/Origami/patches/server/0007-Fix-exp-drop-of-zombie-pigmen-MC-56653.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix exp drop of zombie pigmen (MC-56653) diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java -index bd81abc4dc17491c9c4bb10c2edb4e1ca103c8f8..e72be36d860630afb879b40bf028c5e456169634 100644 +index f9762c7f40bbb850d14fb7b0c9ff4f3c09921155..9a008acd3e6dd5522d163dfbe09c611f6f717d4e 100644 --- a/src/main/java/de/minebench/origami/OrigamiConfig.java +++ b/src/main/java/de/minebench/origami/OrigamiConfig.java -@@ -123,6 +123,10 @@ public final class OrigamiConfig { +@@ -117,6 +117,10 @@ public final class OrigamiConfig { private void observerClock() { disableObserverClocks = getBoolean("disable-observer-clocks", disableObserverClocks); } diff --git a/patches/Purpur/patches/api/0001-Purpur-config-files.patch b/patches/Purpur/patches/api/0001-Purpur-config-files.patch index ce0aa85d..403c8580 100644 --- a/patches/Purpur/patches/api/0001-Purpur-config-files.patch +++ b/patches/Purpur/patches/api/0001-Purpur-config-files.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Purpur config files diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index b3e7b2a8eaa3980e34bc74a846320b7871dc6e4b..c4aa05ae1fbc67b455f82ca6c08c7706659269ad 100644 +index d1a9322cf54f57f0d213145aa50c219f0eb2a90b..1a319e2842f4b99951f1cddce8b2b4be9f5373a0 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1603,6 +1603,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/Purpur/patches/api/0007-Bring-back-server-name.patch b/patches/Purpur/patches/api/0007-Bring-back-server-name.patch index 0b7f1215..8f3f708c 100644 --- a/patches/Purpur/patches/api/0007-Bring-back-server-name.patch +++ b/patches/Purpur/patches/api/0007-Bring-back-server-name.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Bring back server name diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 5f7208196684d9c8373df28b7cfb5f9e21baa41e..7eab52112a488150636a1457f5d7aba84da6cbf5 100644 +index 33f04d57b7df3a6f9743246ba9af6d67f4fa4b54..45c64a9e4f20428a9a448194f22697a17dfb8e1f 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1943,4 +1943,15 @@ public final class Bukkit { +@@ -1951,4 +1951,15 @@ public final class Bukkit { public static Server.Spigot spigot() { return server.spigot(); } @@ -25,12 +25,12 @@ index 5f7208196684d9c8373df28b7cfb5f9e21baa41e..7eab52112a488150636a1457f5d7aba8 + // Purpur end } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index c4aa05ae1fbc67b455f82ca6c08c7706659269ad..ce2909995791f3b334d253afc382baea9e49dd1d 100644 +index 1a319e2842f4b99951f1cddce8b2b4be9f5373a0..91641c358b10219d4098f40b53ea56f1cfa5defc 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1719,4 +1719,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1725,4 +1725,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @NotNull - com.destroystokyo.paper.entity.ai.MobGoals getMobGoals(); + io.papermc.paper.datapack.DatapackManager getDatapackManager(); // Paper end + + // Purpur start diff --git a/patches/Purpur/patches/api/0010-Lagging-threshold.patch b/patches/Purpur/patches/api/0010-Lagging-threshold.patch index 4b19f99e..38000ae4 100644 --- a/patches/Purpur/patches/api/0010-Lagging-threshold.patch +++ b/patches/Purpur/patches/api/0010-Lagging-threshold.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Lagging threshold diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 7eab52112a488150636a1457f5d7aba84da6cbf5..801bef2a060962b5c4f92234401e5bc34a62141a 100644 +index 45c64a9e4f20428a9a448194f22697a17dfb8e1f..b3cd3e5288bdcdd928efb8cba97f504d8e3ec58e 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1953,5 +1953,14 @@ public final class Bukkit { +@@ -1961,5 +1961,14 @@ public final class Bukkit { public static String getServerName() { return server.getServerName(); } @@ -24,10 +24,10 @@ index 7eab52112a488150636a1457f5d7aba84da6cbf5..801bef2a060962b5c4f92234401e5bc3 // Purpur end } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index ce2909995791f3b334d253afc382baea9e49dd1d..28a1fe3af1546daa779df46468e0ff8ad823f9ca 100644 +index 91641c358b10219d4098f40b53ea56f1cfa5defc..f546e3422539d91f1fcb98c94a722c4b17ef0170 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1727,5 +1727,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1733,5 +1733,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ @NotNull String getServerName(); diff --git a/patches/Purpur/patches/api/0011-ItemFactory-getMonsterEgg.patch b/patches/Purpur/patches/api/0011-ItemFactory-getMonsterEgg.patch index 4701a250..f426c80e 100644 --- a/patches/Purpur/patches/api/0011-ItemFactory-getMonsterEgg.patch +++ b/patches/Purpur/patches/api/0011-ItemFactory-getMonsterEgg.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemFactory#getMonsterEgg diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index eab52f8615b329a795b3fe3a3719e5687e105061..0c5e488fca4370a18fede705f58bff25f3a7b4cb 100644 +index ec7c07564608386c3f7d4322d0af4cbb7d92bc74..39323b3151c733392333858a2dbf1f3f8637341e 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java -@@ -233,4 +233,15 @@ public interface ItemFactory { +@@ -242,4 +242,15 @@ public interface ItemFactory { @Deprecated net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName); // Paper end diff --git a/patches/Purpur/patches/api/0017-ItemStack-convenience-methods.patch b/patches/Purpur/patches/api/0017-ItemStack-convenience-methods.patch index 33492a01..68b5fd67 100644 --- a/patches/Purpur/patches/api/0017-ItemStack-convenience-methods.patch +++ b/patches/Purpur/patches/api/0017-ItemStack-convenience-methods.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack convenience methods diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 9b1c9e60dba9ea3ef8d8e164f13dd76daf57db8e..b04e9de7183f00a9a47c1fce26895c83c8c0cfd8 100644 +index e2b3470e3c9a97671723f5a67f722fb86fb07fbf..560b441ef35e507236e683b04f6a774c5949a078 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -8718,4 +8718,40 @@ public enum Material implements Keyed { +@@ -8731,4 +8731,40 @@ public enum Material implements Keyed { // } } @@ -50,7 +50,7 @@ index 9b1c9e60dba9ea3ef8d8e164f13dd76daf57db8e..b04e9de7183f00a9a47c1fce26895c83 + // Purpur end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 3c64c6ef397af102a3e085fe6b77a888d5c3de84..8c6d6399b8562631f391a5a18cbde7ae5ef4a46b 100644 +index 3e2c08641edffcf00b230ad624685aaff30af0e5..fceba6780a15c274c4689eccbeb6dfb2eee25ed9 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java @@ -17,6 +17,18 @@ import org.bukkit.inventory.meta.ItemMeta; @@ -72,8 +72,8 @@ index 3c64c6ef397af102a3e085fe6b77a888d5c3de84..8c6d6399b8562631f391a5a18cbde7ae /** * Represents a stack of items. -@@ -853,4 +865,626 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor - return Bukkit.getUnsafe().getItemStackRarity(this); +@@ -914,4 +926,626 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor + return Bukkit.getUnsafe().isValidRepairItemStack(toBeRepaired, this); } // Paper end + diff --git a/patches/Purpur/patches/api/0028-Left-handed-API.patch b/patches/Purpur/patches/api/0028-Left-handed-API.patch index f5bb5e3c..5e8b1e02 100644 --- a/patches/Purpur/patches/api/0028-Left-handed-API.patch +++ b/patches/Purpur/patches/api/0028-Left-handed-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Left handed API diff --git a/src/main/java/org/bukkit/entity/Mob.java b/src/main/java/org/bukkit/entity/Mob.java -index d726453c041a980576312b6bee96a07837f37974..9d4eae5cf0bf8d01954db85b431bcdca8490ee8f 100644 +index 7d4ce660adb21e579e564796568945ee20f0ca59..4205dc5746dafd966f95103cdd2a1a55e79642f8 100644 --- a/src/main/java/org/bukkit/entity/Mob.java +++ b/src/main/java/org/bukkit/entity/Mob.java -@@ -64,4 +64,20 @@ public interface Mob extends LivingEntity, Lootable { +@@ -146,4 +146,20 @@ public interface Mob extends LivingEntity, Lootable { * @return whether the mob is aware */ public boolean isAware(); diff --git a/patches/Purpur/patches/api/0031-Fix-javadoc-warnings-missing-param-and-return.patch b/patches/Purpur/patches/api/0031-Fix-javadoc-warnings-missing-param-and-return.patch index 29a5ac07..52031d69 100644 --- a/patches/Purpur/patches/api/0031-Fix-javadoc-warnings-missing-param-and-return.patch +++ b/patches/Purpur/patches/api/0031-Fix-javadoc-warnings-missing-param-and-return.patch @@ -419,37 +419,6 @@ index 5bb677ce585b856b3d3e589e29786a29619c56a7..613f00fa387dcc5af3191e550dea9d4d public class CachedSizeConcurrentLinkedQueue extends ConcurrentLinkedQueue { private final LongAdder cachedSize = new LongAdder(); -diff --git a/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java -index a0f748957f4472103dd27fc95a711a42de7fae89..c66b49f05be7a9cc26ba595829d7751d38aebeb1 100644 ---- a/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java -+++ b/src/main/java/io/papermc/paper/event/player/AsyncChatEvent.java -@@ -19,6 +19,11 @@ public final class AsyncChatEvent extends AbstractChatEvent { - } - - /** -+ * @param async Async -+ * @param player Player -+ * @param recipients Recipients -+ * @param formatter Formatter -+ * @param message Message - * @deprecated use {@link #AsyncChatEvent(boolean, Player, Set, ChatComposer, Component)} - */ - @Deprecated -diff --git a/src/main/java/io/papermc/paper/event/player/ChatEvent.java b/src/main/java/io/papermc/paper/event/player/ChatEvent.java -index 13c5df5fb8ce1d0203d99e88dd691019146a8f52..558d6531e9c06e25369074932fd9f0ab00e9e2c8 100644 ---- a/src/main/java/io/papermc/paper/event/player/ChatEvent.java -+++ b/src/main/java/io/papermc/paper/event/player/ChatEvent.java -@@ -24,6 +24,10 @@ public final class ChatEvent extends AbstractChatEvent { - } - - /** -+ * @param player Player -+ * @param recipients Recipients -+ * @param formatter Formatter -+ * @param message Message - * @deprecated use {@link #ChatEvent(Player, Set, ChatComposer, Component)} - */ - @Deprecated diff --git a/src/main/java/io/papermc/paper/inventory/ItemRarity.java b/src/main/java/io/papermc/paper/inventory/ItemRarity.java index 74ef8395cc040ce488c2acaa416db20272cc2734..b974627a415cd6897b245275e953cc907a5929d8 100644 --- a/src/main/java/io/papermc/paper/inventory/ItemRarity.java @@ -520,7 +489,7 @@ index 3afd5f5c0208a4ee93b5dbfc2aab2b9d2e8a7544..7838731e0e16bdccfb79e74ceb64148f /** diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 28a1fe3af1546daa779df46468e0ff8ad823f9ca..7a3be414ef9d54d7a852ba92d704011fa7f125ac 100644 +index f546e3422539d91f1fcb98c94a722c4b17ef0170..a126581c74da8fae4c86fde2f28a850150c408cd 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1568,6 +1568,9 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @@ -534,7 +503,7 @@ index 28a1fe3af1546daa779df46468e0ff8ad823f9ca..7a3be414ef9d54d7a852ba92d704011f @NotNull diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 3bf6e58b2351cee935e23abec1cea289e31943dc..5f2d5e12f11b471662943680b2012c99a8466306 100644 +index 379acee1b5f2d06e6a96f3444783f4a29ca24095..ef3011d74ce9acf02d0ee857033816854134ec0e 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -87,6 +87,8 @@ public interface UnsafeValues { @@ -549,7 +518,7 @@ index 3bf6e58b2351cee935e23abec1cea289e31943dc..5f2d5e12f11b471662943680b2012c99 @@ -105,6 +107,8 @@ public interface UnsafeValues { /** * Return the translation key for the Material, so the client can translate it into the active - * locale when using a TranslatableComponent. + * locale when using a {@link net.kyori.adventure.text.TranslatableComponent}. + * + * @param mat Material to check * @return the translation key @@ -558,7 +527,7 @@ index 3bf6e58b2351cee935e23abec1cea289e31943dc..5f2d5e12f11b471662943680b2012c99 @@ -112,6 +116,8 @@ public interface UnsafeValues { /** * Return the translation key for the Block, so the client can translate it into the active - * locale when using a TranslatableComponent. + * locale when using a {@link net.kyori.adventure.text.TranslatableComponent}. + * + * @param block Block to check * @return the translation key @@ -566,14 +535,14 @@ index 3bf6e58b2351cee935e23abec1cea289e31943dc..5f2d5e12f11b471662943680b2012c99 String getTranslationKey(org.bukkit.block.Block block); @@ -120,6 +126,8 @@ public interface UnsafeValues { * Return the translation key for the EntityType, so the client can translate it into the active - * locale when using a TranslatableComponent.
+ * locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.
* This is null, when the EntityType isn't known to NMS (custom entities) + * + * @param type EntityType to check * @return the translation key */ String getTranslationKey(org.bukkit.entity.EntityType type); -@@ -128,6 +136,8 @@ public interface UnsafeValues { +@@ -135,6 +143,8 @@ public interface UnsafeValues { * Creates and returns the next EntityId available. *

* Use this when sending custom packets, so that there are no collisions on the client or server. @@ -1073,7 +1042,7 @@ index 4623e0d767b343cbdc6fcf20b3b2ff7ff14863cf..ca3f98a8272bab3c9f57f59b077b206c /** diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java -index 1c367f78eadf24850061a84ce63b950b79d3c435..9021865244a7eacf0477b0db790e0ff41fc8ddfd 100644 +index 684477b894e52ff33f9fce2edf76e58c292dd75e..581abc69290ca14b8e64f50fdf5a49c14be13940 100644 --- a/src/main/java/org/bukkit/entity/Skeleton.java +++ b/src/main/java/org/bukkit/entity/Skeleton.java @@ -27,7 +27,9 @@ public interface Skeleton extends Monster, RangedEntity { // Paper @@ -1416,7 +1385,7 @@ index c7b17eabf07b829a02afe7c1f27a5127b6bfea70..d4e2bcf8ce8fc2af851b471490147f00 /** diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index 0c5e488fca4370a18fede705f58bff25f3a7b4cb..551bed4f91fe23d36f3299b1b1576546722eb799 100644 +index 39323b3151c733392333858a2dbf1f3f8637341e..b2af5217a74266917365c3bf216a780b95c833bd 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java @@ -148,6 +148,7 @@ public interface ItemFactory { @@ -1427,7 +1396,7 @@ index 0c5e488fca4370a18fede705f58bff25f3a7b4cb..551bed4f91fe23d36f3299b1b1576546 * @return A hover event */ @NotNull -@@ -179,7 +180,7 @@ public interface ItemFactory { +@@ -188,7 +189,7 @@ public interface ItemFactory { /** * Creates a {@link net.md_5.bungee.api.chat.hover.content.Content} of that ItemStack for displaying. * diff --git a/patches/Purpur/patches/api/0036-Add-unsafe-Entity-serialization-API.patch b/patches/Purpur/patches/api/0036-Add-unsafe-Entity-serialization-API.patch index 4c533123..db374eca 100644 --- a/patches/Purpur/patches/api/0036-Add-unsafe-Entity-serialization-API.patch +++ b/patches/Purpur/patches/api/0036-Add-unsafe-Entity-serialization-API.patch @@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 5f2d5e12f11b471662943680b2012c99a8466306..7395fe0261da696d1b16c845d244ad5d6957d92a 100644 +index ef3011d74ce9acf02d0ee857033816854134ec0e..b2502aaab690b1414a1adffdf64e5a5456feb99c 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -165,4 +165,28 @@ public interface UnsafeValues { +@@ -194,4 +194,28 @@ public interface UnsafeValues { */ int getProtocolVersion(); // Paper end diff --git a/patches/Purpur/patches/api/0037-Conflict-on-change-for-adventure-deprecations.patch b/patches/Purpur/patches/api/0037-Conflict-on-change-for-adventure-deprecations.patch index c265cbed..934a5e1c 100644 --- a/patches/Purpur/patches/api/0037-Conflict-on-change-for-adventure-deprecations.patch +++ b/patches/Purpur/patches/api/0037-Conflict-on-change-for-adventure-deprecations.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Conflict on change for adventure deprecations diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 801bef2a060962b5c4f92234401e5bc34a62141a..d754200879bda29d582998433e1a304a6988bbbb 100644 +index b3cd3e5288bdcdd928efb8cba97f504d8e3ec58e..8036c66af0bc6b11ffd0f716138901bcfea007e1 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -303,7 +303,7 @@ public final class Bukkit { @@ -72,7 +72,7 @@ index 801bef2a060962b5c4f92234401e5bc34a62141a..d754200879bda29d582998433e1a304a return server.getShutdownMessage(); } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 7a3be414ef9d54d7a852ba92d704011fa7f125ac..0a3acc1aa156900aa2a6a5682ffb8c3dc25e7534 100644 +index a126581c74da8fae4c86fde2f28a850150c408cd..0f66655541dbb0dbb05a13a3612bb46cfb2b538a 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -250,7 +250,7 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @@ -370,10 +370,10 @@ index 129eac25da4f27489038fb15ab1aeecb172b60cc..670aca11bbaa2d155cd9d2105ac94c9d return title; } diff --git a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java -index c9af02b0f62b3d18da1e91d1ea02ce0864fc60b9..5e4ade542c79b87a5174e7affb649d818d546362 100644 +index 77aefda5aac4602bf5bf71c29600e7450defdd4e..240552d61ae12fbec826f771f0f366500e72d941 100644 --- a/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java +++ b/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java -@@ -161,7 +161,7 @@ public class AsyncPlayerPreLoginEvent extends Event { +@@ -179,7 +179,7 @@ public class AsyncPlayerPreLoginEvent extends Event { * @deprecated in favour of {@link #kickMessage()} */ @NotNull @@ -382,7 +382,7 @@ index c9af02b0f62b3d18da1e91d1ea02ce0864fc60b9..5e4ade542c79b87a5174e7affb649d81 public String getKickMessage() { return org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().serialize(this.message); // Paper } -@@ -172,7 +172,7 @@ public class AsyncPlayerPreLoginEvent extends Event { +@@ -190,7 +190,7 @@ public class AsyncPlayerPreLoginEvent extends Event { * @param message New kick message * @deprecated in favour of {@link #kickMessage(net.kyori.adventure.text.Component)} */ @@ -391,7 +391,7 @@ index c9af02b0f62b3d18da1e91d1ea02ce0864fc60b9..5e4ade542c79b87a5174e7affb649d81 public void setKickMessage(@NotNull final String message) { this.message = org.bukkit.Bukkit.getUnsafe().legacyComponentSerializer().deserialize(message); // Paper } -@@ -192,7 +192,7 @@ public class AsyncPlayerPreLoginEvent extends Event { +@@ -210,7 +210,7 @@ public class AsyncPlayerPreLoginEvent extends Event { * @param message Kick message to display to the user * @deprecated in favour of {@link #disallow(org.bukkit.event.player.AsyncPlayerPreLoginEvent.Result, net.kyori.adventure.text.Component)} */ diff --git a/patches/Purpur/patches/api/0039-Iron-golem-poppy-calms-anger.patch b/patches/Purpur/patches/api/0039-Iron-golem-poppy-calms-anger.patch new file mode 100644 index 00000000..0287a30a --- /dev/null +++ b/patches/Purpur/patches/api/0039-Iron-golem-poppy-calms-anger.patch @@ -0,0 +1,17 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Thu, 13 May 2021 21:38:01 -0500 +Subject: [PATCH] Iron golem poppy calms anger + + +diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java +index 39f77041133228c4bd4cec2427ad0bae8e739d4a..29144c0e325a3efbef05670a6fb2e849bbed6bba 100644 +--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java ++++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java +@@ -214,5 +214,6 @@ public interface VanillaGoal extends Goal { + GoalKey DROWNED_ATTACK_VILLAGER = GoalKey.of(Drowned.class, NamespacedKey.minecraft("drowned_attack_villager")); + GoalKey ZOMBIE_ATTACK_VILLAGER = GoalKey.of(Zombie.class, NamespacedKey.minecraft("zombie_attack_villager")); + GoalKey AVOID_RABID_WOLVES = GoalKey.of(Wolf.class, NamespacedKey.minecraft("avoid_rabid_wolves")); ++ GoalKey RECEIVE_FLOWER = GoalKey.of(IronGolem.class, NamespacedKey.minecraft("receive_flower")); + // Purpur end + } diff --git a/patches/Purpur/patches/server/0001-Rebrand.patch b/patches/Purpur/patches/server/0001-Rebrand.patch index 677ce203..54f7e80a 100644 --- a/patches/Purpur/patches/server/0001-Rebrand.patch +++ b/patches/Purpur/patches/server/0001-Rebrand.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Rebrand diff --git a/pom.xml b/pom.xml -index c917f825378dd16a329105b4e7fcc8882755bc5a..6fe8dad8df109531f2b38fbfcb58b6807dbb8cf0 100644 +index efa2ea6b8422f900643eb2f0f65cf067c034cea3..5136762f8e95cb1ea2564b6801703fb6f019fbe1 100644 --- a/pom.xml +++ b/pom.xml @@ -39,8 +39,10 @@ @@ -21,7 +21,7 @@ index c917f825378dd16a329105b4e7fcc8882755bc5a..6fe8dad8df109531f2b38fbfcb58b680 ${project.version} compile -@@ -182,6 +184,14 @@ +@@ -209,6 +211,14 @@ @@ -36,7 +36,7 @@ index c917f825378dd16a329105b4e7fcc8882755bc5a..6fe8dad8df109531f2b38fbfcb58b680 tuinity-${minecraft.version} -@@ -361,8 +371,15 @@ +@@ -414,8 +424,15 @@ org.eclipse.jdt ecj @@ -92,10 +92,10 @@ index 3bc5cd1e53dd7c94b948e7f57f0dc8e073e349b0..87891161f5b06bb8be0e2016b490484e throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 2bb00a42492b08036e984d3e1d9a564d4b4226c2..42c24781d058cee94db8f0fa1a6849b41a0394ff 100644 +index 06d0592bebaefc16c1995781a9e8a3554f4a3205..e26b1d7b6ffc726c8ae8b469eab9df73c033a73f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { @@ -76,7 +76,7 @@ index b2343d4e5c4dd6ec44503c275c374739bba28536..2affa0ba416957c4c8767708c9e88fc1 })) { // CraftBukkit start long l = this.worldData.getDayTime() + 24000L; -@@ -1347,7 +1347,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1363,7 +1363,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { while (iterator.hasNext()) { EntityPlayer entityplayer = (EntityPlayer) iterator.next(); @@ -86,7 +86,7 @@ index b2343d4e5c4dd6ec44503c275c374739bba28536..2affa0ba416957c4c8767708c9e88fc1 } else if (entityplayer.isSleeping()) { ++j; diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index e0c606bb6ecf23f2118a65775c05b437a09826d3..85964e7fe2cc96ad3b967dadd9ee5d095ee60e2a 100644 +index 64fe0acfccd50465c5fe8c49346a6db2b830155e..8c9a6130fae64509c6e4a79e785bac5f60ba1cd1 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -399,6 +399,12 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -263,10 +263,10 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..2578a4677d1ee060f687be531e696b7c + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 51d68fc13fcb8c30c10e21063f4d658f403df8ce..9e07a1e59bf756101a0aaff9891361cc7486854d 100644 +index f82fb89e30e30681b2052d1c6a2f24428d6fbfc7..05bd48bb026a71dd420b4d73c58da781828d58e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2496,4 +2496,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2494,4 +2494,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return spigot; } // Spigot end diff --git a/patches/Purpur/patches/server/0008-Bring-back-server-name.patch b/patches/Purpur/patches/server/0008-Bring-back-server-name.patch index dec8bf11..7f352b52 100644 --- a/patches/Purpur/patches/server/0008-Bring-back-server-name.patch +++ b/patches/Purpur/patches/server/0008-Bring-back-server-name.patch @@ -17,12 +17,12 @@ index 1fab9b9c7d41a0d2a551096c2c15f741a887fa2d..f33309f4c1ad92960d0634f3f5b8105c public final boolean spawnNpcs = this.getBoolean("spawn-npcs", true); public final boolean pvp = this.getBoolean("pvp", true); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 555685c32aa9b0dfbdf0e2ed4a2802eafd37495a..f33f770a259ca59c50270ae70e4a14ed879967a2 100644 +index f53389a49e62f54faa6af19226589305b597d1ae..3efe2a4eff95349107134b097033bf978f083d56 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2524,4 +2524,11 @@ public final class CraftServer implements Server { - return mobGoals; +@@ -2554,4 +2554,11 @@ public final class CraftServer implements Server { } + // Paper end + + // Purpur start diff --git a/patches/Purpur/patches/server/0009-Configurable-server-mod-name.patch b/patches/Purpur/patches/server/0009-Configurable-server-mod-name.patch index 753eaf69..f51086d3 100644 --- a/patches/Purpur/patches/server/0009-Configurable-server-mod-name.patch +++ b/patches/Purpur/patches/server/0009-Configurable-server-mod-name.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable server mod name diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 42c24781d058cee94db8f0fa1a6849b41a0394ff..6121ef7fcbadb50d05fad4270556e825f636f4d8 100644 +index e26b1d7b6ffc726c8ae8b469eab9df73c033a73f..87d121dcbb8fcf3545f6c80ce3e219358800d6b9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1646,7 +1646,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant d; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 6966b9d1ce674232d3f867798fa58bd0933ff69e..1cc473eb4d346b1b498a7b170973fb44d8b8aea6 100644 +index 347c23d4b7d47198f214c3f95354e8abb660b191..4ec0e93d93936080d876ffa017ebe181d2896b22 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -396,4 +396,18 @@ public final class CraftItemFactory implements ItemFactory { +@@ -401,4 +401,18 @@ public final class CraftItemFactory implements ItemFactory { new net.md_5.bungee.api.chat.TextComponent(customName)); } // Paper end diff --git a/patches/Purpur/patches/server/0015-Player-invulnerabilities.patch b/patches/Purpur/patches/server/0015-Player-invulnerabilities.patch index 27e0f97c..0d39fb47 100644 --- a/patches/Purpur/patches/server/0015-Player-invulnerabilities.patch +++ b/patches/Purpur/patches/server/0015-Player-invulnerabilities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player invulnerabilities diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b5a7fe1e3 100644 +index aee1946f96ec6007caef63b2183c5218ffe71836..e65a3e3e7bf6a366c30b44e166e2085966ebc933 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -284,6 +284,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -285,6 +285,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.canPickUpLoot = true; this.maxHealthCache = this.getMaxHealth(); this.cachedSingleMobDistanceMap = new com.destroystokyo.paper.util.PooledHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper @@ -17,7 +17,7 @@ index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b } // Paper start public BlockPosition getPointInFront(double inFront) { -@@ -1119,6 +1121,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1129,6 +1131,12 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } @@ -30,7 +30,7 @@ index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b @Override public boolean damageEntity(DamageSource damagesource, float f) { if (this.isInvulnerable(damagesource)) { -@@ -1126,7 +1134,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1136,7 +1144,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } else { boolean flag = this.server.j() && this.canPvP() && "fall".equals(damagesource.translationIndex); @@ -39,7 +39,7 @@ index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b return false; } else { if (damagesource instanceof EntityDamageSource) { -@@ -1302,6 +1310,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1312,6 +1320,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } // Paper end @@ -47,7 +47,7 @@ index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b return this; } } -@@ -2489,9 +2498,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2520,9 +2529,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public boolean isFrozen() { // Paper - protected > public @@ -67,19 +67,19 @@ index c42a2813b40152079786dde33231d945f3144580..6e3a3a50e01c41b40451bce05015714b public Scoreboard getScoreboard() { return getBukkitEntity().getScoreboard().getHandle(); diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index 85964e7fe2cc96ad3b967dadd9ee5d095ee60e2a..71ab9f136144aa7b06494144671b41e2af85de48 100644 +index 8c9a6130fae64509c6e4a79e785bac5f60ba1cd1..234f87a64684473d9458d0eceefab0b98ab7785e 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java -@@ -1901,6 +1901,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -1902,6 +1902,7 @@ public class PlayerConnection implements PacketListenerPlayIn { PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer()); // Paper start PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packetplayinresourcepackstatus.status.ordinal()]; -+ player.setFrozen(packStatus == PlayerResourcePackStatusEvent.Status.ACCEPTED); // Purpur ++ if (player.world.purpurConfig.playerInvulnerableWhileAcceptingResourcePack) player.setFrozen(packStatus == PlayerResourcePackStatusEvent.Status.ACCEPTED); // Purpur player.getBukkitEntity().setResourcePackStatus(packStatus); this.server.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(getPlayer(), packStatus)); // Paper end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 76ba1e038fb68eafa2c2039fa1cdd74d060dcf9f..2e5afd00bc7a2a58fd66c3bf1b38293762408662 100644 +index ab113991486c913e0a05df1029571d3e920af9c7..d640150c803bc30a353ad34215cbb413632ada86 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1015,6 +1015,8 @@ public abstract class PlayerList { @@ -108,10 +108,10 @@ index 2578a4677d1ee060f687be531e696b7c7be89e84..c441fcea9b2b5a77b801c8a69541cf42 + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9e07a1e59bf756101a0aaff9891361cc7486854d..1c5bcc17a702f5af514ce4db7f5d096d5f449dd6 100644 +index 05bd48bb026a71dd420b4d73c58da781828d58e4..14b9e4c845d73946f4151c902e12aa0690b9414c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2512,5 +2512,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2510,5 +2510,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetIdleTimer() { getHandle().resetIdleTimer(); } diff --git a/patches/Purpur/patches/server/0018-Alternative-Keepalive-Handling.patch b/patches/Purpur/patches/server/0018-Alternative-Keepalive-Handling.patch index f2887070..94d3b011 100644 --- a/patches/Purpur/patches/server/0018-Alternative-Keepalive-Handling.patch +++ b/patches/Purpur/patches/server/0018-Alternative-Keepalive-Handling.patch @@ -17,7 +17,7 @@ index b4c37287362907b8507d156b978ba5b9d961bb7b..9e6e6636539702507abb78515e002819 return this.a; } diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index 71ab9f136144aa7b06494144671b41e2af85de48..a0a476d55afdf5ed9850368e99ab25af019075a8 100644 +index 234f87a64684473d9458d0eceefab0b98ab7785e..017c3cd5edfd78917445f7313a4d9455c3bde9a1 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -233,6 +233,7 @@ public class PlayerConnection implements PacketListenerPlayIn { @@ -50,7 +50,7 @@ index 71ab9f136144aa7b06494144671b41e2af85de48..a0a476d55afdf5ed9850368e99ab25af if (this.isPendingPing()) { if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected PlayerConnection.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getName()); // more info -@@ -3084,6 +3100,16 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -3085,6 +3101,16 @@ public class PlayerConnection implements PacketListenerPlayIn { @Override public void a(PacketPlayInKeepAlive packetplayinkeepalive) { diff --git a/patches/Purpur/patches/server/0019-Silk-touch-spawners.patch b/patches/Purpur/patches/server/0019-Silk-touch-spawners.patch index c0a79d03..c3c75227 100644 --- a/patches/Purpur/patches/server/0019-Silk-touch-spawners.patch +++ b/patches/Purpur/patches/server/0019-Silk-touch-spawners.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Silk touch spawners diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java -index cd2da276c09dcf98c1c50dc66aa30dd3b67b43af..2ef13ce5cb7df206753f41a692d74c8d68354cfc 100644 +index c60457e9240c33a4721b82a00cef081fb320c8a7..5b5460c66291f1242ac7a20bc38514e214920739 100644 --- a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java +++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java @@ -81,6 +81,7 @@ public final class PaperAdventure { diff --git a/patches/Purpur/patches/server/0021-Fix-vanilla-command-permission-handler.patch b/patches/Purpur/patches/server/0021-Fix-vanilla-command-permission-handler.patch index 6a393adb..06216b6d 100644 --- a/patches/Purpur/patches/server/0021-Fix-vanilla-command-permission-handler.patch +++ b/patches/Purpur/patches/server/0021-Fix-vanilla-command-permission-handler.patch @@ -17,7 +17,7 @@ index c0fac7369b111e65b896a15848ae22457e5e8914..5278997e522b495b83e53cac5968388d public void removeCommand(String name) { children.remove(name); diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java -index 5702f18cd39c1e7b5614c28a628108e2204b2ec1..b069ee845b2011b2c669b6c75d0a773f52e06e10 100644 +index 56a0665127c7c55049b8438c91e72b6881ed11e0..575bc7d8a433cd6d4755757d82fe3a18da184d5a 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java +++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java @@ -87,6 +87,7 @@ public final class VanillaCommandWrapper extends BukkitCommand { diff --git a/patches/Purpur/patches/server/0022-Logger-settings-suppressing-pointless-logs.patch b/patches/Purpur/patches/server/0022-Logger-settings-suppressing-pointless-logs.patch index b357cfb2..6f9d0532 100644 --- a/patches/Purpur/patches/server/0022-Logger-settings-suppressing-pointless-logs.patch +++ b/patches/Purpur/patches/server/0022-Logger-settings-suppressing-pointless-logs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Logger settings (suppressing pointless logs) diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -index 7a8a1960882e291c46301d07da3e1c5415516893..59d781b5e61c5d2c004bc92300d8d42e81821308 100644 +index dfdbc028f68ced197ad179248ed3b1e9d70ba057..a1ee1066108985a95abddb03ff447b5a14f4f85f 100644 --- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java +++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -@@ -189,6 +189,7 @@ public class AdvancementDataPlayer { +@@ -190,6 +190,7 @@ public class AdvancementDataPlayer { if (advancement == null) { // CraftBukkit start if (entry.getKey().getNamespace().equals("minecraft")) { diff --git a/patches/Purpur/patches/server/0023-Disable-outdated-build-check.patch b/patches/Purpur/patches/server/0023-Disable-outdated-build-check.patch index f6fccf8e..e9ffedec 100644 --- a/patches/Purpur/patches/server/0023-Disable-outdated-build-check.patch +++ b/patches/Purpur/patches/server/0023-Disable-outdated-build-check.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable outdated build check diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index adf182b651ba8c7105483a4b18d1adfea37f91b9..326548230af7f64aabc8cdd1a1c804e734c9e0e0 100644 +index 09168bced10094c2058ffe7a10613b83360d998b..51cdc7e87413302a73416a5da724d873efb29657 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -260,7 +260,7 @@ public class Main { +@@ -272,7 +272,7 @@ public class Main { System.setProperty(TerminalConsoleAppender.JLINE_OVERRIDE_PROPERTY, "false"); // Paper } diff --git a/patches/Purpur/patches/server/0024-Giants-AI-settings.patch b/patches/Purpur/patches/server/0024-Giants-AI-settings.patch index 38175841..b52330a2 100644 --- a/patches/Purpur/patches/server/0024-Giants-AI-settings.patch +++ b/patches/Purpur/patches/server/0024-Giants-AI-settings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Giants AI settings diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 99c93d48726b4b92a341ba98721173df8b4ff30a..b0cfd7e2be03222e3e34791e5bf6fb77a5d91c5a 100644 +index 2a779f1219de2eb1d2ba7d28110bed4824b1d5c5..5925a62e1c9a605ada4cf15a07a07ef7f543a29c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -228,7 +228,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne @@ -18,10 +18,10 @@ index 99c93d48726b4b92a341ba98721173df8b4ff30a..b0cfd7e2be03222e3e34791e5bf6fb77 public float I; protected final Random random; diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index dc78bafeddf6b584181c818b90efa7ff531377a3..af04853ba114a80eb756c1700d27567fd8548e13 100644 +index 91eecf296905b85d7cc602dbc3a7b14479ec686a..dcc185b1e54886c8e82ee278e749d97044352405 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -@@ -1027,6 +1027,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1030,6 +1030,7 @@ public abstract class EntityInsentient extends EntityLiving { return f; } @@ -29,7 +29,7 @@ index dc78bafeddf6b584181c818b90efa7ff531377a3..af04853ba114a80eb756c1700d27567f protected void a(DifficultyDamageScaler difficultydamagescaler) { if (this.random.nextFloat() < 0.15F * difficultydamagescaler.d()) { int i = this.random.nextInt(2); -@@ -1134,6 +1135,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1137,6 +1138,7 @@ public abstract class EntityInsentient extends EntityLiving { } } @@ -38,7 +38,7 @@ index dc78bafeddf6b584181c818b90efa7ff531377a3..af04853ba114a80eb756c1700d27567f float f = difficultydamagescaler.d(); diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 6d4f844c68ce48b942280fc5f3a54af89b31c093..8feb1526a3cd5e9cdd2ce731a7701527180e157d 100644 +index bb030f5b258d82a1a3e60151b42a113b8f8022f1..b2be16652756de1ad06cc4a98cdbe95406a445d3 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -261,6 +261,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Purpur/patches/server/0026-Zombie-horse-naturally-spawn.patch b/patches/Purpur/patches/server/0026-Zombie-horse-naturally-spawn.patch index 3d5260b5..67a61f3a 100644 --- a/patches/Purpur/patches/server/0026-Zombie-horse-naturally-spawn.patch +++ b/patches/Purpur/patches/server/0026-Zombie-horse-naturally-spawn.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Zombie horse naturally spawn diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 2affa0ba416957c4c8767708c9e88fc1944bfc71..a240e83f71a00e1b062486e47d42b5a9444f9ca3 100644 +index 6433ce5a5b951334efb3d8d7199f784f23392e0e..e5de307dd70ab9a07cf8357e4d73e4f5d69e21ef 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -96,6 +96,7 @@ import net.minecraft.world.entity.ai.village.poi.VillagePlace; @@ -16,7 +16,7 @@ index 2affa0ba416957c4c8767708c9e88fc1944bfc71..a240e83f71a00e1b062486e47d42b5a9 import net.minecraft.world.entity.animal.horse.EntityHorseSkeleton; import net.minecraft.world.entity.boss.EntityComplexPart; import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon; -@@ -1221,12 +1222,18 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1237,12 +1238,18 @@ public class WorldServer extends World implements GeneratorAccessSeed { boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper if (flag1) { diff --git a/patches/Purpur/patches/server/0031-Dont-send-useless-entity-packets.patch b/patches/Purpur/patches/server/0031-Dont-send-useless-entity-packets.patch index aaca9df2..b749252e 100644 --- a/patches/Purpur/patches/server/0031-Dont-send-useless-entity-packets.patch +++ b/patches/Purpur/patches/server/0031-Dont-send-useless-entity-packets.patch @@ -26,10 +26,10 @@ index 0eed10a6c4e0c7245f219d19ed1e2e5c94364db9..2b54a5f3347f788b751892105f888663 protected boolean h; protected boolean i; diff --git a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java -index 67ca28463f5add7c18f7f16b918c3f36f8feeeda..53e773c14689967d5b12467bf209eefb05f7a812 100644 +index 6aad662d823e0a64b8e18156b5f084399bc4f228..71df7a322bcb1f8050bf37a0c1a8dc1d307166c3 100644 --- a/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/level/EntityTrackerEntry.java -@@ -200,6 +200,7 @@ public class EntityTrackerEntry { +@@ -202,6 +202,7 @@ public class EntityTrackerEntry { this.o = 0; packet1 = new PacketPlayOutEntityTeleport(this.tracker); } @@ -37,7 +37,7 @@ index 67ca28463f5add7c18f7f16b918c3f36f8feeeda..53e773c14689967d5b12467bf209eefb } if ((this.e || this.tracker.impulse || this.tracker instanceof EntityLiving && ((EntityLiving) this.tracker).isGliding()) && this.tickCounter > 0) { -@@ -286,6 +287,22 @@ public class EntityTrackerEntry { +@@ -288,6 +289,22 @@ public class EntityTrackerEntry { } diff --git a/patches/Purpur/patches/server/0032-Tulips-change-fox-type.patch b/patches/Purpur/patches/server/0032-Tulips-change-fox-type.patch index 4c440e6e..0a18c286 100644 --- a/patches/Purpur/patches/server/0032-Tulips-change-fox-type.patch +++ b/patches/Purpur/patches/server/0032-Tulips-change-fox-type.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Tulips change fox type diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java -index a3b714a9d63c6bb33a2731fb9293c9d155754b17..cea46348c0876e168376061fbaf258048e9358cb 100644 +index b7fa24318ef43918b6b10ff4ea8acb960527296e..19a9affdaba52d8e7dc1c4c20d5c0d52829f4989 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java @@ -30,6 +30,8 @@ import net.minecraft.tags.Tag; diff --git a/patches/Purpur/patches/server/0038-Cows-eat-mushrooms.patch b/patches/Purpur/patches/server/0038-Cows-eat-mushrooms.patch index b4990b91..3036af3c 100644 --- a/patches/Purpur/patches/server/0038-Cows-eat-mushrooms.patch +++ b/patches/Purpur/patches/server/0038-Cows-eat-mushrooms.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cows eat mushrooms diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index b0cfd7e2be03222e3e34791e5bf6fb77a5d91c5a..690685ac224a8b63a022d0801e3e4adb9416cc39 100644 +index 5925a62e1c9a605ada4cf15a07a07ef7f543a29c..284fa5ed0393ed767ae4b74ee925105e1b10acae 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2917,6 +2917,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne @@ -17,7 +17,7 @@ index b0cfd7e2be03222e3e34791e5bf6fb77a5d91c5a..690685ac224a8b63a022d0801e3e4adb this.setPositionRotation(entity.locX(), entity.locY(), entity.locZ(), entity.yaw, entity.pitch); } diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 8feb1526a3cd5e9cdd2ce731a7701527180e157d..d419d71af42c361d30aab12e4d245358667f857b 100644 +index b2be16652756de1ad06cc4a98cdbe95406a445d3..65d09af57111bb99f2438731bb8c053f6e3fafba 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -176,7 +176,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Purpur/patches/server/0044-Signs-allow-color-codes.patch b/patches/Purpur/patches/server/0044-Signs-allow-color-codes.patch index 24097334..79e151a6 100644 --- a/patches/Purpur/patches/server/0044-Signs-allow-color-codes.patch +++ b/patches/Purpur/patches/server/0044-Signs-allow-color-codes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Signs allow color codes diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index 6e3a3a50e01c41b40451bce05015714b5a7fe1e3..43900bb788f4baef420de0782c77d74dd7310f6e 100644 +index e65a3e3e7bf6a366c30b44e166e2085966ebc933..a8d60d288afd9b413494fe6abe8cfddb7c1f0b3b 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -1579,6 +1579,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1603,6 +1603,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public void openSign(TileEntitySign tileentitysign) { @@ -17,10 +17,10 @@ index 6e3a3a50e01c41b40451bce05015714b5a7fe1e3..43900bb788f4baef420de0782c77d74d this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition())); } diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index a0a476d55afdf5ed9850368e99ab25af019075a8..3559f52e2fa30a8a7600334ece981fe34896bd68 100644 +index 017c3cd5edfd78917445f7313a4d9455c3bde9a1..4041e5d0964ec6844b156c9097cd70ec59002854 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java -@@ -3078,6 +3078,15 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -3079,6 +3079,15 @@ public class PlayerConnection implements PacketListenerPlayIn { } } // Paper end diff --git a/patches/Purpur/patches/server/0046-Minecart-settings-and-WASD-controls.patch b/patches/Purpur/patches/server/0046-Minecart-settings-and-WASD-controls.patch index 26e41da3..8f957f18 100644 --- a/patches/Purpur/patches/server/0046-Minecart-settings-and-WASD-controls.patch +++ b/patches/Purpur/patches/server/0046-Minecart-settings-and-WASD-controls.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Minecart settings and WASD controls diff --git a/src/main/java/net/minecraft/core/BlockPosition.java b/src/main/java/net/minecraft/core/BlockPosition.java -index 8edc279e7a3fdfb7e10718f1deee34b7e3fb2f28..9a446a77dd9dbf5fa6f6fe763c4586cc377980d6 100644 +index 6a6381e85fef2ae2b9b5e6dff0b7917b92fa01e5..17d63cd4ca152adc66ffe9ffd3227a0770738a29 100644 --- a/src/main/java/net/minecraft/core/BlockPosition.java +++ b/src/main/java/net/minecraft/core/BlockPosition.java @@ -42,6 +42,12 @@ public class BlockPosition extends BaseBlockPosition { @@ -22,10 +22,10 @@ index 8edc279e7a3fdfb7e10718f1deee34b7e3fb2f28..9a446a77dd9dbf5fa6f6fe763c4586cc super(i, j, k); } diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index 43900bb788f4baef420de0782c77d74dd7310f6e..01d4aa706f5c1cf35210bbdbf25b4687d110eaa1 100644 +index a8d60d288afd9b413494fe6abe8cfddb7c1f0b3b..57900f89695bcce9aa6e90ab96007e456ef0448a 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -1132,6 +1132,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1142,6 +1142,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { if (this.isInvulnerable(damagesource)) { return false; } else { @@ -34,7 +34,7 @@ index 43900bb788f4baef420de0782c77d74dd7310f6e..01d4aa706f5c1cf35210bbdbf25b4687 if (!flag && isSpawnInvulnerable() && damagesource != DamageSource.OUT_OF_WORLD) { // Purpur diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index d419d71af42c361d30aab12e4d245358667f857b..bb227e7dfb1e91a7f5dcc4c7498387033b98df0f 100644 +index 65d09af57111bb99f2438731bb8c053f6e3fafba..3116644a2689c7f553fac0fe778fe7277b0ac02d 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -194,9 +194,9 @@ public abstract class EntityLiving extends Entity { @@ -170,7 +170,7 @@ index 527f3ed664854cdd938c34f00a064bc2f77148cc..1a1de9491a50e9e746e714fcb35633c2 } } diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index f8a982add50862f1bc977f3039e7e9aeed9138ae..fb7d5fa53c51766f348271285a2e921be1ca0497 100644 +index 96d7990c66bd569b1b5ee287c0238c7dbb4c503e..2448ff8e3a9c60d6d99dd8f4d3033553b2780c77 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -83,6 +83,7 @@ public class Block extends BlockBase implements IMaterial { diff --git a/patches/Purpur/patches/server/0047-Disable-loot-drops-on-death-by-cramming.patch b/patches/Purpur/patches/server/0047-Disable-loot-drops-on-death-by-cramming.patch index 8c84a135..cfd7b08b 100644 --- a/patches/Purpur/patches/server/0047-Disable-loot-drops-on-death-by-cramming.patch +++ b/patches/Purpur/patches/server/0047-Disable-loot-drops-on-death-by-cramming.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable loot drops on death by cramming diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index bb227e7dfb1e91a7f5dcc4c7498387033b98df0f..e31538338e02fdb6e859c37bed899e5f3a83d5ae 100644 +index 3116644a2689c7f553fac0fe778fe7277b0ac02d..7654b244bcabec35a3a9cdda862ebe220abf41c0 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -1598,8 +1598,10 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Purpur/patches/server/0048-Players-should-not-cram-to-death.patch b/patches/Purpur/patches/server/0048-Players-should-not-cram-to-death.patch index 359d4579..158c4cfa 100644 --- a/patches/Purpur/patches/server/0048-Players-should-not-cram-to-death.patch +++ b/patches/Purpur/patches/server/0048-Players-should-not-cram-to-death.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Players should not cram to death diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index 01d4aa706f5c1cf35210bbdbf25b4687d110eaa1..257265a036a62c7d5fbcff17a10a41198ed880a4 100644 +index 57900f89695bcce9aa6e90ab96007e456ef0448a..c766ec5ac4519d1c734a10e667988ada040096c5 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -1556,7 +1556,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1580,7 +1580,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override public boolean isInvulnerable(DamageSource damagesource) { diff --git a/patches/Purpur/patches/server/0051-Fix-the-dead-lagging-the-server.patch b/patches/Purpur/patches/server/0051-Fix-the-dead-lagging-the-server.patch index 58c2f89e..3b6476e9 100644 --- a/patches/Purpur/patches/server/0051-Fix-the-dead-lagging-the-server.patch +++ b/patches/Purpur/patches/server/0051-Fix-the-dead-lagging-the-server.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix the dead lagging the server diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 690685ac224a8b63a022d0801e3e4adb9416cc39..56d7662ccc2181df298f37a043f7af4036fe6125 100644 +index 284fa5ed0393ed767ae4b74ee925105e1b10acae..a70ed426cea0567e03876bc8d054ee59a2492de2 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1662,6 +1662,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne @@ -17,7 +17,7 @@ index 690685ac224a8b63a022d0801e3e4adb9416cc39..56d7662ccc2181df298f37a043f7af40 public void f(double d0, double d1, double d2) { diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index e31538338e02fdb6e859c37bed899e5f3a83d5ae..af08ec27f8c07653daa328d84bfc142bfc8a7f78 100644 +index 7654b244bcabec35a3a9cdda862ebe220abf41c0..1da0905798c89b3c4b5a6ce93a838935b60cbfc4 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -2610,7 +2610,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Purpur/patches/server/0052-Skip-events-if-there-s-no-listeners.patch b/patches/Purpur/patches/server/0052-Skip-events-if-there-s-no-listeners.patch index 8a72a4f7..df7dfa6e 100644 --- a/patches/Purpur/patches/server/0052-Skip-events-if-there-s-no-listeners.patch +++ b/patches/Purpur/patches/server/0052-Skip-events-if-there-s-no-listeners.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Skip events if there's no listeners diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java -index 29a395e69aab9c50a45c5fd5ab8795fd8e3ef727..5ae31658fb1183eab66f682cc5477bc526c27753 100644 +index 7e30ec9a08d919d2ae9218ee0a11f77719129f07..b1bfc42b4153b225243ba65e7f937c0314cb39a5 100644 --- a/src/main/java/net/minecraft/commands/CommandDispatcher.java +++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java -@@ -367,6 +367,7 @@ public class CommandDispatcher { +@@ -368,6 +368,7 @@ public class CommandDispatcher { } private void runSync(EntityPlayer entityplayer, Collection bukkit, RootCommandNode rootcommandnode) { @@ -16,7 +16,7 @@ index 29a395e69aab9c50a45c5fd5ab8795fd8e3ef727..5ae31658fb1183eab66f682cc5477bc5 // Paper end - Async command map building new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent(entityplayer.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper PlayerCommandSendEvent event = new PlayerCommandSendEvent(entityplayer.getBukkitEntity(), new LinkedHashSet<>(bukkit)); -@@ -379,6 +380,7 @@ public class CommandDispatcher { +@@ -380,6 +381,7 @@ public class CommandDispatcher { } } // CraftBukkit end diff --git a/patches/Purpur/patches/server/0053-Add-permission-for-F3-N-debug.patch b/patches/Purpur/patches/server/0053-Add-permission-for-F3-N-debug.patch index 0bae63f2..c0231604 100644 --- a/patches/Purpur/patches/server/0053-Add-permission-for-F3-N-debug.patch +++ b/patches/Purpur/patches/server/0053-Add-permission-for-F3-N-debug.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add permission for F3+N debug diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 2e5afd00bc7a2a58fd66c3bf1b38293762408662..3622ea01edfb9dfaab254ceaf09582d9e8993174 100644 +index d640150c803bc30a353ad34215cbb413632ada86..fc47887dfd3d32788fa11845c738af53126fba46 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1174,6 +1174,7 @@ public abstract class PlayerList { diff --git a/patches/Purpur/patches/server/0055-Configurable-TPS-Catchup.patch b/patches/Purpur/patches/server/0055-Configurable-TPS-Catchup.patch index f3d1f2b1..9a10b29e 100644 --- a/patches/Purpur/patches/server/0055-Configurable-TPS-Catchup.patch +++ b/patches/Purpur/patches/server/0055-Configurable-TPS-Catchup.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable TPS Catchup diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c086f50613cc3b1061c9958eb2a8aba059a61e29..dccff89fcacdafe4961cd3121eb38ff8844e10da 100644 +index 8a11047d0e60d20c83f2013b5e1488fe08152142..ac21ebf5d835fb34dbaad5f3c40cc5aeb6153231 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1132,7 +1132,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant= world.paperConfig.netherVoidTopDamageHeight)) { this.doVoidDamage(); diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index af08ec27f8c07653daa328d84bfc142bfc8a7f78..0d5bb154e4213283734c1c2c437aec2a8b8877fc 100644 +index 1da0905798c89b3c4b5a6ce93a838935b60cbfc4..5203c1ecb333b7bf5a707e77e559ec707c276e6b 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -2129,7 +2129,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Purpur/patches/server/0068-Dispenser-curse-of-binding-protection.patch b/patches/Purpur/patches/server/0068-Dispenser-curse-of-binding-protection.patch index bf2489e6..c4720e21 100644 --- a/patches/Purpur/patches/server/0068-Dispenser-curse-of-binding-protection.patch +++ b/patches/Purpur/patches/server/0068-Dispenser-curse-of-binding-protection.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Dispenser curse of binding protection diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 4b4578e02fd4be72f20458c54a878892e3029d56..84995be65d033dd712211e1e479675815099c3b1 100644 +index ec38a27dfa6eebc818f54cf14bbe4287bee8bb29..db1863aac58409d13ec093506c23ab7cb29a2379 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -65,6 +65,7 @@ import net.minecraft.world.item.ItemSword; @@ -16,7 +16,7 @@ index 4b4578e02fd4be72f20458c54a878892e3029d56..84995be65d033dd712211e1e47967581 import net.minecraft.world.level.GameRules; import net.minecraft.world.level.GeneratorAccess; import net.minecraft.world.level.IBlockAccess; -@@ -1074,6 +1075,13 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1077,6 +1078,13 @@ public abstract class EntityInsentient extends EntityLiving { } diff --git a/patches/Purpur/patches/server/0070-Add-obfhelpers-for-plugin-use.patch b/patches/Purpur/patches/server/0070-Add-obfhelpers-for-plugin-use.patch index 793fe557..3bfcad3a 100644 --- a/patches/Purpur/patches/server/0070-Add-obfhelpers-for-plugin-use.patch +++ b/patches/Purpur/patches/server/0070-Add-obfhelpers-for-plugin-use.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add obfhelpers for plugin use diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index fee862951f2767d4a3c5268dff157c185378a939..91a1b2e955b04f0cc1ca05d7ee4d832d9efb97cb 100644 +index 366ceb65d40c685117d1c79a933864ab91d8aa11..a342174cf35ee6ac1f10028b60c5a19e1b547ef4 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -694,6 +694,7 @@ public final class ItemStack { diff --git a/patches/Purpur/patches/server/0071-Mending-mends-most-damages-equipment-first.patch b/patches/Purpur/patches/server/0071-Mending-mends-most-damages-equipment-first.patch index b4abe44c..67fe1f72 100644 --- a/patches/Purpur/patches/server/0071-Mending-mends-most-damages-equipment-first.patch +++ b/patches/Purpur/patches/server/0071-Mending-mends-most-damages-equipment-first.patch @@ -18,7 +18,7 @@ index a7551e95185895a290be70d501496279eaf884ae..31d36ead273e8397ba2c826b791a2cf5 if (entry != null) { ItemStack itemstack = (ItemStack) entry.getValue(); diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 91a1b2e955b04f0cc1ca05d7ee4d832d9efb97cb..fcc6ee9481d577d39339cd0ac24dab06bd76e5c6 100644 +index a342174cf35ee6ac1f10028b60c5a19e1b547ef4..72400425d6177ba938057ec145f9499eb1160288 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -468,10 +468,19 @@ public final class ItemStack { diff --git a/patches/Purpur/patches/server/0072-Add-5-second-tps-average-in-tps.patch b/patches/Purpur/patches/server/0072-Add-5-second-tps-average-in-tps.patch index 471e610d..ea4d8e6e 100644 --- a/patches/Purpur/patches/server/0072-Add-5-second-tps-average-in-tps.patch +++ b/patches/Purpur/patches/server/0072-Add-5-second-tps-average-in-tps.patch @@ -27,10 +27,10 @@ index dc6bc1910ad0f9b27144d5750078c3ca607d03d3..e8be35f836ede2630d44902e99a21489 setListData(vector); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index dccff89fcacdafe4961cd3121eb38ff8844e10da..409c272629ca935dcbaa9e73e10ace4a0bd8f9b7 100644 +index ac21ebf5d835fb34dbaad5f3c40cc5aeb6153231..cbc6d074a7366f6456c6af2a3fedf0f7bd40cb5b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -278,7 +278,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant trackedPlayerMap = null; diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index b28995ecfd7f45e6b6197be96c418aa0d05d3383..e25476f6a9477447cc06f24ed05679326e83cd95 100644 +index 38919488ce5917a751605c4ddcf0296ff0340b91..3c5e4abd104aa016e5cb8e248c4d6a5eff08a42e 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -@@ -2426,7 +2426,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -2440,7 +2440,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially public class EntityTracker { @@ -31,7 +31,7 @@ index b28995ecfd7f45e6b6197be96c418aa0d05d3383..e25476f6a9477447cc06f24ed0567932 private final int trackingDistance; private SectionPosition e; diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0950dcce2353504775813d9f60407361981c801d..6c0b1bc0c710d5795d559fe98af6319a644487cc 100644 +index db43aba6a3455abfd12b8167fefbd5cb8fc14524..f4bef3dda1c33380401750bf1179827c328e2daf 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1611,6 +1611,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/patches/Purpur/patches/server/0075-Add-ping-command.patch b/patches/Purpur/patches/server/0075-Add-ping-command.patch index a3b75b0f..164313a9 100644 --- a/patches/Purpur/patches/server/0075-Add-ping-command.patch +++ b/patches/Purpur/patches/server/0075-Add-ping-command.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add /ping command diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java -index 5ae31658fb1183eab66f682cc5477bc526c27753..94ed3811cbcc6f60a2c8bb033920f9c1ae2e91d6 100644 +index b1bfc42b4153b225243ba65e7f937c0314cb39a5..185dee82b86aa3abb04809ddcf31c81e29664c62 100644 --- a/src/main/java/net/minecraft/commands/CommandDispatcher.java +++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java @@ -191,6 +191,7 @@ public class CommandDispatcher { @@ -16,7 +16,7 @@ index 5ae31658fb1183eab66f682cc5477bc526c27753..94ed3811cbcc6f60a2c8bb033920f9c1 } if (commanddispatcher_servertype.d) { -@@ -427,10 +428,12 @@ public class CommandDispatcher { +@@ -428,10 +429,12 @@ public class CommandDispatcher { } @@ -29,7 +29,7 @@ index 5ae31658fb1183eab66f682cc5477bc526c27753..94ed3811cbcc6f60a2c8bb033920f9c1 public static RequiredArgumentBuilder a(String s, ArgumentType argumenttype) { return RequiredArgumentBuilder.argument(s, argumenttype); } -@@ -446,6 +449,7 @@ public class CommandDispatcher { +@@ -447,6 +450,7 @@ public class CommandDispatcher { }; } diff --git a/patches/Purpur/patches/server/0077-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch b/patches/Purpur/patches/server/0077-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch index 5d442f74..bb4e771f 100644 --- a/patches/Purpur/patches/server/0077-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch +++ b/patches/Purpur/patches/server/0077-Phantoms-attracted-to-crystals-and-crystals-shoot-ph.patch @@ -17,7 +17,7 @@ index 53ea8a6d90faf4f7f8fd0819be4499422bdd4cbe..6ba14f603b8ec69597c70677cc317f80 return (new EntityDamageSourceIndirect("indirectMagic", entity, entity1)).setIgnoreArmor().setMagic(); } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 6c0b1bc0c710d5795d559fe98af6319a644487cc..31835e73c2704aa56ab8b14c79dd3a337ab05dff 100644 +index f4bef3dda1c33380401750bf1179827c328e2daf..2f53f45e2e53ab01d67839957013da106b78ddc8 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2277,8 +2277,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne @@ -108,7 +108,7 @@ index 9658d93615a51375204481cfe0a1fce6f105fd70..2c983e6a092464d1867fcbe875b2e146 @Override protected void saveData(NBTTagCompound nbttagcompound) { diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java -index 42cf3fa42b73739182d26fbb524ee5b304c799b2..daf738e8f0987aa6ab200189d7a26d166918b8fc 100644 +index 16c0c960aa1e4d35093b810c7648b5638175e106..e20b26ae0435c593218541eba6c68ef297fea7c8 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java @@ -12,6 +12,7 @@ import net.minecraft.nbt.NBTTagCompound; @@ -188,8 +188,8 @@ index 42cf3fa42b73739182d26fbb524ee5b304c799b2..daf738e8f0987aa6ab200189d7a26d16 @Override protected void initDatawatcher() { -@@ -235,6 +267,136 @@ public class EntityPhantom extends EntityFlying implements IMonster { - public void setSpawningEntity(java.util.UUID entity) { this.spawningEntity = entity; } +@@ -241,6 +273,136 @@ public class EntityPhantom extends EntityFlying implements IMonster { + public void setShouldBurnInDay(boolean shouldBurnInDay) { this.shouldBurnInDay = shouldBurnInDay; } // Paper end + // Purpur start @@ -325,7 +325,7 @@ index 42cf3fa42b73739182d26fbb524ee5b304c799b2..daf738e8f0987aa6ab200189d7a26d16 class b extends PathfinderGoal { private final PathfinderTargetCondition b; -@@ -247,6 +409,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -253,6 +415,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { @Override public boolean a() { @@ -333,7 +333,7 @@ index 42cf3fa42b73739182d26fbb524ee5b304c799b2..daf738e8f0987aa6ab200189d7a26d16 if (this.c > 0) { --this.c; return false; -@@ -275,6 +438,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -281,6 +444,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { @Override public boolean b() { @@ -341,7 +341,7 @@ index 42cf3fa42b73739182d26fbb524ee5b304c799b2..daf738e8f0987aa6ab200189d7a26d16 EntityLiving entityliving = EntityPhantom.this.getGoalTarget(); return entityliving != null ? EntityPhantom.this.a(entityliving, PathfinderTargetCondition.a) : false; -@@ -289,6 +453,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -295,6 +459,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { @Override public boolean a() { diff --git a/patches/Purpur/patches/server/0078-Add-phantom-spawning-options.patch b/patches/Purpur/patches/server/0078-Add-phantom-spawning-options.patch index 49c25bea..a38a1d02 100644 --- a/patches/Purpur/patches/server/0078-Add-phantom-spawning-options.patch +++ b/patches/Purpur/patches/server/0078-Add-phantom-spawning-options.patch @@ -61,10 +61,10 @@ index d98526785ff2fa3b72e8ffffcb89a57a2203a5c8..7859d84471436b427138593776ebd30a return iblockdata.r(iblockaccess, blockposition) ? false : (iblockdata.isPowerSource() ? false : (!fluid.isEmpty() ? false : (iblockdata.a((Tag) TagsBlock.PREVENT_MOB_SPAWNING_INSIDE) ? false : !entitytypes.a(iblockdata)))); } diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index 89b892c23a396d94c11b5d6b7ffe79e892297181..23ade8d822fc7c50ccaeaef4a67351caf9a7df30 100644 +index 0ede4766117e0bc28127baf1b14535370d8ea878..9c7c68a3e73734ec2dbc57983ae27a16a7618fa2 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -1749,6 +1749,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1759,6 +1759,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return new DifficultyDamageScaler(this.getDifficulty(), this.getDayTime(), i, f); } diff --git a/patches/Purpur/patches/server/0079-Implement-bed-explosion-options.patch b/patches/Purpur/patches/server/0079-Implement-bed-explosion-options.patch index fb428375..f691001e 100644 --- a/patches/Purpur/patches/server/0079-Implement-bed-explosion-options.patch +++ b/patches/Purpur/patches/server/0079-Implement-bed-explosion-options.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement bed explosion options diff --git a/src/main/java/net/minecraft/world/level/block/BlockBed.java b/src/main/java/net/minecraft/world/level/block/BlockBed.java -index abe0a1c309d526de37efcac44922fa259e1d112c..db9ef25d0578538fd7c7950a3b3d03453da336f1 100644 +index 00a01a157deec004bcf2f8587723a0ecd0bfef85..d42a3e73c6e4e65f023fa5af65a26acbf2f01281 100644 --- a/src/main/java/net/minecraft/world/level/block/BlockBed.java +++ b/src/main/java/net/minecraft/world/level/block/BlockBed.java -@@ -137,7 +137,7 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity { +@@ -138,7 +138,7 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity { world.a(blockposition1, false); } diff --git a/patches/Purpur/patches/server/0081-Add-allow-water-in-end-world-option.patch b/patches/Purpur/patches/server/0081-Add-allow-water-in-end-world-option.patch index 3a9cd6fc..782ec26d 100644 --- a/patches/Purpur/patches/server/0081-Add-allow-water-in-end-world-option.patch +++ b/patches/Purpur/patches/server/0081-Add-allow-water-in-end-world-option.patch @@ -27,10 +27,10 @@ index d126f668828e0788e369294c0b376ef52b344f2c..154a76b1b77a97bdf65153250c41275f return true; diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index 23ade8d822fc7c50ccaeaef4a67351caf9a7df30..bf239526681ef2060e4dbedcb46a4a9d6b022fc1 100644 +index 9c7c68a3e73734ec2dbc57983ae27a16a7618fa2..45eb26b7414f39f3d4f5ca5994cd3f271f7d112f 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -1824,4 +1824,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1835,4 +1835,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public final boolean isDebugWorld() { return this.debugWorld; } diff --git a/patches/Purpur/patches/server/0082-Allow-color-codes-in-books.patch b/patches/Purpur/patches/server/0082-Allow-color-codes-in-books.patch index 1b4f978d..b7893c51 100644 --- a/patches/Purpur/patches/server/0082-Allow-color-codes-in-books.patch +++ b/patches/Purpur/patches/server/0082-Allow-color-codes-in-books.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow color codes in books diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index 3559f52e2fa30a8a7600334ece981fe34896bd68..9998f20c9cc9857612f94f91d27e77da9c632323 100644 +index 4041e5d0964ec6844b156c9097cd70ec59002854..2b3e4130b906be299760a26a5298b3c73f00103e 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -1216,7 +1216,8 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/patches/Purpur/patches/server/0083-Entity-lifespan.patch b/patches/Purpur/patches/server/0083-Entity-lifespan.patch index 1b59ab54..3944f7c8 100644 --- a/patches/Purpur/patches/server/0083-Entity-lifespan.patch +++ b/patches/Purpur/patches/server/0083-Entity-lifespan.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity lifespan diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index 9998f20c9cc9857612f94f91d27e77da9c632323..4e43cd877c45a014add62547a4dbfadbd09082d2 100644 +index 2b3e4130b906be299760a26a5298b3c73f00103e..e6d73912a333edd43c4e489c50f4e441c3b2cc29 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java -@@ -2463,6 +2463,7 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2464,6 +2464,7 @@ public class PlayerConnection implements PacketListenerPlayIn { boolean triggerLeashUpdate = itemInHand != null && itemInHand.getItem() == Items.LEAD && entity instanceof EntityInsentient; Item origItem = this.player.inventory.getItemInHand() == null ? null : this.player.inventory.getItemInHand().getItem(); PlayerInteractEntityEvent event; @@ -17,7 +17,7 @@ index 9998f20c9cc9857612f94f91d27e77da9c632323..4e43cd877c45a014add62547a4dbfadb event = new PlayerInteractEntityEvent((Player) this.getPlayer(), entity.getBukkitEntity(), (packetplayinuseentity.c() == EnumHand.OFF_HAND) ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND); } else { diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index 84995be65d033dd712211e1e479675815099c3b1..e10377b379079bc467a60abe719075c5ef73e858 100644 +index db1863aac58409d13ec093506c23ab7cb29a2379..698997425a7f5a7a5d46fa5d825ec26f61e6c7c4 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -124,7 +124,7 @@ public abstract class EntityInsentient extends EntityLiving { @@ -94,7 +94,7 @@ index 84995be65d033dd712211e1e479675815099c3b1..e10377b379079bc467a60abe719075c5 } @Override -@@ -1632,7 +1664,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1635,7 +1667,7 @@ public abstract class EntityInsentient extends EntityLiving { this.a((EntityLiving) this, entity); this.z(entity); } diff --git a/patches/Purpur/patches/server/0084-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch b/patches/Purpur/patches/server/0084-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch index 137f5119..aa5ebf27 100644 --- a/patches/Purpur/patches/server/0084-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch +++ b/patches/Purpur/patches/server/0084-Add-option-to-teleport-to-spawn-if-outside-world-bor.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add option to teleport to spawn if outside world border diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index 257265a036a62c7d5fbcff17a10a41198ed880a4..da708df0dc50ea02441f9db2bfd52f04d9a8e3da 100644 +index c766ec5ac4519d1c734a10e667988ada040096c5..b3d12463fbeb2045860c6b933da74980f778472e 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -2556,4 +2556,26 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2587,4 +2587,26 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return (CraftPlayer) super.getBukkitEntity(); } // CraftBukkit end @@ -36,7 +36,7 @@ index 257265a036a62c7d5fbcff17a10a41198ed880a4..da708df0dc50ea02441f9db2bfd52f04 + // Purpur end } diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 90c931f95dffbf9697ae4678a23d7c142c504a81..620bccdc44d3325dcb4450af979363ee94ba3f97 100644 +index 75f397067ea57335ab57e492ae212b440d7bedf1..30defe89af719e681c7ee5f8394f1fc3775c05c3 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -45,6 +45,7 @@ import net.minecraft.network.syncher.DataWatcher; diff --git a/patches/Purpur/patches/server/0088-Phantoms-burn-in-light.patch b/patches/Purpur/patches/server/0088-Phantoms-burn-in-light.patch index 847da039..90be944e 100644 --- a/patches/Purpur/patches/server/0088-Phantoms-burn-in-light.patch +++ b/patches/Purpur/patches/server/0088-Phantoms-burn-in-light.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Phantoms burn in light diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java -index daf738e8f0987aa6ab200189d7a26d166918b8fc..07ede7b75a65a5815f1ae1ebf03ec0fdb4621afb 100644 +index e20b26ae0435c593218541eba6c68ef297fea7c8..fd2e3a4abcfedaf04db4277291983627c097b545 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java @@ -18,6 +18,7 @@ import net.minecraft.sounds.SoundEffect; @@ -36,12 +36,12 @@ index daf738e8f0987aa6ab200189d7a26d166918b8fc..07ede7b75a65a5815f1ae1ebf03ec0fd @Override public void movementTick() { -- if (this.isAlive() && this.eG()) { -+ if (this.isAlive() && ((world.purpurConfig.phantomBurnInDaylight && this.isInDaylight()) || (world.purpurConfig.phantomBurnInLight > 0 && world.getLightLevel(new BlockPosition(this)) >= world.purpurConfig.phantomBurnInLight))) { // Purpur +- if (this.isAlive() && shouldBurnInDay && this.eG()) { // Paper - Configurable Burning ++ if (this.isAlive() && (((shouldBurnInDay || world.purpurConfig.phantomBurnInDaylight) && this.isInDaylight()) || (world.purpurConfig.phantomBurnInLight > 0 && world.getLightLevel(new BlockPosition(this)) >= world.purpurConfig.phantomBurnInLight))) { // Paper - Configurable Burning // Purpur this.setOnFire(8); } -@@ -416,7 +419,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -422,7 +425,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { } else { this.c = 60; List list = EntityPhantom.this.world.a(this.b, (EntityLiving) EntityPhantom.this, EntityPhantom.this.getBoundingBox().grow(16.0D, 64.0D, 16.0D)); @@ -50,7 +50,7 @@ index daf738e8f0987aa6ab200189d7a26d166918b8fc..07ede7b75a65a5815f1ae1ebf03ec0fd if (!list.isEmpty()) { list.sort(Comparator.comparing(Entity::locY).reversed()); Iterator iterator = list.iterator(); -@@ -515,6 +518,12 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -521,6 +524,12 @@ public class EntityPhantom extends EntityFlying implements IMonster { return false; } else if (entityliving instanceof EntityHuman && (((EntityHuman) entityliving).isSpectator() || ((EntityHuman) entityliving).isCreative())) { return false; diff --git a/patches/Purpur/patches/server/0090-Redstone-deactivates-spawners.patch b/patches/Purpur/patches/server/0090-Redstone-deactivates-spawners.patch index 281da9a6..5864456e 100644 --- a/patches/Purpur/patches/server/0090-Redstone-deactivates-spawners.patch +++ b/patches/Purpur/patches/server/0090-Redstone-deactivates-spawners.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Redstone deactivates spawners diff --git a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java -index 5538404456dfee42257fad9040fcc0fefdfc5fab..b3a03dc66e803d9dc7000cc7d6960e87b089b3ed 100644 +index 33a5dbcc11455f81088d9fd685a8c4b1b8f4b1f2..b65609bab36650c46e9dabdd25a139ae2af9d83a 100644 --- a/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java +++ b/src/main/java/net/minecraft/world/level/MobSpawnerAbstract.java @@ -69,6 +69,7 @@ public abstract class MobSpawnerAbstract { @@ -16,7 +16,7 @@ index 5538404456dfee42257fad9040fcc0fefdfc5fab..b3a03dc66e803d9dc7000cc7d6960e87 return this.a().isAffectsSpawningPlayerNearby((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange); // Paper } -@@ -347,7 +348,7 @@ public abstract class MobSpawnerAbstract { +@@ -348,7 +349,7 @@ public abstract class MobSpawnerAbstract { public abstract void a(int i); diff --git a/patches/Purpur/patches/server/0091-Totems-work-in-inventory.patch b/patches/Purpur/patches/server/0091-Totems-work-in-inventory.patch index 8509b4b7..d07390be 100644 --- a/patches/Purpur/patches/server/0091-Totems-work-in-inventory.patch +++ b/patches/Purpur/patches/server/0091-Totems-work-in-inventory.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Totems work in inventory diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 620bccdc44d3325dcb4450af979363ee94ba3f97..c9caa6919d47283331a9e0c79b22590b80293693 100644 +index 30defe89af719e681c7ee5f8394f1fc3775c05c3..818363663cabe88bc9f76b8e6e57725c4f2f992a 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -1426,6 +1426,19 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Purpur/patches/server/0097-Add-no-random-tick-block-list.patch b/patches/Purpur/patches/server/0097-Add-no-random-tick-block-list.patch index f4184490..a187d641 100644 --- a/patches/Purpur/patches/server/0097-Add-no-random-tick-block-list.patch +++ b/patches/Purpur/patches/server/0097-Add-no-random-tick-block-list.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add no-random-tick block list diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index a240e83f71a00e1b062486e47d42b5a9444f9ca3..e4ffc8cd3ea69563bdcd2f1f63bce519b09a0717 100644 +index e5de307dd70ab9a07cf8357e4d73e4f5d69e21ef..375ac2a1c126a27a0a47ab7a369a821785aeada9 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -532,14 +532,14 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/Purpur/patches/server/0100-Stop-squids-floating-on-top-of-water.patch b/patches/Purpur/patches/server/0100-Stop-squids-floating-on-top-of-water.patch index 4feb464d..7249293c 100644 --- a/patches/Purpur/patches/server/0100-Stop-squids-floating-on-top-of-water.patch +++ b/patches/Purpur/patches/server/0100-Stop-squids-floating-on-top-of-water.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Stop squids floating on top of water diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 31835e73c2704aa56ab8b14c79dd3a337ab05dff..4e084e26e0430422b0348a0a91f0e412ff3a9eff 100644 +index 2f53f45e2e53ab01d67839957013da106b78ddc8..4e75650f95af5b1a0cb1f5052688d4f3eb0dce70 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3587,8 +3587,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/patches/Purpur/patches/server/0101-Ridables.patch b/patches/Purpur/patches/server/0101-Ridables.patch index 87e199c0..230ba4a3 100644 --- a/patches/Purpur/patches/server/0101-Ridables.patch +++ b/patches/Purpur/patches/server/0101-Ridables.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ridables diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 409c272629ca935dcbaa9e73e10ace4a0bd8f9b7..4ceaa8e905c9ba7277ee00cea020d01d14ae2178 100644 +index cbc6d074a7366f6456c6af2a3fedf0f7bd40cb5b..8ba25be0ea59483e824be9afc63d47cb75b5b334 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1540,6 +1540,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0; // Paper worldserver.hasEntityMoveEvent = EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper @@ -18,7 +18,7 @@ index 409c272629ca935dcbaa9e73e10ace4a0bd8f9b7..4ceaa8e905c9ba7277ee00cea020d01d this.methodProfiler.a(() -> { diff --git a/src/main/java/net/minecraft/server/PathfinderGoalHasRider.java b/src/main/java/net/minecraft/server/PathfinderGoalHasRider.java new file mode 100644 -index 0000000000000000000000000000000000000000..70961ec1d385dfd7c17fed6f33e4eb7fd57bc34a +index 0000000000000000000000000000000000000000..4c5dd9431b9afb2f110228d058d2b0f0808f0ab9 --- /dev/null +++ b/src/main/java/net/minecraft/server/PathfinderGoalHasRider.java @@ -0,0 +1,21 @@ @@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..70961ec1d385dfd7c17fed6f33e4eb7f + // shouldExecute + @Override + public boolean a() { -+ return entity.hasRider(); ++ return entity.hasPurpurRider(); + } +} diff --git a/src/main/java/net/minecraft/server/PathfinderGoalHorseHasRider.java b/src/main/java/net/minecraft/server/PathfinderGoalHorseHasRider.java @@ -68,16 +68,32 @@ index 0000000000000000000000000000000000000000..8b66d1215a6eef1302b5ecb46a4b3d50 + } +} diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index da708df0dc50ea02441f9db2bfd52f04d9a8e3da..867a6b7fe1788b20f8d0f4f1e42dd52bfc6a8c2a 100644 +index b3d12463fbeb2045860c6b933da74980f778472e..d06bae9d71f23fccbfaf65c0fd9e9a550549432e 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -642,6 +642,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -80,7 +80,6 @@ import net.minecraft.server.network.PlayerConnection; + import net.minecraft.server.players.PlayerList; + import net.minecraft.sounds.SoundCategory; + import net.minecraft.sounds.SoundEffect; +-import net.minecraft.stats.RecipeBook; + import net.minecraft.stats.RecipeBookServer; + import net.minecraft.stats.ServerStatisticManager; + import net.minecraft.stats.Statistic; +@@ -132,7 +131,6 @@ import net.minecraft.world.level.block.entity.TileEntityCommand; + import net.minecraft.world.level.block.entity.TileEntitySign; + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.level.portal.ShapeDetectorShape; +-import net.minecraft.world.level.storage.WorldData; + import net.minecraft.world.phys.AxisAlignedBB; + import net.minecraft.world.phys.Vec3D; + import net.minecraft.world.scores.ScoreboardScore; +@@ -652,6 +650,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } this.advancementDataPlayer.b(this); + + // Purpur start -+ if (this.world.purpurConfig.useNightVisionWhenRiding && this.getVehicle() != null && this.getVehicle().getRider() == this && world.getTime() % 100 == 0) { // 5 seconds ++ if (this.world.purpurConfig.useNightVisionWhenRiding && this.getVehicle() != null && this.getVehicle().getPurpurRider() == this && world.getTime() % 100 == 0) { // 5 seconds + MobEffect nightVision = this.getEffect(MobEffects.NIGHT_VISION); + if (nightVision == null || nightVision.getDuration() <= 300) { // 15 seconds + this.addEffect(new MobEffect(MobEffects.NIGHT_VISION, 400, 0)); // 20 seconds @@ -88,7 +104,7 @@ index da708df0dc50ea02441f9db2bfd52f04d9a8e3da..867a6b7fe1788b20f8d0f4f1e42dd52b public void playerTick() { diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index e4ffc8cd3ea69563bdcd2f1f63bce519b09a0717..3e360ba183fc23a4bf50b5af1edb73cc75b183e1 100644 +index 375ac2a1c126a27a0a47ab7a369a821785aeada9..ac41fc5b23ec81a57c3ec8f1fa0cff0bc8d0e47d 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -216,6 +216,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -100,10 +116,10 @@ index e4ffc8cd3ea69563bdcd2f1f63bce519b09a0717..3e360ba183fc23a4bf50b5af1edb73cc return new Throwable(entity + " Added to world at " + new java.util.Date()); } diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index 4e43cd877c45a014add62547a4dbfadbd09082d2..bf6c040cfe68f96fa25511967091677abdaf4f0e 100644 +index e6d73912a333edd43c4e489c50f4e441c3b2cc29..e35a23544112aa11506951f2a609a5df54cf83a3 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java -@@ -2472,6 +2472,8 @@ public class PlayerConnection implements PacketListenerPlayIn { +@@ -2473,6 +2473,8 @@ public class PlayerConnection implements PacketListenerPlayIn { } this.server.getPluginManager().callEvent(event); @@ -133,7 +149,7 @@ index 6ba14f603b8ec69597c70677cc317f802d6afae9..24fd920394774bf38d2818a4cd013670 this.B = true; return this; diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35bf6bfc537 100644 +index 4e75650f95af5b1a0cb1f5052688d4f3eb0dce70..668f613a901523e87780f33ffff565d965521783 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -22,6 +22,7 @@ import net.minecraft.BlockUtil; @@ -144,7 +160,15 @@ index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35b import net.minecraft.advancements.CriterionTriggers; import net.minecraft.commands.CommandListenerWrapper; import net.minecraft.commands.ICommandListener; -@@ -197,7 +198,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -104,7 +105,6 @@ import net.minecraft.world.phys.AxisAlignedBB; + import net.minecraft.world.phys.MovingObjectPosition; + import net.minecraft.world.phys.Vec2F; + import net.minecraft.world.phys.Vec3D; +-import net.minecraft.world.phys.shapes.OperatorBoolean; + import net.minecraft.world.phys.shapes.VoxelShape; + import net.minecraft.world.phys.shapes.VoxelShapeCollision; + import net.minecraft.world.phys.shapes.VoxelShapes; +@@ -197,7 +197,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne private int id; public boolean i; public final boolean blocksEntitySpawning() { return this.i; } // Paper - OBFHELPER public final List passengers; @@ -153,7 +177,7 @@ index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35b @Nullable private Entity vehicle; public boolean attachedToPlayer; -@@ -213,7 +214,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -213,7 +213,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne public float lastYaw; public float lastPitch; private AxisAlignedBB boundingBox; @@ -162,7 +186,7 @@ index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35b public boolean positionChanged; public boolean v; public boolean velocityChanged; -@@ -269,7 +270,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -269,7 +269,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne private boolean az; private final double[] aA; private long aB; @@ -171,7 +195,7 @@ index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35b private float headHeight; // CraftBukkit start public boolean persist = true; -@@ -1621,6 +1622,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -1621,6 +1621,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return !this.justCreated && this.M.getDouble(TagsFluid.LAVA) > 0.0D; } @@ -179,7 +203,7 @@ index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35b public void a(float f, Vec3D vec3d) { Vec3D vec3d1 = a(vec3d, f, this.yaw); -@@ -2377,6 +2379,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2377,6 +2378,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return this.a(entity, false); } @@ -187,7 +211,7 @@ index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35b public boolean a(Entity entity, boolean flag) { for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) { if (entity1.vehicle == this) { -@@ -2472,6 +2475,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2472,6 +2474,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne this.passengers.add(entity); } @@ -195,26 +219,26 @@ index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35b + if (isRidable() && passengers.get(0) == entity && entity instanceof EntityHuman) { + EntityHuman entityhuman = (EntityHuman) entity; + onMount(entityhuman); -+ this.rider = entityhuman; ++ this.purpurRider = entityhuman; + } + // Purpur end } return true; // CraftBukkit } -@@ -2512,6 +2522,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2512,6 +2521,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return false; } // Spigot end + // Purpur start -+ if (rider != null && passengers.get(0) == rider) { -+ onDismount(rider); -+ this.rider = null; ++ if (purpurRider != null && passengers.get(0) == purpurRider) { ++ onDismount(purpurRider); ++ this.purpurRider = null; + } + // Purpur end this.passengers.remove(entity); entity.j = 60; } -@@ -2677,6 +2693,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2677,6 +2692,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne this.setFlag(4, flag); } @@ -222,7 +246,7 @@ index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35b public boolean bE() { return this.glowing || this.world.isClientSide && this.getFlag(6); } -@@ -2899,6 +2916,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2899,6 +2915,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne public void setHeadRotation(float f) {} @@ -230,7 +254,7 @@ index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35b public void n(float f) {} public boolean bL() { -@@ -3340,6 +3358,18 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -3340,6 +3357,18 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return false; } @@ -249,20 +273,20 @@ index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35b @Override public void sendMessage(IChatBaseComponent ichatbasecomponent, UUID uuid) {} -@@ -3792,4 +3822,47 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -3792,4 +3821,47 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return ((ChunkProviderServer) world.getChunkProvider()).isInEntityTickingChunk(this); } // Paper end + + // Purpur start -+ private EntityHuman rider; ++ private EntityHuman purpurRider; + -+ public EntityHuman getRider() { -+ return rider; ++ public EntityHuman getPurpurRider() { ++ return purpurRider; + } + -+ public boolean hasRider() { -+ return rider != null; ++ public boolean hasPurpurRider() { ++ return purpurRider != null; + } + + public boolean isRidable() { @@ -298,10 +322,19 @@ index 4e084e26e0430422b0348a0a91f0e412ff3a9eff..4e1363050bef7fff9117250b79cbf35b + // Purpur end } diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index e10377b379079bc467a60abe719075c5ef73e858..df33b46ff1267f0f2692a8956438f3bd1e2a3086 100644 +index 698997425a7f5a7a5d46fa5d825ec26f61e6c7c4..dd1f4c4202e30a837b48b591327b018a35a0edff 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -@@ -100,7 +100,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -46,8 +46,6 @@ import net.minecraft.world.entity.ai.sensing.EntitySenses; + import net.minecraft.world.entity.decoration.EntityHanging; + import net.minecraft.world.entity.decoration.EntityLeash; + import net.minecraft.world.entity.item.EntityItem; +-import net.minecraft.world.entity.monster.EntityBlaze; +-import net.minecraft.world.entity.monster.EntityEnderman; + import net.minecraft.world.entity.monster.IMonster; + import net.minecraft.world.entity.npc.EntityVillagerAbstract; + import net.minecraft.world.entity.player.EntityHuman; +@@ -100,7 +98,7 @@ public abstract class EntityInsentient extends EntityLiving { protected int f; protected ControllerLook lookController; protected ControllerMove moveController; @@ -310,7 +343,7 @@ index e10377b379079bc467a60abe719075c5ef73e858..df33b46ff1267f0f2692a8956438f3bd private final EntityAIBodyControl c; protected NavigationAbstract navigation; public PathfinderGoalSelector goalSelector; -@@ -138,8 +138,8 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -138,8 +136,8 @@ public abstract class EntityInsentient extends EntityLiving { this.bA = -1.0F; this.goalSelector = new PathfinderGoalSelector(world.getMethodProfilerSupplier()); this.targetSelector = new PathfinderGoalSelector(world.getMethodProfilerSupplier()); @@ -321,7 +354,7 @@ index e10377b379079bc467a60abe719075c5ef73e858..df33b46ff1267f0f2692a8956438f3bd this.bi = new ControllerJump(this); this.c = this.r(); this.navigation = this.b(world); -@@ -328,10 +328,10 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -328,10 +326,10 @@ public abstract class EntityInsentient extends EntityLiving { // Purpur start private void incrementTicksSinceLastInteraction() { ++ticksSinceLastInteraction; @@ -329,14 +362,14 @@ index e10377b379079bc467a60abe719075c5ef73e858..df33b46ff1267f0f2692a8956438f3bd - // ticksSinceLastInteraction = 0; - // return; - //} -+ if (hasRider()) { ++ if (hasPurpurRider()) { + ticksSinceLastInteraction = 0; + return; + } if (world.purpurConfig.entityLifeSpan <= 0) { return; // feature disabled } -@@ -626,14 +626,17 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -626,14 +624,17 @@ public abstract class EntityInsentient extends EntityLiving { return super.dp(); } @@ -354,7 +387,7 @@ index e10377b379079bc467a60abe719075c5ef73e858..df33b46ff1267f0f2692a8956438f3bd public void v(float f) { this.aR = f; } -@@ -1332,7 +1335,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1335,7 +1336,7 @@ public abstract class EntityInsentient extends EntityLiving { protected void a(EntityHuman entityhuman, EntityInsentient entityinsentient) {} protected EnumInteractionResult b(EntityHuman entityhuman, EnumHand enumhand) { @@ -363,7 +396,7 @@ index e10377b379079bc467a60abe719075c5ef73e858..df33b46ff1267f0f2692a8956438f3bd } public boolean ev() { -@@ -1713,4 +1716,54 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1716,4 +1717,54 @@ public abstract class EntityInsentient extends EntityLiving { this.unleash(true, event.isDropLeash()); // Paper end } @@ -419,7 +452,7 @@ index e10377b379079bc467a60abe719075c5ef73e858..df33b46ff1267f0f2692a8956438f3bd + // Purpur end } diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index c9caa6919d47283331a9e0c79b22590b80293693..84cb148faacb0587e771410680a0b053822cebf8 100644 +index 818363663cabe88bc9f76b8e6e57725c4f2f992a..377f850d2aa29e5cd8903cb65b5d85acbfff2030 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -559,7 +559,7 @@ public abstract class EntityLiving extends Entity { @@ -471,12 +504,12 @@ index c9caa6919d47283331a9e0c79b22590b80293693..84cb148faacb0587e771410680a0b053 } } + // Purpur start -+ if (hasRider()) { -+ getRider().resetIdleTimer(); ++ if (hasPurpurRider()) { ++ getPurpurRider().resetIdleTimer(); + if (((WorldServer) world).hasRidableMoveEvent && this instanceof EntityInsentient) { + Location from = new Location(world.getWorld(), lastX, lastY, lastZ, lastYaw, lastPitch); + Location to = new Location(world.getWorld(), locX(), locY(), locZ(), yaw, pitch); -+ net.pl3x.purpur.event.entity.RidableMoveEvent event = new net.pl3x.purpur.event.entity.RidableMoveEvent((org.bukkit.entity.Mob) getBukkitLivingEntity(), (Player) getRider().getBukkitEntity(), from, to.clone()); ++ net.pl3x.purpur.event.entity.RidableMoveEvent event = new net.pl3x.purpur.event.entity.RidableMoveEvent((org.bukkit.entity.Mob) getBukkitLivingEntity(), (Player) getPurpurRider().getBukkitEntity(), from, to.clone()); + if (!event.callEvent()) { + setLocation(from.getX(), from.getY(), from.getZ(), from.getYaw(), from.getPitch()); + } else if (!to.equals(event.getTo())) { @@ -646,7 +679,7 @@ index 2aa5789437ba7eb20579da238c407a65a25b1d44..434229b146978ba7dc08a83ea55fdb3a public ControllerMove(EntityInsentient entityinsentient) { diff --git a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -index 61ebb278cf4ef57ae7a86c6c6ef1fa14559f21e2..ce40df98f61b9176989c0000d078597d44e996e2 100644 +index 61ebb278cf4ef57ae7a86c6c6ef1fa14559f21e2..bee72578fae2fba56f8e8dcc1142ab54c7ba7cb8 100644 --- a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java +++ b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java @@ -21,6 +21,7 @@ import net.minecraft.world.entity.EntityPose; @@ -693,7 +726,7 @@ index 61ebb278cf4ef57ae7a86c6c6ef1fa14559f21e2..ce40df98f61b9176989c0000d078597d + @Override + public void g(Vec3D vec3d) { + super.g(vec3d); -+ if (hasRider() && !onGround) { ++ if (hasPurpurRider() && !onGround) { + float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue() * 2; + setSpeed(speed); + Vec3D mot = getMot(); @@ -720,7 +753,7 @@ index 61ebb278cf4ef57ae7a86c6c6ef1fa14559f21e2..ce40df98f61b9176989c0000d078597d @Override protected void mobTick() { + // Purpur start -+ if (hasRider()) { ++ if (hasPurpurRider()) { + Vec3D mot = getMot(); + setMot(mot.x, mot.y + (getVertical() > 0 ? 0.07D : 0.0D), mot.z); + return; @@ -730,7 +763,7 @@ index 61ebb278cf4ef57ae7a86c6c6ef1fa14559f21e2..ce40df98f61b9176989c0000d078597d BlockPosition blockposition = this.getChunkCoordinates(); BlockPosition blockposition1 = blockposition.up(); diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityBee.java b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java -index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db13e0b04b 100644 +index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..bcd510e0bf647a240edfaac1348119c5e1d7dc42 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityBee.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java @@ -22,6 +22,7 @@ import net.minecraft.network.protocol.game.PacketDebug; @@ -741,7 +774,7 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db import net.minecraft.server.level.WorldServer; import net.minecraft.sounds.SoundEffect; import net.minecraft.sounds.SoundEffects; -@@ -44,6 +45,7 @@ import net.minecraft.world.entity.EntityPose; +@@ -44,10 +45,10 @@ import net.minecraft.world.entity.EntityPose; import net.minecraft.world.entity.EntitySize; import net.minecraft.world.entity.EntityTypes; import net.minecraft.world.entity.EnumMonsterType; @@ -749,7 +782,11 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db import net.minecraft.world.entity.IEntityAngerable; import net.minecraft.world.entity.ai.attributes.AttributeProvider; import net.minecraft.world.entity.ai.attributes.GenericAttributes; -@@ -111,6 +113,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +-import net.minecraft.world.entity.ai.control.ControllerLook; + import net.minecraft.world.entity.ai.control.ControllerMoveFlying; + import net.minecraft.world.entity.ai.goal.PathfinderGoal; + import net.minecraft.world.entity.ai.goal.PathfinderGoalBreed; +@@ -111,6 +112,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB public EntityBee(EntityTypes entitytypes, World world) { super(entitytypes, world); @@ -757,7 +794,7 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db // Paper start - apply gravity to bees when they get stuck in the void, fixes MC-167279 this.moveController = new ControllerMoveFlying(this, 20, true) { @Override -@@ -120,6 +123,22 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +@@ -120,6 +122,22 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB } super.tick(); } @@ -765,8 +802,8 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db + // Purpur start + @Override + public void a() { // tick -+ if (getEntity().hasRider()) { -+ flyingController.tick(getEntity().getRider()); ++ if (getEntity().hasPurpurRider()) { ++ flyingController.tick(getEntity().getPurpurRider()); + } else { + tick(); + } @@ -774,13 +811,13 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db + + @Override + public boolean b() { // isUpdating -+ return getEntity().hasRider() || super.b(); ++ return getEntity().hasPurpurRider() || super.b(); + } + // Purpur end }; // Paper end this.lookController = new EntityBee.j(this); -@@ -130,6 +149,35 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +@@ -130,6 +148,35 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB this.a(PathType.FENCE, -1.0F); } @@ -803,7 +840,7 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db + @Override + public void g(Vec3D vec3d) { + super.g(vec3d); -+ if (hasRider() && !onGround) { ++ if (hasPurpurRider() && !onGround) { + float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue() * 2; + setSpeed(speed); + Vec3D mot = getMot(); @@ -816,7 +853,7 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db @Override protected void initDatawatcher() { super.initDatawatcher(); -@@ -144,6 +192,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +@@ -144,6 +191,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB @Override protected void initPathfinder() { @@ -824,7 +861,7 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db this.goalSelector.a(0, new EntityBee.b(this, 1.399999976158142D, true)); this.goalSelector.a(1, new EntityBee.d()); this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D)); -@@ -159,6 +208,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +@@ -159,6 +207,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB this.goalSelector.a(7, new EntityBee.g()); this.goalSelector.a(8, new EntityBee.l()); this.goalSelector.a(9, new PathfinderGoalFloat(this)); @@ -832,7 +869,7 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db this.targetSelector.a(1, (new EntityBee.h(this)).a(new Class[0])); this.targetSelector.a(2, new EntityBee.c(this)); this.targetSelector.a(3, new PathfinderGoalUniversalAngerReset<>(this, true)); -@@ -629,6 +679,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +@@ -629,6 +678,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB private d() { super(); // CraftBukkit - decompile error @@ -840,7 +877,7 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db } @Override -@@ -691,6 +742,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +@@ -691,6 +741,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB private g() { super(); // CraftBukkit - decompile error @@ -848,7 +885,7 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db } @Override -@@ -755,6 +807,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +@@ -755,6 +806,7 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB private i() { super(); // CraftBukkit - decompile error @@ -856,7 +893,7 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db } @Override -@@ -978,16 +1031,16 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +@@ -978,16 +1030,16 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB } } @@ -877,7 +914,7 @@ index 1d1f71a995a99b2101891a7a5bda7bec5d67f118..0c6d3dae70eeea844a31f9edf54410db } diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityCat.java b/src/main/java/net/minecraft/world/entity/animal/EntityCat.java -index c8f529b3fd227ce3354f442038b27cd716f57254..3efb010d0e045d14051a33bd7465669e415c26bd 100644 +index c8f529b3fd227ce3354f442038b27cd716f57254..bac3035e2382df2d79e592b02395753eee08fa4b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityCat.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityCat.java @@ -14,6 +14,7 @@ import net.minecraft.network.syncher.DataWatcher; @@ -952,7 +989,7 @@ index c8f529b3fd227ce3354f442038b27cd716f57254..3efb010d0e045d14051a33bd7465669e @Override public EnumInteractionResult b(EntityHuman entityhuman, EnumHand enumhand) { -+ if (hasRider()) return EnumInteractionResult.PASS; // Purpur ++ if (hasPurpurRider()) return EnumInteractionResult.PASS; // Purpur ItemStack itemstack = entityhuman.b(enumhand); Item item = itemstack.getItem(); @@ -1033,7 +1070,7 @@ index aac7992a30a0b69cb34097aeb0fe021f54a3cdac..897e0d5ca44a0c475634f08e7d4fcf12 protected ItemStack eK() { return new ItemStack(Items.COD_BUCKET); diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityCow.java b/src/main/java/net/minecraft/world/entity/animal/EntityCow.java -index 962dde5fcc617bc39b7d06a1e295370b9d60696c..cad256514c7df92847522c8d7ddf45ebe02658c4 100644 +index 962dde5fcc617bc39b7d06a1e295370b9d60696c..b2d3fc3151a952ac783101443772736a206a6a3b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityCow.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityCow.java @@ -2,6 +2,7 @@ package net.minecraft.world.entity.animal; @@ -1071,7 +1108,7 @@ index 962dde5fcc617bc39b7d06a1e295370b9d60696c..cad256514c7df92847522c8d7ddf45eb @Override public EnumInteractionResult b(EntityHuman entityhuman, EnumHand enumhand) { -+ if (hasRider()) return EnumInteractionResult.PASS; // Purpur ++ if (hasPurpurRider()) return EnumInteractionResult.PASS; // Purpur ItemStack itemstack = entityhuman.b(enumhand); if (itemstack.getItem() == Items.BUCKET && !this.isBaby()) { @@ -1125,7 +1162,7 @@ index 962dde5fcc617bc39b7d06a1e295370b9d60696c..cad256514c7df92847522c8d7ddf45eb this.world.addEntity(mooshroom); this.die(); diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityDolphin.java b/src/main/java/net/minecraft/world/entity/animal/EntityDolphin.java -index e0a9b931c26dbd4e7739d09ae45e1cee72ab210c..880c3aaf4e684209879dc921480619e7c61ee4a0 100644 +index e0a9b931c26dbd4e7739d09ae45e1cee72ab210c..e4442716b329f3101bfd39fc7ce13d5419b427bf 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityDolphin.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityDolphin.java @@ -16,6 +16,7 @@ import net.minecraft.network.syncher.DataWatcher; @@ -1161,13 +1198,13 @@ index e0a9b931c26dbd4e7739d09ae45e1cee72ab210c..880c3aaf4e684209879dc921480619e7 + + @Override + public boolean onSpacebar() { -+ if (spitCooldown == 0 && hasRider()) { ++ if (spitCooldown == 0 && hasPurpurRider()) { + spitCooldown = world.purpurConfig.dolphinSpitCooldown; -+ if (!hasRider()) { ++ if (!hasPurpurRider()) { + return false; + } + -+ org.bukkit.craftbukkit.entity.CraftPlayer player = (org.bukkit.craftbukkit.entity.CraftPlayer) getRider().getBukkitEntity(); ++ org.bukkit.craftbukkit.entity.CraftPlayer player = (org.bukkit.craftbukkit.entity.CraftPlayer) getPurpurRider().getBukkitEntity(); + if (!player.hasPermission("allow.special.dolphin")) { + return false; + } @@ -1266,10 +1303,18 @@ index e0a9b931c26dbd4e7739d09ae45e1cee72ab210c..880c3aaf4e684209879dc921480619e7 this.i.setMot(this.i.getMot().add(0.0D, 0.005D, 0.0D)); } diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityFish.java b/src/main/java/net/minecraft/world/entity/animal/EntityFish.java -index cbd7c37cd1d6f5dddcbc515ecc2d9df46e109bfa..bdbb389407a68d7f9fd7db366d710777ec3e2649 100644 +index cbd7c37cd1d6f5dddcbc515ecc2d9df46e109bfa..d9a5d5fb718f8c3d66844279622eae44fe826fff 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityFish.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityFish.java -@@ -8,6 +8,7 @@ import net.minecraft.nbt.NBTTagCompound; +@@ -1,13 +1,14 @@ + package net.minecraft.world.entity.animal; + + import java.util.Random; +-import java.util.function.Predicate; ++ + import net.minecraft.advancements.CriterionTriggers; + import net.minecraft.core.BlockPosition; + import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.syncher.DataWatcher; import net.minecraft.network.syncher.DataWatcherObject; import net.minecraft.network.syncher.DataWatcherRegistry; @@ -1277,7 +1322,15 @@ index cbd7c37cd1d6f5dddcbc515ecc2d9df46e109bfa..bdbb389407a68d7f9fd7db366d710777 import net.minecraft.server.level.EntityPlayer; import net.minecraft.sounds.SoundEffect; import net.minecraft.sounds.SoundEffects; -@@ -116,13 +117,12 @@ public abstract class EntityFish extends EntityWaterAnimal { +@@ -29,7 +30,6 @@ import net.minecraft.world.entity.ai.control.ControllerMove; + import net.minecraft.world.entity.ai.goal.PathfinderGoalAvoidTarget; + import net.minecraft.world.entity.ai.goal.PathfinderGoalPanic; + import net.minecraft.world.entity.ai.goal.PathfinderGoalRandomSwim; +-import net.minecraft.world.entity.ai.goal.PathfinderGoalSelector; + import net.minecraft.world.entity.ai.navigation.NavigationAbstract; + import net.minecraft.world.entity.ai.navigation.NavigationGuardian; + import net.minecraft.world.entity.player.EntityHuman; +@@ -116,13 +116,12 @@ public abstract class EntityFish extends EntityWaterAnimal { @Override protected void initPathfinder() { super.initPathfinder(); @@ -1297,16 +1350,16 @@ index cbd7c37cd1d6f5dddcbc515ecc2d9df46e109bfa..bdbb389407a68d7f9fd7db366d710777 } @Override -@@ -133,7 +133,7 @@ public abstract class EntityFish extends EntityWaterAnimal { +@@ -133,7 +132,7 @@ public abstract class EntityFish extends EntityWaterAnimal { @Override public void g(Vec3D vec3d) { if (this.doAITick() && this.isInWater()) { - this.a(0.01F, vec3d); -+ this.a(hasRider() ? getSpeed() : 0.01F, vec3d); // Purpur ++ this.a(hasPurpurRider() ? getSpeed() : 0.01F, vec3d); // Purpur this.move(EnumMoveType.SELF, this.getMot()); this.setMot(this.getMot().a(0.9D)); if (this.getGoalTarget() == null) { -@@ -220,9 +220,9 @@ public abstract class EntityFish extends EntityWaterAnimal { +@@ -220,9 +219,9 @@ public abstract class EntityFish extends EntityWaterAnimal { @Override protected void b(BlockPosition blockposition, IBlockData iblockdata) {} @@ -1318,7 +1371,7 @@ index cbd7c37cd1d6f5dddcbc515ecc2d9df46e109bfa..bdbb389407a68d7f9fd7db366d710777 a(EntityFish entityfish) { super(entityfish); -@@ -230,7 +230,15 @@ public abstract class EntityFish extends EntityWaterAnimal { +@@ -230,7 +229,15 @@ public abstract class EntityFish extends EntityWaterAnimal { } @Override @@ -1349,7 +1402,7 @@ index 21780f5dbcd4384649f08161f0812202ee94c96d..a03b0ed0a3f74ccb7572e1c4fa8e345a @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java -index cea46348c0876e168376061fbaf258048e9358cb..0c1151b598aa681e63ddaac29e4a589f917fd03b 100644 +index 19a9affdaba52d8e7dc1c4c20d5c0d52829f4989..7b1a6d846f25d8bc659a541fce59df79347ba9bc 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java @@ -21,6 +21,7 @@ import net.minecraft.network.syncher.DataWatcher; @@ -1360,7 +1413,16 @@ index cea46348c0876e168376061fbaf258048e9358cb..0c1151b598aa681e63ddaac29e4a589f import net.minecraft.server.level.EntityPlayer; import net.minecraft.server.level.WorldServer; import net.minecraft.sounds.SoundEffect; -@@ -127,6 +128,39 @@ public class EntityFox extends EntityAnimal { +@@ -48,8 +49,6 @@ import net.minecraft.world.entity.GroupDataEntity; + import net.minecraft.world.entity.IEntitySelector; + import net.minecraft.world.entity.ai.attributes.AttributeProvider; + import net.minecraft.world.entity.ai.attributes.GenericAttributes; +-import net.minecraft.world.entity.ai.control.ControllerLook; +-import net.minecraft.world.entity.ai.control.ControllerMove; + import net.minecraft.world.entity.ai.goal.PathfinderGoal; + import net.minecraft.world.entity.ai.goal.PathfinderGoalAvoidTarget; + import net.minecraft.world.entity.ai.goal.PathfinderGoalBreed; +@@ -127,6 +126,39 @@ public class EntityFox extends EntityAnimal { this.setCanPickupLoot(true); } @@ -1377,7 +1439,7 @@ index cea46348c0876e168376061fbaf258048e9358cb..0c1151b598aa681e63ddaac29e4a589f + + @Override + public float getJumpHeight() { -+ return !hasRider() ? super.getJumpHeight() : 0.5F; ++ return !hasPurpurRider() ? super.getJumpHeight() : 0.5F; + } + + @Override @@ -1400,7 +1462,7 @@ index cea46348c0876e168376061fbaf258048e9358cb..0c1151b598aa681e63ddaac29e4a589f @Override protected void initDatawatcher() { super.initDatawatcher(); -@@ -146,6 +180,7 @@ public class EntityFox extends EntityAnimal { +@@ -146,6 +178,7 @@ public class EntityFox extends EntityAnimal { return entityliving instanceof EntityFishSchool; }); this.goalSelector.a(0, new EntityFox.g()); @@ -1408,7 +1470,7 @@ index cea46348c0876e168376061fbaf258048e9358cb..0c1151b598aa681e63ddaac29e4a589f this.goalSelector.a(1, new EntityFox.b()); this.goalSelector.a(2, new EntityFox.n(2.2D)); this.goalSelector.a(3, new EntityFox.e(1.0D)); -@@ -171,6 +206,7 @@ public class EntityFox extends EntityAnimal { +@@ -171,6 +204,7 @@ public class EntityFox extends EntityAnimal { this.goalSelector.a(11, new EntityFox.p()); this.goalSelector.a(12, new EntityFox.j(this, EntityHuman.class, 24.0F)); this.goalSelector.a(13, new EntityFox.r()); @@ -1416,7 +1478,7 @@ index cea46348c0876e168376061fbaf258048e9358cb..0c1151b598aa681e63ddaac29e4a589f this.targetSelector.a(3, new EntityFox.a(EntityLiving.class, false, false, (entityliving) -> { return EntityFox.bt.test(entityliving) && !this.c(entityliving.getUniqueID()); })); -@@ -458,6 +494,7 @@ public class EntityFox extends EntityAnimal { +@@ -458,6 +492,7 @@ public class EntityFox extends EntityAnimal { return itemstack1.isEmpty() || this.bD > 0 && item.isFood() && !itemstack1.getItem().isFood(); } @@ -1424,7 +1486,7 @@ index cea46348c0876e168376061fbaf258048e9358cb..0c1151b598aa681e63ddaac29e4a589f private void m(ItemStack itemstack) { if (!itemstack.isEmpty() && !this.world.isClientSide) { EntityItem entityitem = new EntityItem(this.world, this.locX() + this.getLookDirection().x, this.locY() + 1.0D, this.locZ() + this.getLookDirection().z, itemstack); -@@ -553,6 +590,7 @@ public class EntityFox extends EntityAnimal { +@@ -553,6 +588,7 @@ public class EntityFox extends EntityAnimal { return this.t(16); } @@ -1432,7 +1494,7 @@ index cea46348c0876e168376061fbaf258048e9358cb..0c1151b598aa681e63ddaac29e4a589f public void u(boolean flag) { this.d(16, flag); } -@@ -595,6 +633,7 @@ public class EntityFox extends EntityAnimal { +@@ -595,6 +631,7 @@ public class EntityFox extends EntityAnimal { this.setSleeping(false); } @@ -1440,7 +1502,7 @@ index cea46348c0876e168376061fbaf258048e9358cb..0c1151b598aa681e63ddaac29e4a589f private void fd() { this.w(false); this.setCrouching(false); -@@ -760,16 +799,16 @@ public class EntityFox extends EntityAnimal { +@@ -760,16 +797,16 @@ public class EntityFox extends EntityAnimal { } } @@ -1460,7 +1522,7 @@ index cea46348c0876e168376061fbaf258048e9358cb..0c1151b598aa681e63ddaac29e4a589f } } -@@ -1439,16 +1478,16 @@ public class EntityFox extends EntityAnimal { +@@ -1439,16 +1476,16 @@ public class EntityFox extends EntityAnimal { } } @@ -1771,7 +1833,7 @@ index 711b322007a0973ff0aebf3c25efbae8fc7741d0..0d912399e1975d9c0d5525f5b89049f4 } } diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java -index 699dd0ac1f8d0d340ab1a560106336fc7cc95d5b..5c26eea7e3e93dc7bcd8b86519e84db58b70cecb 100644 +index 699dd0ac1f8d0d340ab1a560106336fc7cc95d5b..9f705b75a14ba456808485ce4ddef9550aac3fe9 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java @@ -16,6 +16,7 @@ import net.minecraft.nbt.NBTTagCompound; @@ -1800,8 +1862,8 @@ index 699dd0ac1f8d0d340ab1a560106336fc7cc95d5b..5c26eea7e3e93dc7bcd8b86519e84db5 + this.moveController = new ControllerMoveFlying(this, 10, false) { + @Override + public void a() { // tick -+ if (getEntity().hasRider()) { -+ flyingController.tick(getEntity().getRider()); ++ if (getEntity().hasPurpurRider()) { ++ flyingController.tick(getEntity().getPurpurRider()); + } else { + tick(); + } @@ -1809,7 +1871,7 @@ index 699dd0ac1f8d0d340ab1a560106336fc7cc95d5b..5c26eea7e3e93dc7bcd8b86519e84db5 + + @Override + public boolean b() { // isUpdating -+ return getEntity().hasRider() ? getForward() != 0 || getStrafe() != 0 : super.b(); ++ return getEntity().hasPurpurRider() ? getForward() != 0 || getStrafe() != 0 : super.b(); + } + }; + // Purpur end @@ -1837,7 +1899,7 @@ index 699dd0ac1f8d0d340ab1a560106336fc7cc95d5b..5c26eea7e3e93dc7bcd8b86519e84db5 + @Override + public void g(Vec3D vec3d) { + super.g(vec3d); -+ if (hasRider() && !onGround) { ++ if (hasPurpurRider() && !onGround) { + float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue() * 2; + setSpeed(speed); + Vec3D mot = getMot(); @@ -1898,7 +1960,7 @@ index 1a540e41e6161d011ca4ed30c68ae9df4567b8db..cef69f99d7bc9b6605b9654c50f43a1e this.goalSelector.a(3, new PathfinderGoalBreed(this, 1.0D)); this.goalSelector.a(4, new PathfinderGoalTempt(this, 1.2D, RecipeItemStack.a(Items.CARROT_ON_A_STICK), false)); diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java b/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java -index f25f5ced218555af0d62844a78842cfc7599d608..e686491a469573a3fc466c46be1b7430ff02ba53 100644 +index f25f5ced218555af0d62844a78842cfc7599d608..b46315700b8857318b03b83097fcf829047f8ca4 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java @@ -14,6 +14,7 @@ import net.minecraft.network.syncher.DataWatcher; @@ -1933,7 +1995,7 @@ index f25f5ced218555af0d62844a78842cfc7599d608..e686491a469573a3fc466c46be1b7430 + @Override + public boolean onSpacebar() { + if (!isStanding()) { -+ if (hasRider() && getRider().getForward() == 0 && getRider().getStrafe() == 0) { ++ if (hasPurpurRider() && getPurpurRider().getForward() == 0 && getPurpurRider().getStrafe() == 0) { + setStanding(true); + playSound(SoundEffects.ENTITY_POLAR_BEAR_WARNING, 1.0F, 1.0F); + } @@ -2013,7 +2075,7 @@ index e9f20d387ccdacfbb1a48dc31e2a6cd4843a0d7b..38fe79872b4b7f4ad4a030fbdf505efb @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java -index 180fc927074dc683ad4d482a00dd4e04ff7923d0..fff6bcff9d44c7d49cd2d0c334ea702531c74ea1 100644 +index 180fc927074dc683ad4d482a00dd4e04ff7923d0..4660f37bc89418e0c3767305d390a53f5c0d3c55 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java @@ -10,6 +10,7 @@ import net.minecraft.network.syncher.DataWatcher; @@ -2024,7 +2086,15 @@ index 180fc927074dc683ad4d482a00dd4e04ff7923d0..fff6bcff9d44c7d49cd2d0c334ea7025 import net.minecraft.server.level.WorldServer; import net.minecraft.sounds.SoundCategory; import net.minecraft.sounds.SoundEffect; -@@ -75,6 +76,18 @@ public class EntityRabbit extends EntityAnimal { +@@ -27,7 +28,6 @@ import net.minecraft.world.entity.GroupDataEntity; + import net.minecraft.world.entity.ai.attributes.AttributeProvider; + import net.minecraft.world.entity.ai.attributes.GenericAttributes; + import net.minecraft.world.entity.ai.control.ControllerJump; +-import net.minecraft.world.entity.ai.control.ControllerMove; + import net.minecraft.world.entity.ai.goal.PathfinderGoalAvoidTarget; + import net.minecraft.world.entity.ai.goal.PathfinderGoalBreed; + import net.minecraft.world.entity.ai.goal.PathfinderGoalFloat; +@@ -75,6 +75,18 @@ public class EntityRabbit extends EntityAnimal { this.initializePathFinderGoals(); // CraftBukkit - moved code } @@ -2043,7 +2113,7 @@ index 180fc927074dc683ad4d482a00dd4e04ff7923d0..fff6bcff9d44c7d49cd2d0c334ea7025 // CraftBukkit start - code from constructor public void initializePathFinderGoals(){ this.i(0.0D); -@@ -83,7 +96,8 @@ public class EntityRabbit extends EntityAnimal { +@@ -83,7 +95,8 @@ public class EntityRabbit extends EntityAnimal { @Override public void initPathfinder() { @@ -2053,14 +2123,14 @@ index 180fc927074dc683ad4d482a00dd4e04ff7923d0..fff6bcff9d44c7d49cd2d0c334ea7025 this.goalSelector.a(1, new EntityRabbit.PathfinderGoalRabbitPanic(this, 2.2D)); this.goalSelector.a(2, new PathfinderGoalBreed(this, 0.8D)); this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.0D, RecipeItemStack.a(Items.CARROT, Items.GOLDEN_CARROT, Blocks.DANDELION), false)); -@@ -96,7 +110,15 @@ public class EntityRabbit extends EntityAnimal { +@@ -96,7 +109,15 @@ public class EntityRabbit extends EntityAnimal { } @Override - protected float dJ() { + // Purpur start + public float getJumpHeight() { -+ if (hasRider()) { ++ if (hasPurpurRider()) { + if (getForward() < 0) { + setSpeed(getForward() * 2F); + } @@ -2070,7 +2140,7 @@ index 180fc927074dc683ad4d482a00dd4e04ff7923d0..fff6bcff9d44c7d49cd2d0c334ea7025 if (!this.positionChanged && (!this.moveController.b() || this.moveController.e() <= this.locY() + 0.5D)) { PathEntity pathentity = this.navigation.k(); -@@ -115,7 +137,7 @@ public class EntityRabbit extends EntityAnimal { +@@ -115,7 +136,7 @@ public class EntityRabbit extends EntityAnimal { } @Override @@ -2079,7 +2149,7 @@ index 180fc927074dc683ad4d482a00dd4e04ff7923d0..fff6bcff9d44c7d49cd2d0c334ea7025 super.jump(); double d0 = this.moveController.c(); -@@ -147,6 +169,7 @@ public class EntityRabbit extends EntityAnimal { +@@ -147,6 +168,7 @@ public class EntityRabbit extends EntityAnimal { } @@ -2087,12 +2157,12 @@ index 180fc927074dc683ad4d482a00dd4e04ff7923d0..fff6bcff9d44c7d49cd2d0c334ea7025 public void eK() { this.setJumping(true); this.br = 10; -@@ -161,6 +184,13 @@ public class EntityRabbit extends EntityAnimal { +@@ -161,6 +183,13 @@ public class EntityRabbit extends EntityAnimal { @Override public void mobTick() { + // Purpur start -+ if (hasRider()) { ++ if (hasPurpurRider()) { + handleJumping(); + return; + } @@ -2101,7 +2171,7 @@ index 180fc927074dc683ad4d482a00dd4e04ff7923d0..fff6bcff9d44c7d49cd2d0c334ea7025 if (this.bt > 0) { --this.bt; } -@@ -211,6 +241,39 @@ public class EntityRabbit extends EntityAnimal { +@@ -211,6 +240,39 @@ public class EntityRabbit extends EntityAnimal { this.bs = this.onGround; } @@ -2141,7 +2211,7 @@ index 180fc927074dc683ad4d482a00dd4e04ff7923d0..fff6bcff9d44c7d49cd2d0c334ea7025 @Override public boolean aO() { return false; -@@ -540,7 +603,7 @@ public class EntityRabbit extends EntityAnimal { +@@ -540,7 +602,7 @@ public class EntityRabbit extends EntityAnimal { } } @@ -2150,7 +2220,7 @@ index 180fc927074dc683ad4d482a00dd4e04ff7923d0..fff6bcff9d44c7d49cd2d0c334ea7025 private final EntityRabbit i; private double j; -@@ -551,14 +614,14 @@ public class EntityRabbit extends EntityAnimal { +@@ -551,14 +613,14 @@ public class EntityRabbit extends EntityAnimal { } @Override @@ -2167,7 +2237,7 @@ index 180fc927074dc683ad4d482a00dd4e04ff7923d0..fff6bcff9d44c7d49cd2d0c334ea7025 } @Override -@@ -585,14 +648,17 @@ public class EntityRabbit extends EntityAnimal { +@@ -585,14 +647,17 @@ public class EntityRabbit extends EntityAnimal { this.c = entityrabbit; } @@ -2245,7 +2315,7 @@ index 88bed962bc17242ee6a9c93b7e0fec8bc578b35f..8f3296031f220dd7bb3ae9fe2443e479 this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D)); this.goalSelector.a(3, new PathfinderGoalTempt(this, 1.1D, RecipeItemStack.a(Items.WHEAT), false)); diff --git a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java -index 44119f52a4f169ffcea53fb69393bfedfd1a62a7..cfcf67e99ae345f77a55771e6a25bdcdb4a9740a 100644 +index 44119f52a4f169ffcea53fb69393bfedfd1a62a7..a692b973717ecc56d808039418599a11aedc2c5a 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java @@ -6,6 +6,7 @@ import net.minecraft.nbt.NBTTagCompound; @@ -2287,7 +2357,7 @@ index 44119f52a4f169ffcea53fb69393bfedfd1a62a7..cfcf67e99ae345f77a55771e6a25bdcd return; } -+ if (hasRider() && !world.purpurConfig.snowGolemLeaveTrailWhenRidden) return; // Purpur - don't leave snow trail when being ridden ++ if (hasPurpurRider() && !world.purpurConfig.snowGolemLeaveTrailWhenRidden) return; // Purpur - don't leave snow trail when being ridden IBlockData iblockdata = Blocks.SNOW.getBlockData(); for (int l = 0; l < 4; ++l) { @@ -2310,7 +2380,7 @@ index 44119f52a4f169ffcea53fb69393bfedfd1a62a7..cfcf67e99ae345f77a55771e6a25bdcd } diff --git a/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java b/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java -index e6757b22497c6e274c3999d58671653e931ebe2b..a9fa18931d93dd7fa428b8cd6a414d4b3a3b4fbb 100644 +index e6757b22497c6e274c3999d58671653e931ebe2b..777c3bcf267d6cf31300588826d3af6b55cab350 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java @@ -4,6 +4,7 @@ package net.minecraft.world.entity.animal; @@ -2392,7 +2462,7 @@ index e6757b22497c6e274c3999d58671653e931ebe2b..a9fa18931d93dd7fa428b8cd6a414d4b public void e() { + // Purpur start + EntitySquid squid = getSquid(); -+ EntityHuman rider = squid.getRider(); ++ EntityHuman rider = squid.getPurpurRider(); + if (rider != null) { + if (rider.jumping) { + squid.onSpacebar(); @@ -2784,7 +2854,7 @@ index 2e448a40dbf2fa5b4df4493f14738210615bab38..d57e7c02268e5d8a00b0b5897fa03dce + protected void eV() { if (world.purpurConfig.zombieHorseCanSwim) goalSelector.a(0, new PathfinderGoalFloat(this)); } // Purpur } diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java b/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java -index 1c6435bf2cd870b795f87368057d8dfc1e1c938a..d1bd7b9a6a8cfb6b609db4229b2f42a40b8b484f 100644 +index 1c6435bf2cd870b795f87368057d8dfc1e1c938a..d25177f9500a084e0f18a20b1eb1c4ac170048ec 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java @@ -8,6 +8,7 @@ import net.minecraft.nbt.NBTTagCompound; @@ -2803,8 +2873,8 @@ index 1c6435bf2cd870b795f87368057d8dfc1e1c938a..d1bd7b9a6a8cfb6b609db4229b2f42a4 + this.moveController = new net.pl3x.purpur.controller.ControllerMoveWASD(this) { + @Override + public void a() { // tick -+ if (entity.hasRider() && hasSaddle()) { -+ tick(entity.getRider()); ++ if (entity.hasPurpurRider() && hasSaddle()) { ++ tick(entity.getPurpurRider()); + } else { + tick(); + } @@ -2813,8 +2883,8 @@ index 1c6435bf2cd870b795f87368057d8dfc1e1c938a..d1bd7b9a6a8cfb6b609db4229b2f42a4 + this.lookController = new net.pl3x.purpur.controller.ControllerLookWASD(this) { + @Override + public void a() { // tick -+ if (entity.hasRider() && hasSaddle()) { -+ tick(entity.getRider()); ++ if (entity.hasPurpurRider() && hasSaddle()) { ++ tick(entity.getPurpurRider()); + } else { + tick(); + } @@ -2927,7 +2997,7 @@ index f1065c2a37835d760fb57194f7edfd029f426b48..3f2065e2939be54639f44501f7aa8ee5 + // Purpur end } diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java -index 3fff101637708a1a12f9a457bd3512ae94a8f884..7f583c6c15f0191219eb911d901ea28d86c11489 100644 +index 3fff101637708a1a12f9a457bd3512ae94a8f884..b2d1a0144353a1da61221b59a0acc028b0cf746e 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java @@ -23,6 +23,7 @@ import net.minecraft.world.entity.Entity; @@ -2996,7 +3066,7 @@ index 3fff101637708a1a12f9a457bd3512ae94a8f884..7f583c6c15f0191219eb911d901ea28d @Override public void movementTick() { + // Purpur start -+ boolean hasRider = getRider() != null; ++ boolean hasRider = getPurpurRider() != null; + if (hasRider) { + if (!hadRider) { + hadRider = true; @@ -3077,7 +3147,7 @@ index 3fff101637708a1a12f9a457bd3512ae94a8f884..7f583c6c15f0191219eb911d901ea28d this.bF.b(this); } diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java -index 930fc752ec0a988b17bc556cd428161638a14f27..4c0a555cdb5bc34c73040b9533beaee56cbce70a 100644 +index 930fc752ec0a988b17bc556cd428161638a14f27..73875b925cbf527f91a7c0ec09d350a7a2ec1260 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java @@ -12,6 +12,7 @@ import net.minecraft.network.chat.IChatBaseComponent; @@ -3104,7 +3174,7 @@ index 930fc752ec0a988b17bc556cd428161638a14f27..4c0a555cdb5bc34c73040b9533beaee5 import net.minecraft.world.entity.ai.attributes.AttributeProvider; import net.minecraft.world.entity.ai.attributes.GenericAttributes; import net.minecraft.world.entity.ai.goal.PathfinderGoal; -@@ -48,8 +51,12 @@ import net.minecraft.world.item.Items; +@@ -48,14 +51,16 @@ import net.minecraft.world.item.Items; import net.minecraft.world.level.Explosion; import net.minecraft.world.level.GameRules; import net.minecraft.world.level.IMaterial; @@ -3117,7 +3187,13 @@ index 930fc752ec0a988b17bc556cd428161638a14f27..4c0a555cdb5bc34c73040b9533beaee5 import net.minecraft.world.phys.Vec3D; // CraftBukkit start -@@ -82,6 +89,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { + import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent; +-import net.minecraft.server.MinecraftServer; +-import net.minecraft.server.level.WorldServer; + import net.minecraft.world.level.block.Blocks; + import org.bukkit.craftbukkit.event.CraftEventFactory; + import org.bukkit.event.entity.EntityRegainHealthEvent; +@@ -82,6 +87,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { return entityliving.getMonsterType() != EnumMonsterType.UNDEAD && entityliving.ei(); }; private static final PathfinderTargetCondition bz = (new PathfinderTargetCondition()).a(20.0D).a(EntityWither.by); @@ -3125,7 +3201,7 @@ index 930fc752ec0a988b17bc556cd428161638a14f27..4c0a555cdb5bc34c73040b9533beaee5 // Paper start private boolean canPortal = false; -@@ -94,15 +102,122 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -94,15 +100,122 @@ public class EntityWither extends EntityMonster implements IRangedEntity { this.setHealth(this.getMaxHealth()); this.getNavigation().d(true); this.f = 50; @@ -3151,7 +3227,7 @@ index 930fc752ec0a988b17bc556cd428161638a14f27..4c0a555cdb5bc34c73040b9533beaee5 + @Override + public void g(Vec3D vec3d) { + super.g(vec3d); -+ if (hasRider() && !onGround) { ++ if (hasPurpurRider() && !onGround) { + float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue() * 5F; + setSpeed(speed); + Vec3D mot = getMot(); @@ -3172,7 +3248,7 @@ index 930fc752ec0a988b17bc556cd428161638a14f27..4c0a555cdb5bc34c73040b9533beaee5 + + @Override + public boolean onClick(EnumHand hand) { -+ return shoot(getRider(), hand == EnumHand.MAIN_HAND ? new int[]{1} : new int[]{2}); ++ return shoot(getPurpurRider(), hand == EnumHand.MAIN_HAND ? new int[]{1} : new int[]{2}); + } + + public boolean shoot(EntityHuman rider, int[] heads) { @@ -3249,12 +3325,12 @@ index 930fc752ec0a988b17bc556cd428161638a14f27..4c0a555cdb5bc34c73040b9533beaee5 this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, new Class[0])); if(this.world.paperConfig.fixWitherTargetingBug) this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 0, false, false, null)); // Paper - Fix MC-29274 this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityInsentient.class, 0, false, false, EntityWither.by)); -@@ -245,6 +360,16 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -245,6 +358,16 @@ public class EntityWither extends EntityMonster implements IRangedEntity { @Override protected void mobTick() { + // Purpur start -+ if (hasRider()) { ++ if (hasPurpurRider()) { + Vec3D mot = getMot(); + setMot(mot.x, mot.y + (getVertical() > 0 ? 0.07D : 0.0D), mot.z); + } @@ -3266,7 +3342,7 @@ index 930fc752ec0a988b17bc556cd428161638a14f27..4c0a555cdb5bc34c73040b9533beaee5 int i; if (this.getInvul() > 0) { -@@ -428,7 +553,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -428,7 +551,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { this.bossBattle.removePlayer(entityplayer); } @@ -3275,7 +3351,7 @@ index 930fc752ec0a988b17bc556cd428161638a14f27..4c0a555cdb5bc34c73040b9533beaee5 if (i <= 0) { return this.locX(); } else { -@@ -439,11 +564,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -439,11 +562,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity { } } @@ -3289,7 +3365,7 @@ index 930fc752ec0a988b17bc556cd428161638a14f27..4c0a555cdb5bc34c73040b9533beaee5 if (i <= 0) { return this.locZ(); } else { -@@ -567,7 +692,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -567,7 +690,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { } public static AttributeProvider.Builder eK() { @@ -3298,22 +3374,22 @@ index 930fc752ec0a988b17bc556cd428161638a14f27..4c0a555cdb5bc34c73040b9533beaee5 } public int getInvul() { -@@ -579,11 +704,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -579,11 +702,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity { } public int getHeadTarget(int i) { - return (Integer) this.datawatcher.get((DataWatcherObject) EntityWither.bo.get(i)); -+ return hasRider() ? 0 : this.datawatcher.get(EntityWither.bo.get(i)); // Purpur ++ return hasPurpurRider() ? 0 : this.datawatcher.get(EntityWither.bo.get(i)); // Purpur } public void setHeadTarget(int i, int j) { - this.datawatcher.set((DataWatcherObject) EntityWither.bo.get(i), j); -+ if (!hasRider()) this.datawatcher.set(EntityWither.bo.get(i), j); // Purpur ++ if (!hasPurpurRider()) this.datawatcher.set(EntityWither.bo.get(i), j); // Purpur } public final boolean isPowered() { return this.S_(); } // Paper - OBFHELPER diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java b/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java -index 88a4dcf9feaa5f66da1394c139b795582c00a8ac..9a109ed062e5abedaad295383aca6441321da276 100644 +index 88a4dcf9feaa5f66da1394c139b795582c00a8ac..6553fd92c26d71ac0a60bd046c7f968f2dfe6667 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java @@ -5,6 +5,7 @@ import net.minecraft.core.particles.Particles; @@ -3363,7 +3439,7 @@ index 88a4dcf9feaa5f66da1394c139b795582c00a8ac..9a109ed062e5abedaad295383aca6441 + @Override + public void g(Vec3D vec3d) { + super.g(vec3d); -+ if (hasRider() && !onGround) { ++ if (hasPurpurRider() && !onGround) { + float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue(); + setSpeed(speed); + Vec3D mot = getMot(); @@ -3398,7 +3474,7 @@ index 88a4dcf9feaa5f66da1394c139b795582c00a8ac..9a109ed062e5abedaad295383aca6441 @Override protected void mobTick() { + // Purpur start -+ if (hasRider()) { ++ if (hasPurpurRider()) { + Vec3D mot = getMot(); + setMot(mot.x, getVertical() > 0 ? 0.07D : -0.07D, mot.z); + return; @@ -3432,7 +3508,7 @@ index 65d0027186f19f10292ea64976ebb93c12b98394..27baf5cde99d8f25b1e7583c30339fcc return EntitySpider.eK().a(GenericAttributes.MAX_HEALTH, 12.0D); } diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java -index 09df2bd3b523072de0e9858e6e707e3721474422..2cb9908a5c53528b2e02a1231752adc5ad8354f8 100644 +index 09df2bd3b523072de0e9858e6e707e3721474422..1daacdd75c709cd5508434b41589bd57032de27c 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java @@ -6,6 +6,7 @@ import net.minecraft.nbt.NBTTagCompound; @@ -3481,8 +3557,8 @@ index 09df2bd3b523072de0e9858e6e707e3721474422..2cb9908a5c53528b2e02a1231752adc5 + if (powerToggleDelay > 0) { + powerToggleDelay--; + } -+ if (hasRider()) { -+ if (getRider().getForward() != 0 || getRider().getStrafe() != 0) { ++ if (hasPurpurRider()) { ++ if (getPurpurRider().getForward() != 0 || getPurpurRider().getStrafe() != 0) { + spacebarCharge = 0; + setIgnited(false); + } @@ -3508,7 +3584,7 @@ index 09df2bd3b523072de0e9858e6e707e3721474422..2cb9908a5c53528b2e02a1231752adc5 + spacebarCharge++; + if (spacebarCharge > maxFuseTicks - 2) { + spacebarCharge = 0; -+ if (getRider().getBukkitEntity().hasPermission("allow.powered.creeper")) { ++ if (getPurpurRider().getBukkitEntity().hasPermission("allow.powered.creeper")) { + powerToggleDelay = 20; + setPowered(!isPowered()); + setIgnited(false); @@ -3516,8 +3592,8 @@ index 09df2bd3b523072de0e9858e6e707e3721474422..2cb9908a5c53528b2e02a1231752adc5 + } + } + if (!isIgnited()) { -+ if (hasRider() && getRider().getForward() == 0 && getRider().getStrafe() == 0 && -+ getRider().getBukkitEntity().hasPermission("allow.special.creeper")) { ++ if (hasPurpurRider() && getPurpurRider().getForward() == 0 && getPurpurRider().getStrafe() == 0 && ++ getPurpurRider().getBukkitEntity().hasPermission("allow.special.creeper")) { + setIgnited(true); + return true; + } @@ -3614,7 +3690,7 @@ index ea776755767f29e49de2792afa30f79420d0fa4c..1d4039d61a2c77a38a31947010cee26f @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index 52aa47036acee2ec21ae2d6f4df634ecbf04b3b0..03fa2cfc1d5bc27e03e9979b3f33d88362c19066 100644 +index 52aa47036acee2ec21ae2d6f4df634ecbf04b3b0..32ed22dbaaed536dd3df0fb59e3c19431ee42540 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java @@ -16,6 +16,7 @@ import net.minecraft.nbt.NBTTagCompound; @@ -3661,7 +3737,7 @@ index 52aa47036acee2ec21ae2d6f4df634ecbf04b3b0..03fa2cfc1d5bc27e03e9979b3f33d883 @Override protected void mobTick() { - if (this.world.isDay() && this.ticksLived >= this.bs + 600) { -+ if (!hasRider() && this.world.isDay() && this.ticksLived >= this.bs + 600) { // Purpur - no random teleporting ++ if (!hasPurpurRider() && this.world.isDay() && this.ticksLived >= this.bs + 600) { // Purpur - no random teleporting float f = this.aR(); if (f > 0.5F && this.world.e(this.getChunkCoordinates()) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && this.tryEscape(EndermanEscapeEvent.Reason.RUNAWAY)) { // Paper @@ -3669,7 +3745,7 @@ index 52aa47036acee2ec21ae2d6f4df634ecbf04b3b0..03fa2cfc1d5bc27e03e9979b3f33d883 if (this.isInvulnerable(damagesource)) { return false; } else if (net.pl3x.purpur.PurpurConfig.endermanShortHeight && damagesource == DamageSource.STUCK) { return false; // Purpur - no suffocation damage if short height -+ } else if (hasRider()) { return super.damageEntity(damagesource, f); // Purpur - no teleporting on damage ++ } else if (hasPurpurRider()) { return super.damageEntity(damagesource, f); // Purpur - no teleporting on damage } else if (damagesource instanceof EntityDamageSourceIndirect) { if (this.tryEscape(EndermanEscapeEvent.Reason.INDIRECT)) { // Paper start for (int i = 0; i < 64; ++i) { @@ -3808,7 +3884,7 @@ index 2aa6b6ca93c25c59ad224348aad1bb34d9bbc6a3..55607910183155080e3d96296421438d @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java b/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java -index a3e3f6e07674c54c2d2a02661ce4342b43aafe44..8784647f512d280ee0a092ecd406321268359314 100644 +index a3e3f6e07674c54c2d2a02661ce4342b43aafe44..b6d49740a1c8dfa19e871869b92b307fc8397588 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java @@ -7,6 +7,7 @@ import net.minecraft.nbt.NBTTagCompound; @@ -3850,7 +3926,7 @@ index a3e3f6e07674c54c2d2a02661ce4342b43aafe44..8784647f512d280ee0a092ecd4063212 + @Override + public void g(Vec3D vec3d) { + super.g(vec3d); -+ if (hasRider() && !onGround) { ++ if (hasPurpurRider() && !onGround) { + float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue(); + setSpeed(speed); + Vec3D mot = getMot(); @@ -3939,7 +4015,7 @@ index a188a89143cb1b0243dacdec33c446ca4120219f..7395fa90198a9138b2c33273d8f35403 this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillager.class, false)); diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityGuardian.java b/src/main/java/net/minecraft/world/entity/monster/EntityGuardian.java -index d53e2a9d27f9976d1fd8ea30b88a0da089aec7b6..6980b6988549b37a33d204a6e84c9e81d384a57a 100644 +index d53e2a9d27f9976d1fd8ea30b88a0da089aec7b6..66ae664add95f4441724b49a470a2fef569042d6 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityGuardian.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityGuardian.java @@ -9,6 +9,7 @@ import net.minecraft.core.particles.Particles; @@ -4008,7 +4084,7 @@ index d53e2a9d27f9976d1fd8ea30b88a0da089aec7b6..6980b6988549b37a33d204a6e84c9e81 public void g(Vec3D vec3d) { if (this.doAITick() && this.isInWater()) { - this.a(0.1F, vec3d); -+ this.a(hasRider() ? getSpeed() : 0.1F, vec3d); // Purpur ++ this.a(hasPurpurRider() ? getSpeed() : 0.1F, vec3d); // Purpur this.move(EnumMoveType.SELF, this.getMot()); this.setMot(this.getMot().a(0.9D)); if (!this.eN() && this.getGoalTarget() == null) { @@ -4153,7 +4229,7 @@ index fe80e93b00f3bb2f297c6528c3951313fa3c08c7..15ed51a2746c09538a425fce25fa25f2 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java -index 07ede7b75a65a5815f1ae1ebf03ec0fdb4621afb..a836839b17cbda8ac269f032b141ba448e3bab8c 100644 +index fd2e3a4abcfedaf04db4277291983627c097b545..1ea3054cebbf32588219f8915f9fb496495e3a10 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java @@ -13,6 +13,7 @@ import net.minecraft.network.syncher.DataWatcher; @@ -4201,7 +4277,7 @@ index 07ede7b75a65a5815f1ae1ebf03ec0fdb4621afb..a836839b17cbda8ac269f032b141ba44 + @Override + public void g(Vec3D vec3d) { + super.g(vec3d); -+ if (hasRider() && !onGround) { ++ if (hasPurpurRider() && !onGround) { + float speed = (float) getAttributeInstance(GenericAttributes.FLYING_SPEED).getValue(); + setSpeed(speed); + Vec3D mot = getMot(); @@ -4216,7 +4292,7 @@ index 07ede7b75a65a5815f1ae1ebf03ec0fdb4621afb..a836839b17cbda8ac269f032b141ba44 + + @Override + public boolean onSpacebar() { -+ if (hasRider() && getRider().getBukkitEntity().hasPermission("allow.special.phantom")) { ++ if (hasPurpurRider() && getPurpurRider().getBukkitEntity().hasPermission("allow.special.phantom")) { + shoot(); + } + return false; @@ -4258,39 +4334,39 @@ index 07ede7b75a65a5815f1ae1ebf03ec0fdb4621afb..a836839b17cbda8ac269f032b141ba44 @Override public void movementTick() { -- if (this.isAlive() && ((world.purpurConfig.phantomBurnInDaylight && this.isInDaylight()) || (world.purpurConfig.phantomBurnInLight > 0 && world.getLightLevel(new BlockPosition(this)) >= world.purpurConfig.phantomBurnInLight))) { // Purpur -+ if (this.isAlive() && !hasRider() && ((world.purpurConfig.phantomBurnInDaylight && this.isInDaylight()) || (world.purpurConfig.phantomBurnInLight > 0 && world.getLightLevel(new BlockPosition(this)) >= world.purpurConfig.phantomBurnInLight))) { // Purpur +- if (this.isAlive() && (((shouldBurnInDay || world.purpurConfig.phantomBurnInDaylight) && this.isInDaylight()) || (world.purpurConfig.phantomBurnInLight > 0 && world.getLightLevel(new BlockPosition(this)) >= world.purpurConfig.phantomBurnInLight))) { // Paper - Configurable Burning // Purpur ++ if (this.isAlive() && !hasPurpurRider() && (((shouldBurnInDay || world.purpurConfig.phantomBurnInDaylight) && this.isInDaylight()) || (world.purpurConfig.phantomBurnInLight > 0 && world.getLightLevel(new BlockPosition(this)) >= world.purpurConfig.phantomBurnInLight))) { // Paper - Configurable Burning // Purpur this.setOnFire(8); } -@@ -412,7 +468,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -418,7 +474,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { @Override public boolean a() { - if (isCirclingCrystal()) return false; // Purpur - pathfinder does not have a flag -+ if (getRider() != null || isCirclingCrystal()) return false; // Purpur - pathfinder does not have a flag ++ if (getPurpurRider() != null || isCirclingCrystal()) return false; // Purpur - pathfinder does not have a flag if (this.c > 0) { --this.c; return false; -@@ -441,7 +497,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -447,7 +503,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { @Override public boolean b() { - if (isCirclingCrystal()) return false; // Purpur - pathfinder does not have a flag -+ if (getRider() != null || isCirclingCrystal()) return false; // Purpur - pathfinder does not have a flag ++ if (getPurpurRider() != null || isCirclingCrystal()) return false; // Purpur - pathfinder does not have a flag EntityLiving entityliving = EntityPhantom.this.getGoalTarget(); return entityliving != null ? EntityPhantom.this.a(entityliving, PathfinderTargetCondition.a) : false; -@@ -456,7 +512,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -462,7 +518,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { @Override public boolean a() { - if (isCirclingCrystal()) return false; // Purpur - pathfinder does not have a flag -+ if (getRider() != null || isCirclingCrystal()) return false; // Purpur - pathfinder does not have a flag ++ if (getPurpurRider() != null || isCirclingCrystal()) return false; // Purpur - pathfinder does not have a flag EntityLiving entityliving = EntityPhantom.this.getGoalTarget(); return entityliving != null ? EntityPhantom.this.a(EntityPhantom.this.getGoalTarget(), PathfinderTargetCondition.a) : false; -@@ -654,14 +710,23 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -660,14 +716,23 @@ public class EntityPhantom extends EntityFlying implements IMonster { } } @@ -4316,7 +4392,7 @@ index 07ede7b75a65a5815f1ae1ebf03ec0fdb4621afb..a836839b17cbda8ac269f032b141ba44 } class d extends EntityAIBodyControl { -@@ -677,7 +742,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -683,7 +748,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { } } @@ -4325,7 +4401,7 @@ index 07ede7b75a65a5815f1ae1ebf03ec0fdb4621afb..a836839b17cbda8ac269f032b141ba44 private float j = 0.1F; -@@ -686,7 +751,19 @@ public class EntityPhantom extends EntityFlying implements IMonster { +@@ -692,7 +757,19 @@ public class EntityPhantom extends EntityFlying implements IMonster { } @Override @@ -4410,7 +4486,7 @@ index ea105fb86553f5212d616c976eaf2a16bf5b6561..2a4ac6e608650d56cc2b564e715b7b68 this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java b/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java -index 16d5cae64887b82e67eeb61ccb714e6125ff0c09..dc1ca7b334e89b4d0be775b6f6e6f4222ea02dcc 100644 +index 16d5cae64887b82e67eeb61ccb714e6125ff0c09..cc37e545ece89803fad91801775470df4620bd62 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java @@ -7,6 +7,7 @@ import javax.annotation.Nullable; @@ -4421,7 +4497,15 @@ index 16d5cae64887b82e67eeb61ccb714e6125ff0c09..dc1ca7b334e89b4d0be775b6f6e6f422 import net.minecraft.sounds.SoundEffect; import net.minecraft.sounds.SoundEffects; import net.minecraft.tags.Tag; -@@ -61,14 +62,37 @@ public class EntityRavager extends EntityRaider { +@@ -38,7 +39,6 @@ import net.minecraft.world.level.IBlockAccess; + import net.minecraft.world.level.IWorldReader; + import net.minecraft.world.level.World; + import net.minecraft.world.level.block.Block; +-import net.minecraft.world.level.block.BlockLeaves; + import net.minecraft.world.level.block.state.IBlockData; + import net.minecraft.world.level.pathfinder.PathType; + import net.minecraft.world.level.pathfinder.Pathfinder; +@@ -61,14 +61,37 @@ public class EntityRavager extends EntityRaider { this.f = 20; } @@ -4459,12 +4543,12 @@ index 16d5cae64887b82e67eeb61ccb714e6125ff0c09..dc1ca7b334e89b4d0be775b6f6e6f422 this.targetSelector.a(2, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityRaider.class})).a(new Class[0])); // CraftBukkit - decompile error this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, true)); this.targetSelector.a(4, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true)); -@@ -140,7 +164,7 @@ public class EntityRavager extends EntityRaider { +@@ -140,7 +163,7 @@ public class EntityRavager extends EntityRaider { @Override public void movementTick() { super.movementTick(); - if (this.isAlive()) { -+ if (this.isAlive() && !hasRider()) { ++ if (this.isAlive() && !hasPurpurRider()) { if (this.isFrozen()) { this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(0.0D); } else { @@ -4588,7 +4672,7 @@ index 342bc9b586ef835e865d6f84bf66f1069ab10f00..0b8517d4e83d14ddf8b6d1f1cf4c538f protected SoundEffect getSoundAmbient() { return SoundEffects.ENTITY_SKELETON_AMBIENT; diff --git a/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java b/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java -index 06d50b22ede102556fdb3e2a6f1424f7ff13f120..7ec60987229927e5fe7164f1d4eae8222832e920 100644 +index f8358e40c42f219232bf928f4e0073339a5e19d5..81059fc3fc22f251b5b08f0cd6814a992cff6b1e 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java @@ -5,6 +5,7 @@ import java.time.temporal.ChronoField; @@ -4661,7 +4745,7 @@ index a90ac635ef7aef5289d21f948db7b170b23160d3..cb52c4e63ac487d55dc16accca6976f4 protected void initPathfinder() { this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityPiglinAbstract.class, true)); diff --git a/src/main/java/net/minecraft/world/entity/monster/EntitySlime.java b/src/main/java/net/minecraft/world/entity/monster/EntitySlime.java -index 0af0b232ff1b6f1d58cf3fb543d32bd108be0af7..0cbe3032fd3b048b0eb8ec3d8592a662c69c9e30 100644 +index 0af0b232ff1b6f1d58cf3fb543d32bd108be0af7..feb40c2ca8e8f3fae5665b2d71296a6b811b11f6 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntitySlime.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntitySlime.java @@ -14,6 +14,7 @@ import net.minecraft.network.syncher.DataWatcher; @@ -4692,14 +4776,14 @@ index 0af0b232ff1b6f1d58cf3fb543d32bd108be0af7..0cbe3032fd3b048b0eb8ec3d8592a662 + @Override + public float getJumpHeight() { + float height = super.getJumpHeight(); -+ return hasRider() && actualJump ? height * 1.5F : height; ++ return hasPurpurRider() && actualJump ? height * 1.5F : height; + } + + @Override + public boolean onSpacebar() { -+ if (onGround && hasRider()) { ++ if (onGround && hasPurpurRider()) { + actualJump = true; -+ if (getRider().getForward() == 0 || getRider().getStrafe() == 0) { ++ if (getPurpurRider().getForward() == 0 || getPurpurRider().getStrafe() == 0) { + jump(); // jump() here if not moving + } + } @@ -4750,8 +4834,8 @@ index 0af0b232ff1b6f1d58cf3fb543d32bd108be0af7..0cbe3032fd3b048b0eb8ec3d8592a662 @Override public void a() { + // Purpur start -+ if (entity.hasRider()) { -+ tick(entity.getRider()); ++ if (entity.hasPurpurRider()) { ++ tick(entity.getPurpurRider()); + if (entity.getForward() != 0 || entity.getStrafe() != 0) { + if (getJumpDelay() > 10) { + setJumpDelay(6); @@ -4765,13 +4849,13 @@ index 0af0b232ff1b6f1d58cf3fb543d32bd108be0af7..0cbe3032fd3b048b0eb8ec3d8592a662 this.a.aC = this.a.yaw; this.a.aA = this.a.yaw; - if (this.h != ControllerMove.Operation.MOVE_TO) { -+ } if (!entity.hasRider() && this.h != ControllerMove.Operation.MOVE_TO) { // Purpur ++ } if (!entity.hasPurpurRider() && this.h != ControllerMove.Operation.MOVE_TO) { // Purpur this.a.t(0.0F); } else { this.h = ControllerMove.Operation.WAIT; if (this.a.isOnGround()) { - this.a.q((float) (this.e * this.a.b(GenericAttributes.MOVEMENT_SPEED))); -+ this.a.q((float) (this.e * this.a.b(GenericAttributes.MOVEMENT_SPEED) * (entity.hasRider() && (entity.getRider().getForward() != 0 || entity.getRider().getStrafe() != 0) ? 2.0D : 1.0D))); // Purpur ++ this.a.q((float) (this.e * this.a.b(GenericAttributes.MOVEMENT_SPEED) * (entity.hasPurpurRider() && (entity.getPurpurRider().getForward() != 0 || entity.getPurpurRider().getStrafe() != 0) ? 2.0D : 1.0D))); // Purpur if (this.j-- <= 0) { this.j = this.k.eJ(); if (this.l) { @@ -4780,7 +4864,7 @@ index 0af0b232ff1b6f1d58cf3fb543d32bd108be0af7..0cbe3032fd3b048b0eb8ec3d8592a662 } } else { - this.a.q((float) (this.e * this.a.b(GenericAttributes.MOVEMENT_SPEED))); -+ this.a.q((float) (this.e * this.a.b(GenericAttributes.MOVEMENT_SPEED) * (entity.hasRider() && (entity.getRider().getForward() != 0 || entity.getRider().getStrafe() != 0) ? 2.0D : 1.0D))); // Purpur ++ this.a.q((float) (this.e * this.a.b(GenericAttributes.MOVEMENT_SPEED) * (entity.hasPurpurRider() && (entity.getPurpurRider().getForward() != 0 || entity.getPurpurRider().getStrafe() != 0) ? 2.0D : 1.0D))); // Purpur } } @@ -4874,7 +4958,7 @@ index 5ce50c6fe788fbd6db95f6406bacbf218b7e691c..14dda6743ed9e6f4880bc560f7ba8892 if (flag && !this.isSilent()) { this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_STRIDER_EAT, this.getSoundCategory(), 1.0F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.2F); diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityVex.java b/src/main/java/net/minecraft/world/entity/monster/EntityVex.java -index 9645d052069957311478a1ceca42ad52f7a9aa0b..4301ece0a04f3f2b4d198a684d0ca314deef2aef 100644 +index 9645d052069957311478a1ceca42ad52f7a9aa0b..5e2114d2321c1542dc892bc7aed07080008cfd20 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityVex.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityVex.java @@ -7,6 +7,7 @@ import net.minecraft.nbt.NBTTagCompound; @@ -4908,7 +4992,7 @@ index 9645d052069957311478a1ceca42ad52f7a9aa0b..4301ece0a04f3f2b4d198a684d0ca314 + @Override + public void g(Vec3D vec3d) { + super.g(vec3d); -+ if (hasRider()) { ++ if (hasPurpurRider()) { + float speed; + if (onGround) { + speed = (float) getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getValue() * 0.1F; @@ -4936,7 +5020,7 @@ index 9645d052069957311478a1ceca42ad52f7a9aa0b..4301ece0a04f3f2b4d198a684d0ca314 @Override public void tick() { - this.noclip = true; -+ this.noclip = !hasRider(); // Purpur ++ this.noclip = !hasPurpurRider(); // Purpur super.tick(); this.noclip = false; this.setNoGravity(true); @@ -5064,7 +5148,7 @@ index 63fb08e7b4290353e5148d1acb58f091dc5b08be..c4663c5b02363bd1499ce1f3b50027f8 this.targetSelector.a(2, this.br); this.targetSelector.a(3, this.bs); diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityZoglin.java b/src/main/java/net/minecraft/world/entity/monster/EntityZoglin.java -index aed585e2c1c88a4d09318c6be7ebe7168eac3631..c5b1ce9268d6e6f3ec26eda4b5d8e7ae2a2ea672 100644 +index aed585e2c1c88a4d09318c6be7ebe7168eac3631..249fb9cf43527af5c7818ce6b07487ad446811b7 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityZoglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityZoglin.java @@ -62,6 +62,18 @@ public class EntityZoglin extends EntityMonster implements IMonster, IOglin { @@ -5122,7 +5206,7 @@ index aed585e2c1c88a4d09318c6be7ebe7168eac3631..c5b1ce9268d6e6f3ec26eda4b5d8e7ae protected void mobTick() { this.world.getMethodProfiler().enter("zoglinBrain"); - this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this); -+ if (getRider() == null) // Purpur - only use brain if no rider ++ if (getPurpurRider() == null) // Purpur - only use brain if no rider + this.getBehaviorController().a((WorldServer) this.world, this); // Purpur - decompile error this.world.getMethodProfiler().exit(); this.eL(); @@ -5211,7 +5295,7 @@ index 99d0932e5352589cfbcc48a5e789651d0d77edde..b8395c7317494adf36010080931a1c86 public boolean jockeyOnlyBaby() { return world.purpurConfig.zombieVillagerJockeyOnlyBaby; diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java -index 9aa4850e021076fde306eea7eec104c31086c57f..64253428ef66145d07f74f8d0e5bdeb5aa5fe02b 100644 +index 9aa4850e021076fde306eea7eec104c31086c57f..c2e32121f693a6207e6239c26a1fd6e60d0ce434 100644 --- a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java @@ -61,6 +61,18 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { @@ -5237,12 +5321,12 @@ index 9aa4850e021076fde306eea7eec104c31086c57f..64253428ef66145d07f74f8d0e5bdeb5 // Airplane - dynamic tick if (!gg.airplane.AirplaneConfig.dynamicHoglinBehavior || this.behaviorTick++ % this.activatedPriority == 0) { this.world.getMethodProfiler().enter("hoglinBrain"); -+ if (getRider() == null) // Purpur - only use brain if no rider ++ if (getPurpurRider() == null) // Purpur - only use brain if no rider this.getBehaviorController().a((WorldServer) this.world, (EntityHoglin) this); // Airplane - decompile error this.world.getMethodProfiler().exit(); HoglinAI.a(this); diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java -index 48acef830eb1d919499e9b79dc6a9af4bdf8a17b..8c6f5273ed2ab4ec63b7854e290f790b2eca8c2f 100644 +index 48acef830eb1d919499e9b79dc6a9af4bdf8a17b..2311d82824314a9feede9c3c106b0e1b24ac1b7a 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java @@ -70,6 +70,18 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow { @@ -5268,12 +5352,12 @@ index 48acef830eb1d919499e9b79dc6a9af4bdf8a17b..8c6f5273ed2ab4ec63b7854e290f790b // Airplane - dynamic tick if (!gg.airplane.AirplaneConfig.dynamicPiglinBehavior || this.behaviorTick++ % this.activatedPriority == 0) { this.world.getMethodProfiler().enter("piglinBrain"); -+ if (getRider() == null) // Purpur - only use brain if no rider ++ if (getPurpurRider() == null) // Purpur - only use brain if no rider this.getBehaviorController().a((WorldServer) this.world, (EntityPiglin) this); // Airplane - compile error this.world.getMethodProfiler().exit(); PiglinAI.b(this); diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglinBrute.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglinBrute.java -index 3d85501791fce621335f34bf508becb74b80210d..da2220b08a9cd9c2d7d3fd06702e6690e12f095e 100644 +index 3d85501791fce621335f34bf508becb74b80210d..1370d2d8568a4ed62f2ec3d54abc7d2bebc48f75 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglinBrute.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglinBrute.java @@ -39,6 +39,18 @@ public class EntityPiglinBrute extends EntityPiglinAbstract { @@ -5309,7 +5393,7 @@ index 3d85501791fce621335f34bf508becb74b80210d..da2220b08a9cd9c2d7d3fd06702e6690 protected void mobTick() { this.world.getMethodProfiler().enter("piglinBruteBrain"); - this.getBehaviorController().a((WorldServer) this.world, (EntityLiving) this); -+ if (getRider() == null) // Purpur - only use brain if no rider ++ if (getPurpurRider() == null) // Purpur - only use brain if no rider + this.getBehaviorController().a((WorldServer) this.world, this); // Purpur - decompile error this.world.getMethodProfiler().exit(); PiglinBruteAI.b(this); @@ -5415,10 +5499,18 @@ index 8df4d985e3124ddc1643da8385b15348937bc320..6c390fb20c7f29133a60780a75676d8d this.setTradingPlayer(entityhuman); this.openTrade(entityhuman, this.getScoreboardDisplayName(), 1); diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -index 1b130b50888113d515ce1e200a157c3bbff3b625..fedfb18e71300807a83e2ed2729fe192a8f9aa33 100644 +index 1b130b50888113d515ce1e200a157c3bbff3b625..a70c557de56c5ba04cb520108cdb037eb9cad8a9 100644 --- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java +++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -@@ -183,6 +183,8 @@ public abstract class EntityHuman extends EntityLiving { +@@ -111,7 +111,6 @@ import net.minecraft.world.phys.AxisAlignedBB; + import net.minecraft.world.phys.Vec3D; + import net.minecraft.world.scores.Scoreboard; + import net.minecraft.world.scores.ScoreboardTeam; +-import net.minecraft.world.scores.ScoreboardTeamBase; + + // CraftBukkit start + import org.bukkit.craftbukkit.entity.CraftHumanEntity; +@@ -183,6 +182,8 @@ public abstract class EntityHuman extends EntityLiving { // CraftBukkit end // Purpur start @@ -5427,7 +5519,7 @@ index 1b130b50888113d515ce1e200a157c3bbff3b625..fedfb18e71300807a83e2ed2729fe192 private javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino"); public void setAfk(boolean setAfk){ -@@ -2271,4 +2273,15 @@ public abstract class EntityHuman extends EntityLiving { +@@ -2271,4 +2272,15 @@ public abstract class EntityHuman extends EntityLiving { return this.g; } } @@ -5436,7 +5528,7 @@ index 1b130b50888113d515ce1e200a157c3bbff3b625..fedfb18e71300807a83e2ed2729fe192 + @Override + public boolean processClick(EnumHand hand) { + Entity vehicle = getRootVehicle(); -+ if (vehicle != null && vehicle.getRider() == this) { ++ if (vehicle != null && vehicle.getPurpurRider() == this) { + return vehicle.onClick(hand); + } + return false; @@ -5498,10 +5590,10 @@ index 96efd974f1eb9c1e7c70e576e51ed69e15aacb99..fc86ef53c48503139667f7703019a07c default int getHeight() { diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index bf239526681ef2060e4dbedcb46a4a9d6b022fc1..b40de7edffa9c14bc5c04217a430c6d7bf0d25b1 100644 +index 45eb26b7414f39f3d4f5ca5994cd3f271f7d112f..beff905e396476b8f916f0646a2e8c9496dddc39 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -1833,5 +1833,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1844,5 +1844,10 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public boolean isTheEnd() { return getWorld().getEnvironment() == org.bukkit.World.Environment.THE_END; } @@ -6214,7 +6306,7 @@ index f16f99517999ccbb0b5a678ffcb3befc93a3ae45..9fcc63a2f4a4c363ace85087665bf3a9 zombieVillagerJockeyTryExistingChickens = getBoolean("mobs.zombie_villager.jockey.try-existing-chickens", zombieVillagerJockeyTryExistingChickens); diff --git a/src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java b/src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java new file mode 100644 -index 0000000000000000000000000000000000000000..292821f039d99a03ba4daeb3a941616ef5f6287e +index 0000000000000000000000000000000000000000..088c830471b796908781bc1aa0693355849754cd --- /dev/null +++ b/src/main/java/net/pl3x/purpur/controller/ControllerLookWASD.java @@ -0,0 +1,76 @@ @@ -6239,8 +6331,8 @@ index 0000000000000000000000000000000000000000..292821f039d99a03ba4daeb3a941616e + // tick + @Override + public void a() { -+ if (entity.hasRider()) { -+ tick(entity.getRider()); ++ if (entity.hasPurpurRider()) { ++ tick(entity.getPurpurRider()); + } else { + tick(); + } @@ -6296,7 +6388,7 @@ index 0000000000000000000000000000000000000000..292821f039d99a03ba4daeb3a941616e +} diff --git a/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java new file mode 100644 -index 0000000000000000000000000000000000000000..266e734e8c20d6e414bd4a453118ad75fa4f97e5 +index 0000000000000000000000000000000000000000..6b1f37398ef6cf5935e7acb4295f9223a026226a --- /dev/null +++ b/src/main/java/net/pl3x/purpur/controller/ControllerMoveWASD.java @@ -0,0 +1,92 @@ @@ -6326,14 +6418,14 @@ index 0000000000000000000000000000000000000000..266e734e8c20d6e414bd4a453118ad75 + // isUpdating + @Override + public boolean b() { -+ return entity.hasRider() ? getForward() != 0 || getStrafe() != 0 : super.b(); ++ return entity.hasPurpurRider() ? getForward() != 0 || getStrafe() != 0 : super.b(); + } + + // tick + @Override + public void a() { -+ if (entity.hasRider()) { -+ tick(entity.getRider()); ++ if (entity.hasPurpurRider()) { ++ tick(entity.getPurpurRider()); + } else { + tick(); + } @@ -6584,7 +6676,7 @@ index 0000000000000000000000000000000000000000..aa7eb0b3bd7be8d1992e99bf156dbad1 +} diff --git a/src/main/java/net/pl3x/purpur/entity/DolphinSpit.java b/src/main/java/net/pl3x/purpur/entity/DolphinSpit.java new file mode 100644 -index 0000000000000000000000000000000000000000..7c7b1cb54bf0d64ae71d50532b61bb648396b2dc +index 0000000000000000000000000000000000000000..621e4d0af89e78404e79a92ba717392e4cf4f82b --- /dev/null +++ b/src/main/java/net/pl3x/purpur/entity/DolphinSpit.java @@ -0,0 +1,119 @@ @@ -6618,7 +6710,7 @@ index 0000000000000000000000000000000000000000..7c7b1cb54bf0d64ae71d50532b61bb64 + + public DolphinSpit(World world, EntityDolphin dolphin) { + this(EntityTypes.LLAMA_SPIT, world); -+ setShooter(dolphin.hasRider() ? dolphin.getRider() : dolphin); ++ setShooter(dolphin.hasPurpurRider() ? dolphin.getPurpurRider() : dolphin); + this.dolphin = dolphin; + this.setPosition( + dolphin.locX() - (double) (dolphin.getWidth() + 1.0F) * 0.5D * (double) MathHelper.sin(dolphin.getRenderYawOffset() * 0.017453292F), @@ -6709,7 +6801,7 @@ index 0000000000000000000000000000000000000000..7c7b1cb54bf0d64ae71d50532b61bb64 +} diff --git a/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java b/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java new file mode 100644 -index 0000000000000000000000000000000000000000..3d83a495cbe08e2f129a583ec2760391edb819ba +index 0000000000000000000000000000000000000000..c7cd0327084943dcb6339998805e6b7db1d87bba --- /dev/null +++ b/src/main/java/net/pl3x/purpur/entity/PhantomFlames.java @@ -0,0 +1,140 @@ @@ -6746,7 +6838,7 @@ index 0000000000000000000000000000000000000000..3d83a495cbe08e2f129a583ec2760391 + + public PhantomFlames(World world, EntityPhantom phantom) { + this(EntityTypes.LLAMA_SPIT, world); -+ setShooter(phantom.hasRider() ? phantom.getRider() : phantom); ++ setShooter(phantom.hasPurpurRider() ? phantom.getPurpurRider() : phantom); + this.phantom = phantom; + this.setPosition( + phantom.locX() - (double) (phantom.getWidth() + 1.0F) * 0.5D * (double) MathHelper.sin(phantom.getRenderYawOffset() * 0.017453292F), @@ -6854,10 +6946,28 @@ index 0000000000000000000000000000000000000000..3d83a495cbe08e2f129a583ec2760391 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index dee4d12a49468d38f077784b219199f0070786f2..c524a0994f1c9ef1d0534403efa4e4481955b2f3 100644 +index dee4d12a49468d38f077784b219199f0070786f2..dcdc82b42689b4962323938a62cf7ded49afd6f4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1175,4 +1175,26 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -12,9 +12,6 @@ import net.minecraft.nbt.NBTBase; + import net.minecraft.nbt.NBTTagCompound; + import net.minecraft.network.chat.IChatBaseComponent; + import net.minecraft.server.level.EntityPlayer; +-import net.minecraft.server.level.PlayerChunk; +-import net.minecraft.server.level.PlayerChunkMap; +-import net.minecraft.server.level.TicketType; + import net.minecraft.world.damagesource.DamageSource; + import net.minecraft.world.entity.Entity; + import net.minecraft.world.entity.EntityAreaEffectCloud; +@@ -147,7 +144,6 @@ import net.minecraft.world.entity.vehicle.EntityMinecartHopper; + import net.minecraft.world.entity.vehicle.EntityMinecartMobSpawner; + import net.minecraft.world.entity.vehicle.EntityMinecartRideable; + import net.minecraft.world.entity.vehicle.EntityMinecartTNT; +-import net.minecraft.world.level.ChunkCoordIntPair; + import net.minecraft.world.phys.AxisAlignedBB; + import org.bukkit.Chunk; // Paper + import org.bukkit.EntityEffect; +@@ -1175,4 +1171,26 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return getHandle().isTicking(); } // Paper end @@ -6865,12 +6975,12 @@ index dee4d12a49468d38f077784b219199f0070786f2..c524a0994f1c9ef1d0534403efa4e448 + // Purpur start + @Override + public org.bukkit.entity.Player getRider() { -+ return hasRider() ? (org.bukkit.entity.Player) getHandle().getRider().getBukkitEntity() : null; ++ return hasRider() ? (org.bukkit.entity.Player) getHandle().getPurpurRider().getBukkitEntity() : null; + } + + @Override + public boolean hasRider() { -+ return getHandle().hasRider(); ++ return getHandle().hasPurpurRider(); + } + + @Override diff --git a/patches/Purpur/patches/server/0103-Crying-obsidian-valid-for-portal-frames.patch b/patches/Purpur/patches/server/0103-Crying-obsidian-valid-for-portal-frames.patch index 1d10d35a..b590241a 100644 --- a/patches/Purpur/patches/server/0103-Crying-obsidian-valid-for-portal-frames.patch +++ b/patches/Purpur/patches/server/0103-Crying-obsidian-valid-for-portal-frames.patch @@ -5,19 +5,31 @@ Subject: [PATCH] Crying obsidian valid for portal frames diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index fb7d5fa53c51766f348271285a2e921be1ca0497..4ae6917ed5560b9d25a3dfcd7938934a99eed905 100644 +index 2448ff8e3a9c60d6d99dd8f4d3033553b2780c77..fa43eb5e31a9e3c6d6725ef770a7d1b3aec4d663 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -140,6 +140,7 @@ public class Block extends BlockBase implements IMaterial { return tag.isTagged(this); } -+ public boolean isSameInstance(Block block) { return a(block); } // Purpur - OBFHELPER ++ public boolean equals(Block block) { return a(block); } // Purpur - OBFHELPER public boolean a(Block block) { return this == block; } +diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java +index 0ea0a1fc5f4d879d48bbdf24731dabec10dbccd1..df595dc52858807479584ce8da49390a25695990 100644 +--- a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java ++++ b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java +@@ -742,6 +742,7 @@ public abstract class BlockBase { + } + + public final boolean isSameInstance(Block block) { return a(block); } // Paper - OBFHELPER ++ public boolean equals(Block block) { return a(block); } // Purpur - OBFHELPER + public boolean a(Block block) { + return this.getBlock().a(block); + } diff --git a/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java b/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java -index 3f8a674345bcad8289a48d2daa5e2a283528e952..a9dc57561f0570cc32196991ac305d6a0c0aff8f 100644 +index 3f8a674345bcad8289a48d2daa5e2a283528e952..3c35f5d171df518f491cad1f49882622903302a6 100644 --- a/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java +++ b/src/main/java/net/minecraft/world/level/portal/BlockPortalShape.java @@ -30,7 +30,7 @@ import org.bukkit.event.world.PortalCreateEvent; @@ -25,7 +37,7 @@ index 3f8a674345bcad8289a48d2daa5e2a283528e952..a9dc57561f0570cc32196991ac305d6a private static final BlockBase.e a = (iblockdata, iblockaccess, blockposition) -> { - return iblockdata.a(Blocks.OBSIDIAN); -+ return iblockdata.isSameInstance(Blocks.OBSIDIAN) || (net.pl3x.purpur.PurpurConfig.cryingObsidianValidForPortalFrame && iblockdata.isSameInstance(Blocks.CRYING_OBSIDIAN)); // Purpur ++ return iblockdata.equals(Blocks.OBSIDIAN) || (net.pl3x.purpur.PurpurConfig.cryingObsidianValidForPortalFrame && iblockdata.equals(Blocks.CRYING_OBSIDIAN)); // Purpur }; private final GeneratorAccess b; private final EnumDirection.EnumAxis c; diff --git a/patches/Purpur/patches/server/0104-Entities-can-use-portals-configuration.patch b/patches/Purpur/patches/server/0104-Entities-can-use-portals-configuration.patch index 3cd10391..6bd7fb53 100644 --- a/patches/Purpur/patches/server/0104-Entities-can-use-portals-configuration.patch +++ b/patches/Purpur/patches/server/0104-Entities-can-use-portals-configuration.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entities can use portals configuration diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 4e1363050bef7fff9117250b79cbf35bf6bfc537..918edab475a8d33a253e3d6cd3c5655748d10dc0 100644 +index 668f613a901523e87780f33ffff565d965521783..7bab5b730486b1f22246c39d581c69a43f85a984 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2554,7 +2554,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2553,7 +2553,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne public void d(BlockPosition blockposition) { if (this.ai()) { this.resetPortalCooldown(); @@ -17,7 +17,7 @@ index 4e1363050bef7fff9117250b79cbf35bf6bfc537..918edab475a8d33a253e3d6cd3c56557 if (!this.world.isClientSide && !blockposition.equals(this.ac)) { this.ac = blockposition.immutableCopy(); } -@@ -3134,7 +3134,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -3133,7 +3133,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } public boolean canPortal() { diff --git a/patches/Purpur/patches/server/0105-LivingEntity-broadcastItemBreak.patch b/patches/Purpur/patches/server/0105-LivingEntity-broadcastItemBreak.patch index 209b879f..58ef9f17 100644 --- a/patches/Purpur/patches/server/0105-LivingEntity-broadcastItemBreak.patch +++ b/patches/Purpur/patches/server/0105-LivingEntity-broadcastItemBreak.patch @@ -5,10 +5,10 @@ Subject: [PATCH] LivingEntity#broadcastItemBreak diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index b5040de9885556561416bf3282476f3b33925a62..f0631331afc16576a21310f5575b56ae7663f399 100644 +index d99ab01298c7e35eae806af8fc60d5beba89c826..cf79f39fc8071d86f7455681e41b3eab1826cb35 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -854,5 +854,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { +@@ -870,5 +870,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { public void setSafeFallDistance(float safeFallDistance) { getHandle().safeFallDistance = safeFallDistance; } diff --git a/patches/Purpur/patches/server/0106-Customizable-wither-health-and-healing.patch b/patches/Purpur/patches/server/0106-Customizable-wither-health-and-healing.patch index 58d2321e..e005eacf 100644 --- a/patches/Purpur/patches/server/0106-Customizable-wither-health-and-healing.patch +++ b/patches/Purpur/patches/server/0106-Customizable-wither-health-and-healing.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Customizable wither health and healing Adds the ability to customize the health of the wither, as well as the amount that it heals, and how often. diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java -index 4c0a555cdb5bc34c73040b9533beaee56cbce70a..beb4d59faf4bd7501468b2eaa0e866613625e963 100644 +index 73875b925cbf527f91a7c0ec09d350a7a2ec1260..34103234140d61a5dc1d3e9f575fb8a65cde956b 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java -@@ -207,6 +207,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -205,6 +205,11 @@ public class EntityWither extends EntityMonster implements IRangedEntity { skull.setPositionRaw(headX, headY, headZ); world.addEntity(skull); } @@ -21,7 +21,7 @@ index 4c0a555cdb5bc34c73040b9533beaee56cbce70a..beb4d59faf4bd7501468b2eaa0e86661 // Purpur end @Override -@@ -411,7 +416,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -409,7 +414,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { this.setInvul(i); if (this.ticksLived % 10 == 0) { @@ -30,7 +30,7 @@ index 4c0a555cdb5bc34c73040b9533beaee56cbce70a..beb4d59faf4bd7501468b2eaa0e86661 } } else { -@@ -520,8 +525,10 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -518,8 +523,10 @@ public class EntityWither extends EntityMonster implements IRangedEntity { } } diff --git a/patches/Purpur/patches/server/0107-Allow-toggling-special-MobSpawners-per-world.patch b/patches/Purpur/patches/server/0107-Allow-toggling-special-MobSpawners-per-world.patch index 38c130f2..0ad12b74 100644 --- a/patches/Purpur/patches/server/0107-Allow-toggling-special-MobSpawners-per-world.patch +++ b/patches/Purpur/patches/server/0107-Allow-toggling-special-MobSpawners-per-world.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Allow toggling special MobSpawners per world In vanilla, these are all hardcoded on for world type 0 (overworld) and hardcoded off for every other world type. Default config behaviour matches this. diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 3e360ba183fc23a4bf50b5af1edb73cc75b183e1..cdd0d4fa6e2ac4e1b4853fe35260df87a3aecb2e 100644 +index ac41fc5b23ec81a57c3ec8f1fa0cff0bc8d0e47d..f978d6d55912895a88112cfc85e25524de2a6784 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -92,6 +92,7 @@ import net.minecraft.world.entity.EnumCreatureType; @@ -93,10 +93,10 @@ index 7c8a2151be8a0f48cba1c15d231d5dbdb500b4d6..361771fc4fcf16b1b013c55073401953 if (SpawnerCreature.a(EntityPositionTypes.Surface.ON_GROUND, iworldreader, blockposition2, EntityTypes.WANDERING_TRADER)) { blockposition1 = blockposition2; diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index b40de7edffa9c14bc5c04217a430c6d7bf0d25b1..ef1ba94bc03d6ee752c69119f615be8d14bf2ffc 100644 +index beff905e396476b8f916f0646a2e8c9496dddc39..0b59e2410bffacd43169d4f3b575a15257d9c8f2 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -250,7 +250,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -260,7 +260,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(((net.minecraft.world.level.storage.WorldDataServer) worlddatamutable).getName(), this.spigotConfig); // Paper this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config diff --git a/patches/Purpur/patches/server/0111-Persistent-TileEntity-Lore-and-DisplayName.patch b/patches/Purpur/patches/server/0111-Persistent-TileEntity-Lore-and-DisplayName.patch index 79be4d1c..1a90317e 100644 --- a/patches/Purpur/patches/server/0111-Persistent-TileEntity-Lore-and-DisplayName.patch +++ b/patches/Purpur/patches/server/0111-Persistent-TileEntity-Lore-and-DisplayName.patch @@ -61,7 +61,7 @@ index 59d52c252b2e59923b8e513dd4d2e1ec9ce34dc7..4be1c8ee85f411a8b01be50b8cc3dc38 @Nullable diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 4ae6917ed5560b9d25a3dfcd7938934a99eed905..1a8e0850d318626b946bdc9f2366d279bff29324 100644 +index fa43eb5e31a9e3c6d6725ef770a7d1b3aec4d663..a835285d230ea0dffa1b28c2a7a006041f2e6b2a 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -15,10 +15,15 @@ import net.minecraft.core.EnumDirection; diff --git a/patches/Purpur/patches/server/0113-Flying-squids-Oh-my.patch b/patches/Purpur/patches/server/0113-Flying-squids-Oh-my.patch index db60800a..b2914431 100644 --- a/patches/Purpur/patches/server/0113-Flying-squids-Oh-my.patch +++ b/patches/Purpur/patches/server/0113-Flying-squids-Oh-my.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Flying squids! Oh my! diff --git a/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java b/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java -index a9fa18931d93dd7fa428b8cd6a414d4b3a3b4fbb..be48e12dd6c9a390bf383129953bcd3d1f818427 100644 +index 777c3bcf267d6cf31300588826d3af6b55cab350..7ec3e5d136cbb708b3bb29aa79bdd401d37d56dc 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java @@ -81,6 +81,11 @@ public class EntitySquid extends EntityWaterAnimal { diff --git a/patches/Purpur/patches/server/0115-Stonecutter-damage.patch b/patches/Purpur/patches/server/0115-Stonecutter-damage.patch index 36aa4fbf..1ec8500b 100644 --- a/patches/Purpur/patches/server/0115-Stonecutter-damage.patch +++ b/patches/Purpur/patches/server/0115-Stonecutter-damage.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Stonecutter damage diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 918edab475a8d33a253e3d6cd3c5655748d10dc0..b17443821b8a4ca4954eb430ea70b255ac336f0d 100644 +index 7bab5b730486b1f22246c39d581c69a43f85a984..a3333b7d1e55f6cbcdc20072b27df384e50c61d5 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -894,7 +894,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -893,7 +893,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } // CraftBukkit end diff --git a/patches/Purpur/patches/server/0116-Configurable-daylight-cycle.patch b/patches/Purpur/patches/server/0116-Configurable-daylight-cycle.patch index 03f92dcf..dc59ca63 100644 --- a/patches/Purpur/patches/server/0116-Configurable-daylight-cycle.patch +++ b/patches/Purpur/patches/server/0116-Configurable-daylight-cycle.patch @@ -18,7 +18,7 @@ index 3086ee023685781d94e2fb99fc8dff5264f01165..74c1047305cac5673e274096709c757e public PacketPlayOutUpdateTime() {} diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index cdd0d4fa6e2ac4e1b4853fe35260df87a3aecb2e..267cb5dd651d94eed7b221ff70d7c2eb821917c3 100644 +index f978d6d55912895a88112cfc85e25524de2a6784..6e75df2c18a1f432668fec932719aeea1dd153b7 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -64,6 +64,7 @@ import net.minecraft.network.protocol.game.PacketPlayOutExplosion; @@ -45,7 +45,7 @@ index cdd0d4fa6e2ac4e1b4853fe35260df87a3aecb2e..267cb5dd651d94eed7b221ff70d7c2eb } // Tuinity start - optimise collision -@@ -1190,7 +1193,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1206,7 +1209,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.nextTickListBlock.nextTick(); // Paper this.nextTickListFluid.nextTick(); // Paper this.worldDataServer.u().a(this.server, i); @@ -68,7 +68,7 @@ index cdd0d4fa6e2ac4e1b4853fe35260df87a3aecb2e..267cb5dd651d94eed7b221ff70d7c2eb this.setDayTime(this.worldData.getDayTime() + 1L); } -@@ -1199,6 +1216,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1215,6 +1232,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { public void setDayTime(long i) { this.worldDataServer.setDayTime(i); diff --git a/patches/Purpur/patches/server/0120-Add-tablist-suffix-option-for-afk.patch b/patches/Purpur/patches/server/0120-Add-tablist-suffix-option-for-afk.patch index 2e79efc1..2f739f39 100644 --- a/patches/Purpur/patches/server/0120-Add-tablist-suffix-option-for-afk.patch +++ b/patches/Purpur/patches/server/0120-Add-tablist-suffix-option-for-afk.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add tablist suffix option for afk diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index 867a6b7fe1788b20f8d0f4f1e42dd52bfc6a8c2a..3f29cc87faa85f857c5fe2b8457d7c96d05515bc 100644 +index d06bae9d71f23fccbfaf65c0fd9e9a550549432e..adab7cf319ed7d77bdd0196709741f6704994a93 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -2122,7 +2122,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -2151,7 +2151,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting { } if (world.purpurConfig.idleTimeoutUpdateTabList) { diff --git a/patches/Purpur/patches/server/0122-Add-adjustable-breeding-cooldown-to-config.patch b/patches/Purpur/patches/server/0122-Add-adjustable-breeding-cooldown-to-config.patch index fa8b178d..6a7dac86 100644 --- a/patches/Purpur/patches/server/0122-Add-adjustable-breeding-cooldown-to-config.patch +++ b/patches/Purpur/patches/server/0122-Add-adjustable-breeding-cooldown-to-config.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add adjustable breeding cooldown to config diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java b/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java -index 28dd42921961c6a47f2d85a5f93b8298f2c228d3..6ae5fafd379863bf23df3580d3dbc7a5ba63b545 100644 +index 4de0a733819d408e8b9a55b604f455281d7732c5..94b5874c1eb90c02a557179a2a1170b1da85deb4 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java @@ -145,7 +145,7 @@ public abstract class EntityAnimal extends EntityAgeable { @@ -30,13 +30,13 @@ index 28dd42921961c6a47f2d85a5f93b8298f2c228d3..6ae5fafd379863bf23df3580d3dbc7a5 + } + // Purpur end // CraftBukkit start - call EntityBreedEvent - int experience = this.getRandom().nextInt(7) + 1; - org.bukkit.event.entity.EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityageable, this, entityanimal, entityplayer, this.breedItem, experience); + entityageable.setBaby(true); + entityageable.setPositionRotation(this.locX(), this.locY(), this.locZ(), 0.0F, 0.0F); diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index ef1ba94bc03d6ee752c69119f615be8d14bf2ffc..ad9ccd07cc9f49c9d5b106b9078a4ed2ae8d3413 100644 +index 0b59e2410bffacd43169d4f3b575a15257d9c8f2..e71f76df887681f48702456378be4e9da86fb658 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -41,6 +41,7 @@ import net.minecraft.world.DifficultyDamageScaler; +@@ -42,6 +42,7 @@ import net.minecraft.world.DifficultyDamageScaler; import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityTypes; @@ -44,7 +44,7 @@ index ef1ba94bc03d6ee752c69119f615be8d14bf2ffc..ad9ccd07cc9f49c9d5b106b9078a4ed2 import net.minecraft.world.entity.decoration.EntityArmorStand; import net.minecraft.world.entity.player.EntityHuman; import net.minecraft.world.item.ItemStack; -@@ -166,6 +167,48 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -167,6 +168,48 @@ public abstract class World implements GeneratorAccess, AutoCloseable { private int tileTickPosition; public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here @@ -93,7 +93,7 @@ index ef1ba94bc03d6ee752c69119f615be8d14bf2ffc..ad9ccd07cc9f49c9d5b106b9078a4ed2 public CraftWorld getWorld() { return this.world; -@@ -251,6 +294,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -261,6 +304,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.chunkPacketBlockController = this.paperConfig.antiXray ? new ChunkPacketBlockControllerAntiXray(this, executor) : ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray this.tuinityConfig = new com.tuinity.tuinity.config.TuinityConfig.WorldConfig(((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()); // Tuinity - Server Config this.purpurConfig = new net.pl3x.purpur.PurpurWorldConfig((((net.minecraft.world.level.storage.WorldDataServer)worlddatamutable).getName()), env); // Purpur diff --git a/patches/Purpur/patches/server/0123-Make-entity-breeding-times-configurable.patch b/patches/Purpur/patches/server/0123-Make-entity-breeding-times-configurable.patch index f8f86a7c..9f54bbcc 100644 --- a/patches/Purpur/patches/server/0123-Make-entity-breeding-times-configurable.patch +++ b/patches/Purpur/patches/server/0123-Make-entity-breeding-times-configurable.patch @@ -5,24 +5,24 @@ Subject: [PATCH] Make entity breeding times configurable diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.java b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.java -index a68428554b93f4aba9f0cb0b3af03985896830b7..c1e8b9562eb37cee3d47034b93d4ef0c998eb52f 100644 +index 79989c143fc8393172475e33d356510b3547afb9..d1315f4b6e026f70e04a0b54289fd13b4be17cde 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.java -@@ -115,8 +115,10 @@ public class BehaviorMakeLove extends Behavior { - if (entityvillager2 == null) { - return Optional.empty(); - } else { +@@ -117,8 +117,10 @@ public class BehaviorMakeLove extends Behavior { + return Optional.empty(); + } + // CraftBukkit end - entityvillager.setAgeRaw(6000); - entityvillager1.setAgeRaw(6000); + // Purpur start + entityvillager.setAgeRaw(worldserver.purpurConfig.villagerBreedingTicks); + entityvillager1.setAgeRaw(worldserver.purpurConfig.villagerBreedingTicks); + // Purpur end - entityvillager2.setAgeRaw(-24000); - entityvillager2.setPositionRotation(entityvillager.locX(), entityvillager.locY(), entityvillager.locZ(), 0.0F, 0.0F); worldserver.addAllEntities(entityvillager2, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason + worldserver.broadcastEntityEffect(entityvillager2, (byte) 12); + return Optional.of(entityvillager2); diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java b/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java -index 6ae5fafd379863bf23df3580d3dbc7a5ba63b545..38a4072a5df3abd3d1d9929f6402b3edfdd6c197 100644 +index 94b5874c1eb90c02a557179a2a1170b1da85deb4..181bb648dd32f71c7f9d3fbb4974e2a1afba61ac 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityAnimal.java @@ -38,6 +38,7 @@ public abstract class EntityAnimal extends EntityAgeable { @@ -33,7 +33,7 @@ index 6ae5fafd379863bf23df3580d3dbc7a5ba63b545..38a4072a5df3abd3d1d9929f6402b3ed protected EntityAnimal(EntityTypes entitytypes, World world) { super(entitytypes, world); -@@ -259,8 +260,10 @@ public abstract class EntityAnimal extends EntityAgeable { +@@ -261,8 +262,10 @@ public abstract class EntityAnimal extends EntityAgeable { CriterionTriggers.o.a(entityplayer, this, entityanimal, entityageable); } @@ -45,12 +45,12 @@ index 6ae5fafd379863bf23df3580d3dbc7a5ba63b545..38a4072a5df3abd3d1d9929f6402b3ed + // Purpur end this.resetLove(); entityanimal.resetLove(); - entityageable.setBaby(true); + worldserver.addAllEntities(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityBee.java b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java -index 0c6d3dae70eeea844a31f9edf54410db13e0b04b..9e40fd6585592ccd1deff1d8319c57660474c053 100644 +index bcd510e0bf647a240edfaac1348119c5e1d7dc42..6086dda5b06f0c0e02734edf7141b13715420d3c 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityBee.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java -@@ -176,6 +176,11 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +@@ -175,6 +175,11 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB setMot(mot.a(0.9D)); } } @@ -63,7 +63,7 @@ index 0c6d3dae70eeea844a31f9edf54410db13e0b04b..9e40fd6585592ccd1deff1d8319c5766 @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityCat.java b/src/main/java/net/minecraft/world/entity/animal/EntityCat.java -index 3efb010d0e045d14051a33bd7465669e415c26bd..079b95ef465f7155f426a2c87a4a50f8369d0a18 100644 +index bac3035e2382df2d79e592b02395753eee08fa4b..187047de5530ccec1e9804f8039839246ab248f3 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityCat.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityCat.java @@ -122,6 +122,11 @@ public class EntityCat extends EntityTameableAnimal { @@ -95,7 +95,7 @@ index 5c744f1eac19e144c39a2c146d312f0547d6e589..ab54e809f735cea7d84366d2bc205351 @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityCow.java b/src/main/java/net/minecraft/world/entity/animal/EntityCow.java -index cad256514c7df92847522c8d7ddf45ebe02658c4..93589a2b86e6663d93f6b536b853996c08db549a 100644 +index b2d3fc3151a952ac783101443772736a206a6a3b..7ed55ebe1bb768351a5cb4cdc7d4d3b0816d53b1 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityCow.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityCow.java @@ -54,6 +54,11 @@ public class EntityCow extends EntityAnimal { @@ -111,10 +111,10 @@ index cad256514c7df92847522c8d7ddf45ebe02658c4..93589a2b86e6663d93f6b536b853996c @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java -index 0c1151b598aa681e63ddaac29e4a589f917fd03b..7bf546a1b2a80179962ed08a35d86f0a28eda3c2 100644 +index 7b1a6d846f25d8bc659a541fce59df79347ba9bc..70369d03985250fa5eaf398fa98d35a2c2a06ff1 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java -@@ -159,6 +159,11 @@ public class EntityFox extends EntityAnimal { +@@ -157,6 +157,11 @@ public class EntityFox extends EntityAnimal { super.onDismount(entityhuman); setCanPickupLoot(true); } @@ -138,7 +138,7 @@ index 0c1151b598aa681e63ddaac29e4a589f917fd03b..7bf546a1b2a80179962ed08a35d86f0a + // Purpur end this.animal.resetLove(); this.partner.resetLove(); - entityfox.setAgeRaw(-24000); + worldserver.addAllEntities(entityfox, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityMushroomCow.java b/src/main/java/net/minecraft/world/entity/animal/EntityMushroomCow.java index 815e907e8db721f2a6f0f831b69c44a9573b5c9b..ab4a8ee6e1912f230cbf3353eb42c3bc8a9db58e 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityMushroomCow.java @@ -188,7 +188,7 @@ index 0d912399e1975d9c0d5525f5b89049f40e7efcc0..e6952c0a8d90eb4b133c517d97299f2c @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java -index 5c26eea7e3e93dc7bcd8b86519e84db58b70cecb..5463e1779422ff19499727a000fdfbbfc38809a8 100644 +index 9f705b75a14ba456808485ce4ddef9550aac3fe9..7346921a24bdd57aa3814386bc372b082b23b4bc 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java @@ -171,6 +171,11 @@ public class EntityParrot extends EntityPerchable implements EntityBird { @@ -220,7 +220,7 @@ index cef69f99d7bc9b6605b9654c50f43a1ebc1a8509..5aa8806063186bec36b38adc51e2ea82 @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java b/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java -index e686491a469573a3fc466c46be1b7430ff02ba53..2306abb72ea76a52fd6f27648c4815ad99f8f005 100644 +index b46315700b8857318b03b83097fcf829047f8ca4..c9c7c9de638079393bbea86f8069023dcbcbca83 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java @@ -116,6 +116,11 @@ public class EntityPolarBear extends EntityAnimal implements IEntityAngerable { @@ -236,10 +236,10 @@ index e686491a469573a3fc466c46be1b7430ff02ba53..2306abb72ea76a52fd6f27648c4815ad @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java -index fff6bcff9d44c7d49cd2d0c334ea702531c74ea1..0b706404895b69fbca79502a327ec20b47ed99f0 100644 +index 4660f37bc89418e0c3767305d390a53f5c0d3c55..465701232567e4058f9dfc776560ccde33fee66c 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java -@@ -86,6 +86,11 @@ public class EntityRabbit extends EntityAnimal { +@@ -85,6 +85,11 @@ public class EntityRabbit extends EntityAnimal { public boolean isRidableInWater() { return world.purpurConfig.rabbitRidableInWater; } @@ -380,7 +380,7 @@ index d57e7c02268e5d8a00b0b5897fa03dcee10cd2e0..c776f18722d1aa73f53da66ef6b37564 public static AttributeProvider.Builder eL() { diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java b/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java -index d1bd7b9a6a8cfb6b609db4229b2f42a40b8b484f..b3d51abc9bad9cad6fdc5dbdc2bf09d43a565f98 100644 +index d25177f9500a084e0f18a20b1eb1c4ac170048ec..2710c246a147f117d2d90014c37988888010dc36 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java @@ -108,6 +108,11 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn @@ -412,7 +412,7 @@ index 14dda6743ed9e6f4880bc560f7ba8892d8e84afe..cba66a08feceeeaf7c123da595fc7b12 public static boolean c(EntityTypes entitytypes, GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn, BlockPosition blockposition, Random random) { diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java -index 64253428ef66145d07f74f8d0e5bdeb5aa5fe02b..828d01abe8202a246ce07c1c652a17cbc829d904 100644 +index c2e32121f693a6207e6239c26a1fd6e60d0ce434..8c2815c8b11c8db8e6c1d0caf71188322e52094d 100644 --- a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java @@ -71,6 +71,11 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { diff --git a/patches/Purpur/patches/server/0124-Apply-display-names-from-item-forms-of-entities-to-e.patch b/patches/Purpur/patches/server/0124-Apply-display-names-from-item-forms-of-entities-to-e.patch index cf941a80..52b56cbf 100644 --- a/patches/Purpur/patches/server/0124-Apply-display-names-from-item-forms-of-entities-to-e.patch +++ b/patches/Purpur/patches/server/0124-Apply-display-names-from-item-forms-of-entities-to-e.patch @@ -142,7 +142,7 @@ index bbd3bb2d12e500d15485598783d39b0cb63a6d83..8e4c3304779cfccf7d45d4843f9c15bf if (((EntityHanging) object).survives()) { diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 81e2ccfa4f6cf6a4ad9236cf0ce94df8dc3ec5b6..132972755ac74838f3386e0fac5033380b71fce5 100644 +index 2aa761656ce75f78732c502fd4ce65034b6c2919..a4c41caae425e054db3f40a9abc41f45ccd20730 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -788,6 +788,7 @@ public final class ItemStack { diff --git a/patches/Purpur/patches/server/0128-Add-config-for-allowing-Endermen-to-despawn-even-whi.patch b/patches/Purpur/patches/server/0128-Add-config-for-allowing-Endermen-to-despawn-even-whi.patch index 5f8c9954..5349d657 100644 --- a/patches/Purpur/patches/server/0128-Add-config-for-allowing-Endermen-to-despawn-even-whi.patch +++ b/patches/Purpur/patches/server/0128-Add-config-for-allowing-Endermen-to-despawn-even-whi.patch @@ -8,7 +8,7 @@ This should help to reduce the amount of dirt, gravel, grass, and etc. that Endermen like to randomly place all over the world. diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index 03fa2cfc1d5bc27e03e9979b3f33d88362c19066..18b3f8d1fadd1424327261d92b49977a35c4948c 100644 +index 32ed22dbaaed536dd3df0fb59e3c19431ee42540..c04ff259f650b0e5a361c4f17b8b5ff9ecb8ab71 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java @@ -435,7 +435,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { diff --git a/patches/Purpur/patches/server/0129-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch b/patches/Purpur/patches/server/0129-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch index 3ade4d39..f295b107 100644 --- a/patches/Purpur/patches/server/0129-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch +++ b/patches/Purpur/patches/server/0129-Add-critical-hit-check-to-EntityDamagedByEntityEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add critical hit check to EntityDamagedByEntityEvent diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -index fedfb18e71300807a83e2ed2729fe192a8f9aa33..af10d5aea7909ee9f38982264233f0a45c153003 100644 +index a70c557de56c5ba04cb520108cdb037eb9cad8a9..78442fe87ceaf65b302536c893610aa0269b6dee 100644 --- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java +++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -@@ -171,6 +171,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -170,6 +170,7 @@ public abstract class EntityHuman extends EntityLiving { // Paper start public boolean affectsSpawning = true; // Paper end @@ -16,7 +16,7 @@ index fedfb18e71300807a83e2ed2729fe192a8f9aa33..af10d5aea7909ee9f38982264233f0a4 // CraftBukkit start public boolean fauxSleeping; -@@ -1178,6 +1179,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1177,6 +1178,7 @@ public abstract class EntityHuman extends EntityLiving { flag2 = flag2 && !world.paperConfig.disablePlayerCrits; // Paper flag2 = flag2 && !this.isSprinting(); if (flag2) { @@ -24,7 +24,7 @@ index fedfb18e71300807a83e2ed2729fe192a8f9aa33..af10d5aea7909ee9f38982264233f0a4 f *= 1.5F; } -@@ -1214,6 +1216,7 @@ public abstract class EntityHuman extends EntityLiving { +@@ -1213,6 +1215,7 @@ public abstract class EntityHuman extends EntityLiving { Vec3D vec3d = entity.getMot(); boolean flag5 = entity.damageEntity(DamageSource.playerAttack(this), f); diff --git a/patches/Purpur/patches/server/0132-Add-demo-command.patch b/patches/Purpur/patches/server/0132-Add-demo-command.patch index be372b73..abeae395 100644 --- a/patches/Purpur/patches/server/0132-Add-demo-command.patch +++ b/patches/Purpur/patches/server/0132-Add-demo-command.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add demo command diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java -index 94ed3811cbcc6f60a2c8bb033920f9c1ae2e91d6..2f5e8ed345ace0d9abb7edebe1fd47e562b1d272 100644 +index 185dee82b86aa3abb04809ddcf31c81e29664c62..0ea56c863a9a1019b36f7f9f9164301aef12637b 100644 --- a/src/main/java/net/minecraft/commands/CommandDispatcher.java +++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java @@ -191,6 +191,7 @@ public class CommandDispatcher { diff --git a/patches/Purpur/patches/server/0133-Left-handed-API.patch b/patches/Purpur/patches/server/0133-Left-handed-API.patch index ca8fff80..dc0b6d4b 100644 --- a/patches/Purpur/patches/server/0133-Left-handed-API.patch +++ b/patches/Purpur/patches/server/0133-Left-handed-API.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Left handed API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java -index 06cbe63ef04e0de824ac0b9d545b6da1f53701b3..d45d0913bd003bd1da23a62be62298eadadfe320 100644 +index 125be4ca56d38c6cba1d1f4e7587abda075ee491..30d3b2f89e08056db128aa95e76c319b196b89ea 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java -@@ -85,4 +85,14 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { - return getHandle().isInDaylight(); +@@ -133,4 +133,14 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob { + return getHandle().getMaxHeadXRot(); } // Paper end + diff --git a/patches/Purpur/patches/server/0134-Origami-Fix-ProtocolLib-issues-on-Java-15.patch b/patches/Purpur/patches/server/0134-Origami-Fix-ProtocolLib-issues-on-Java-15.patch index 02df71ab..158f2947 100644 --- a/patches/Purpur/patches/server/0134-Origami-Fix-ProtocolLib-issues-on-Java-15.patch +++ b/patches/Purpur/patches/server/0134-Origami-Fix-ProtocolLib-issues-on-Java-15.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Origami - Fix ProtocolLib issues on Java 15 diff --git a/src/main/java/net/minecraft/network/NetworkManager.java b/src/main/java/net/minecraft/network/NetworkManager.java -index 0f8cbe1f656b46f71c6494bd2e0057be63017272..f46488155d8bd07719a282e4a1027562973dbef6 100644 +index b6c0ef0df93f0350fa70e857e06d79ae34d7d4b1..1dce5d3b1e994a060067de4901912dd5a9be7e15 100644 --- a/src/main/java/net/minecraft/network/NetworkManager.java +++ b/src/main/java/net/minecraft/network/NetworkManager.java @@ -435,9 +435,9 @@ public class NetworkManager extends SimpleChannelInboundHandler> { diff --git a/patches/Purpur/patches/server/0135-Changeable-Mob-Left-Handed-Chance.patch b/patches/Purpur/patches/server/0135-Changeable-Mob-Left-Handed-Chance.patch index a749c065..4a8fc4ea 100644 --- a/patches/Purpur/patches/server/0135-Changeable-Mob-Left-Handed-Chance.patch +++ b/patches/Purpur/patches/server/0135-Changeable-Mob-Left-Handed-Chance.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Changeable Mob Left Handed Chance diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index df33b46ff1267f0f2692a8956438f3bd1e2a3086..a6ea96683b0f4d35015dff6168f3bf458346fb6f 100644 +index dd1f4c4202e30a837b48b591327b018a35a0edff..4da6e2dd956a44d7cd47a234f1b251c930722015 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -@@ -1216,7 +1216,7 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -1217,7 +1217,7 @@ public abstract class EntityInsentient extends EntityLiving { @Nullable public GroupDataEntity prepare(WorldAccess worldaccess, DifficultyDamageScaler difficultydamagescaler, EnumMobSpawn enummobspawn, @Nullable GroupDataEntity groupdataentity, @Nullable NBTTagCompound nbttagcompound) { this.getAttributeInstance(GenericAttributes.FOLLOW_RANGE).addModifier(new AttributeModifier("Random spawn bonus", this.random.nextGaussian() * 0.05D, AttributeModifier.Operation.MULTIPLY_BASE)); diff --git a/patches/Purpur/patches/server/0136-Add-boat-fall-damage-config.patch b/patches/Purpur/patches/server/0136-Add-boat-fall-damage-config.patch index bea819c7..da5831c7 100644 --- a/patches/Purpur/patches/server/0136-Add-boat-fall-damage-config.patch +++ b/patches/Purpur/patches/server/0136-Add-boat-fall-damage-config.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add boat fall damage config diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index 3f29cc87faa85f857c5fe2b8457d7c96d05515bc..a1d5662911ee3a038da427bf2e0b69a11f187149 100644 +index adab7cf319ed7d77bdd0196709741f6704994a93..8a7f75baa730729dd0022fe74da15fe669eced24 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -1141,7 +1141,16 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1149,7 +1149,16 @@ public class EntityPlayer extends EntityHuman implements ICrafting { if (this.isInvulnerable(damagesource)) { return false; } else { diff --git a/patches/Purpur/patches/server/0138-Snow-Golem-rate-of-fire-config.patch b/patches/Purpur/patches/server/0138-Snow-Golem-rate-of-fire-config.patch index d3930464..b1f61e1d 100644 --- a/patches/Purpur/patches/server/0138-Snow-Golem-rate-of-fire-config.patch +++ b/patches/Purpur/patches/server/0138-Snow-Golem-rate-of-fire-config.patch @@ -10,7 +10,7 @@ If min-shoot-interval-ticks and max-shoot-interval-ticks are both set to 0, snow golems won't shoot any snowballs. diff --git a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java -index cfcf67e99ae345f77a55771e6a25bdcdb4a9740a..28b5c22ecfe573ac9d91b74e54ebd3e3c5e6373f 100644 +index a692b973717ecc56d808039418599a11aedc2c5a..76fe39cf57384602c7422cb340f15ca7cac65ef9 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java @@ -66,7 +66,7 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt diff --git a/patches/Purpur/patches/server/0142-Lobotomize-stuck-villagers.patch b/patches/Purpur/patches/server/0142-Lobotomize-stuck-villagers.patch index 12d4d678..e07ab631 100644 --- a/patches/Purpur/patches/server/0142-Lobotomize-stuck-villagers.patch +++ b/patches/Purpur/patches/server/0142-Lobotomize-stuck-villagers.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Lobotomize stuck villagers diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index b17443821b8a4ca4954eb430ea70b255ac336f0d..c6128dc68be7cd60cf49db90ff5e816e4e14c4cf 100644 +index a3333b7d1e55f6cbcdc20072b27df384e50c61d5..ebdeb74a882f5f70214e6adfd83c5254dab29a5a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -207,7 +207,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -206,7 +206,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne public double lastY; public double lastZ; private Vec3D loc; diff --git a/patches/Purpur/patches/server/0143-Option-for-Villager-Clerics-to-farm-Nether-Wart.patch b/patches/Purpur/patches/server/0143-Option-for-Villager-Clerics-to-farm-Nether-Wart.patch index 0e63f1fe..2e248569 100644 --- a/patches/Purpur/patches/server/0143-Option-for-Villager-Clerics-to-farm-Nether-Wart.patch +++ b/patches/Purpur/patches/server/0143-Option-for-Villager-Clerics-to-farm-Nether-Wart.patch @@ -8,10 +8,10 @@ farm Nether Wart. Reimplemented based on a feature of the carpet-extra mod. diff --git a/src/main/java/net/minecraft/world/IInventory.java b/src/main/java/net/minecraft/world/IInventory.java -index 774ba6a923f7e329f6af5efc17e1c46e87ed2d77..b8c73cd0ba916b7bf166a6d2f6b7ab68cd9c939b 100644 +index 8faf3850f4c965feec42f6998563b7265a8f599e..96f814a2946a69e53cc1bcbf5499c5058ff982af 100644 --- a/src/main/java/net/minecraft/world/IInventory.java +++ b/src/main/java/net/minecraft/world/IInventory.java -@@ -38,6 +38,7 @@ public interface IInventory extends Clearable { +@@ -104,6 +104,7 @@ public interface IInventory extends Clearable { return true; } @@ -19,7 +19,7 @@ index 774ba6a923f7e329f6af5efc17e1c46e87ed2d77..b8c73cd0ba916b7bf166a6d2f6b7ab68 default int a(Item item) { int i = 0; -@@ -52,6 +53,7 @@ public interface IInventory extends Clearable { +@@ -118,6 +119,7 @@ public interface IInventory extends Clearable { return i; } diff --git a/patches/Purpur/patches/server/0145-Spread-out-and-optimise-player-list-ticks.patch b/patches/Purpur/patches/server/0145-Spread-out-and-optimise-player-list-ticks.patch index ca0fc3b9..7e464e98 100644 --- a/patches/Purpur/patches/server/0145-Spread-out-and-optimise-player-list-ticks.patch +++ b/patches/Purpur/patches/server/0145-Spread-out-and-optimise-player-list-ticks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Spread out and optimise player list ticks diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 3622ea01edfb9dfaab254ceaf09582d9e8993174..070de6c066b2e293e0bc0ea9722a9a3dcf520431 100644 +index fc47887dfd3d32788fa11845c738af53126fba46..21c51883c73dfaa7ec874fb7f8ed7c284239e0a5 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -151,7 +151,7 @@ public abstract class PlayerList { @@ -56,10 +56,10 @@ index 3622ea01edfb9dfaab254ceaf09582d9e8993174..070de6c066b2e293e0bc0ea9722a9a3d public void sendAll(Packet packet) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1c5bcc17a702f5af514ce4db7f5d096d5f449dd6..e204374c8f17ca5514e9bcfd24d411069285de29 100644 +index 14b9e4c845d73946f4151c902e12aa0690b9414c..e557157c5128ea89d728de2ab92b5e1a7b3437ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1444,7 +1444,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1442,7 +1442,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public boolean canSee(Player player) { diff --git a/patches/Purpur/patches/server/0146-Configurable-chance-for-wolves-to-spawn-rabid.patch b/patches/Purpur/patches/server/0146-Configurable-chance-for-wolves-to-spawn-rabid.patch index 6fd4a3b7..02e5895e 100644 --- a/patches/Purpur/patches/server/0146-Configurable-chance-for-wolves-to-spawn-rabid.patch +++ b/patches/Purpur/patches/server/0146-Configurable-chance-for-wolves-to-spawn-rabid.patch @@ -7,7 +7,7 @@ Configurable chance to spawn a wolf that is rabid. Rabid wolves attack all players, mobs, and animals. diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 84cb148faacb0587e771410680a0b053822cebf8..4099ff50644aa68cddf16203c84ca0bbfd1c20ed 100644 +index 377f850d2aa29e5cd8903cb65b5d85acbfff2030..f71aefbc7c8d6f78195a248abe4ec8cc8a99f04e 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -2213,6 +2213,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Purpur/patches/server/0148-Configurable-entity-base-attributes.patch b/patches/Purpur/patches/server/0148-Configurable-entity-base-attributes.patch index b59dfabe..8202ae18 100644 --- a/patches/Purpur/patches/server/0148-Configurable-entity-base-attributes.patch +++ b/patches/Purpur/patches/server/0148-Configurable-entity-base-attributes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable entity base attributes diff --git a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java -index ce40df98f61b9176989c0000d078597d44e996e2..e6c5d21da445c9b66dcca33d9029d1768bbe046a 100644 +index bee72578fae2fba56f8e8dcc1142ab54c7ba7cb8..5c9e4724d46b6864cdb85f7d3c8fb0fe37032444 100644 --- a/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java +++ b/src/main/java/net/minecraft/world/entity/ambient/EntityBat.java @@ -81,6 +81,18 @@ public class EntityBat extends EntityAmbient { @@ -28,10 +28,10 @@ index ce40df98f61b9176989c0000d078597d44e996e2..e6c5d21da445c9b66dcca33d9029d176 @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityBee.java b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java -index 9e40fd6585592ccd1deff1d8319c57660474c053..c39a7a6d7f391debd632a199eeec8ded6189ad76 100644 +index 6086dda5b06f0c0e02734edf7141b13715420d3c..e425e093c233a21e5ef457e3a94defe8b74261d2 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityBee.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java -@@ -181,6 +181,11 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +@@ -180,6 +180,11 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB public int getPurpurBreedTime() { return this.world.purpurConfig.beeBreedingTicks; } @@ -44,7 +44,7 @@ index 9e40fd6585592ccd1deff1d8319c57660474c053..c39a7a6d7f391debd632a199eeec8ded @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityCat.java b/src/main/java/net/minecraft/world/entity/animal/EntityCat.java -index 079b95ef465f7155f426a2c87a4a50f8369d0a18..7143b0801be7877762e41da336ea5e4e57f2e463 100644 +index 187047de5530ccec1e9804f8039839246ab248f3..a4e3e36f081803b0588a0e907a3a834b7a3ab3eb 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityCat.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityCat.java @@ -127,6 +127,11 @@ public class EntityCat extends EntityTameableAnimal { @@ -96,7 +96,7 @@ index 897e0d5ca44a0c475634f08e7d4fcf129ee197ab..07c6dc6a1b9af7b9662f4dd4b4a2ddfc @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityCow.java b/src/main/java/net/minecraft/world/entity/animal/EntityCow.java -index 93589a2b86e6663d93f6b536b853996c08db549a..2a8c0537fbb68577a3da3f8d07c16e9ca18b224d 100644 +index 7ed55ebe1bb768351a5cb4cdc7d4d3b0816d53b1..06af4c63fa05b243b7692cbc41b4f62ca0548def 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityCow.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityCow.java @@ -59,6 +59,11 @@ public class EntityCow extends EntityAnimal { @@ -112,7 +112,7 @@ index 93589a2b86e6663d93f6b536b853996c08db549a..2a8c0537fbb68577a3da3f8d07c16e9c @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityDolphin.java b/src/main/java/net/minecraft/world/entity/animal/EntityDolphin.java -index 880c3aaf4e684209879dc921480619e7c61ee4a0..6b32b3e4877efa64942838a07af5d48cd4e33a80 100644 +index e4442716b329f3101bfd39fc7ce13d5419b427bf..3ca911cebc01692f63b8731a5df6d9ea3fbad66b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityDolphin.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityDolphin.java @@ -128,6 +128,11 @@ public class EntityDolphin extends EntityWaterAnimal { @@ -128,10 +128,10 @@ index 880c3aaf4e684209879dc921480619e7c61ee4a0..6b32b3e4877efa64942838a07af5d48c @Nullable diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java -index 7bf546a1b2a80179962ed08a35d86f0a28eda3c2..b8b0ee65798dc94d707fa64bd53fdda5506331d9 100644 +index 70369d03985250fa5eaf398fa98d35a2c2a06ff1..5a2e624f1b6636f058cc69989324914f174a271a 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java -@@ -164,6 +164,11 @@ public class EntityFox extends EntityAnimal { +@@ -162,6 +162,11 @@ public class EntityFox extends EntityAnimal { public int getPurpurBreedTime() { return this.world.purpurConfig.foxBreedingTicks; } @@ -240,7 +240,7 @@ index e6952c0a8d90eb4b133c517d97299f2c3db7e329..94141b8c1ad62e6d187726734d25dd0e if (this.isLazy()) { diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java -index 5463e1779422ff19499727a000fdfbbfc38809a8..efa4318989893c946e9d7671d0dead6c4a6e315f 100644 +index 7346921a24bdd57aa3814386bc372b082b23b4bc..7500de8bcdd32f08bf6d32e70cfe09baf097cc2b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java @@ -176,6 +176,11 @@ public class EntityParrot extends EntityPerchable implements EntityBird { @@ -272,7 +272,7 @@ index 5aa8806063186bec36b38adc51e2ea82bf6ff21a..8d24855f230a5ca6280f885d5b1c26ec @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java b/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java -index 2306abb72ea76a52fd6f27648c4815ad99f8f005..5a496d55b40f98609b0a9aac25929f6b5c0311ba 100644 +index c9c7c9de638079393bbea86f8069023dcbcbca83..83494d3c989a120297c21a1bd560bc37734dc86a 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityPolarBear.java @@ -121,6 +121,11 @@ public class EntityPolarBear extends EntityAnimal implements IEntityAngerable { @@ -312,10 +312,10 @@ index 38fe79872b4b7f4ad4a030fbdf505efbc0352fc0..0d32590cf4cfdd95da6aceac5190d42c @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java -index 0b706404895b69fbca79502a327ec20b47ed99f0..284c52276b2fd816990c23b7b8a9ee50e70ab005 100644 +index 465701232567e4058f9dfc776560ccde33fee66c..ef031ac08b06e78d8826579c49cf5e43683318f9 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java -@@ -91,6 +91,11 @@ public class EntityRabbit extends EntityAnimal { +@@ -90,6 +90,11 @@ public class EntityRabbit extends EntityAnimal { public int getPurpurBreedTime() { return this.world.purpurConfig.rabbitBreedingTicks; } @@ -368,7 +368,7 @@ index ff6fc821085e4430a3b1008140b0b7fcacc59d2e..365f70117a287fab2fbf63ee8d89a10a @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java -index 28b5c22ecfe573ac9d91b74e54ebd3e3c5e6373f..88db8ff8cb415b84ab98cc0550c705d5a472230c 100644 +index 76fe39cf57384602c7422cb340f15ca7cac65ef9..3934966b06eb9880ed316cee84d099edd80c09b9 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java @@ -61,6 +61,11 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt @@ -384,7 +384,7 @@ index 28b5c22ecfe573ac9d91b74e54ebd3e3c5e6373f..88db8ff8cb415b84ab98cc0550c705d5 @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java b/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java -index be48e12dd6c9a390bf383129953bcd3d1f818427..1e7632d2ca4440dee4e406e26da61411ec5bc88f 100644 +index 7ec3e5d136cbb708b3bb29aa79bdd401d37d56dc..fa629ebc4946a0c3e891e5e2dd881277b3e25347 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntitySquid.java @@ -86,6 +86,11 @@ public class EntitySquid extends EntityWaterAnimal { @@ -653,7 +653,7 @@ index c776f18722d1aa73f53da66ef6b37564eeaddd2a..1820c2d225d1fa919de2b1c0593370a8 public static AttributeProvider.Builder eL() { diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java b/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java -index b3d51abc9bad9cad6fdc5dbdc2bf09d43a565f98..762fed5ba27474951c1962e6f034e8494b1035d6 100644 +index 2710c246a147f117d2d90014c37988888010dc36..4bea68fa35177d84a35dc5ced3e501a87e2a5391 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java @@ -113,6 +113,21 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn @@ -705,7 +705,7 @@ index 0fb651bcde1109b0eb30b60226d3512648dceb41..73f59982d70093d308c6dc6a9a569334 @Override diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java -index 7f583c6c15f0191219eb911d901ea28d86c11489..999a6d17eccd6305c0063e1558abfe70d72c39fe 100644 +index b2d1a0144353a1da61221b59a0acc028b0cf746e..aeff46b575a05145fb509b5e5a489b2067776e2f 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java @@ -147,6 +147,11 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { @@ -721,7 +721,7 @@ index 7f583c6c15f0191219eb911d901ea28d86c11489..999a6d17eccd6305c0063e1558abfe70 public static AttributeProvider.Builder m() { diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java b/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java -index 9a109ed062e5abedaad295383aca6441321da276..45e69d2f8da4c5babfd2e67055cc0a4c6d3baac7 100644 +index 6553fd92c26d71ac0a60bd046c7f968f2dfe6667..55b6f483aca8cbb5c30b3759e23c86a699e19569 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java @@ -72,6 +72,11 @@ public class EntityBlaze extends EntityMonster { @@ -753,7 +753,7 @@ index 27baf5cde99d8f25b1e7583c30339fcc71a3786f..72b298642f17c13f0f5959034e345a47 public static AttributeProvider.Builder m() { diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java -index 2cb9908a5c53528b2e02a1231752adc5ad8354f8..62d40f726355283baddde349c52bee0599bb293c 100644 +index 1daacdd75c709cd5508434b41589bd57032de27c..d049aac0208386198d1da4e9470e64898d27b1c9 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java @@ -137,6 +137,11 @@ public class EntityCreeper extends EntityMonster { @@ -789,7 +789,7 @@ index 93946f4e3cad07e20189a44ce512682b4cbc163b..926a38adb52b7d99ce2a9fcc52eb4878 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index 18b3f8d1fadd1424327261d92b49977a35c4948c..478ac5bfdc69b5c3e24906bb5e0ea1dff81cea98 100644 +index c04ff259f650b0e5a361c4f17b8b5ff9ecb8ab71..a1cc0b414479e693de9428412ba837fd9bf57751 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java @@ -96,6 +96,11 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { @@ -837,7 +837,7 @@ index 55607910183155080e3d96296421438d17f19c8f..8d7b8d2ac9a7340e2cfd0d1b8963e4e4 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java b/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java -index 8784647f512d280ee0a092ecd406321268359314..5c39a9aec865d25a9aa5edcfd3a0fd6d1166cbd1 100644 +index b6d49740a1c8dfa19e871869b92b307fc8397588..e83d9aae4a04fc67587d40cec1f24ba5ebb58e10 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java @@ -73,6 +73,11 @@ public class EntityGhast extends EntityFlying implements IMonster { @@ -853,7 +853,7 @@ index 8784647f512d280ee0a092ecd406321268359314..5c39a9aec865d25a9aa5edcfd3a0fd6d @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityGuardian.java b/src/main/java/net/minecraft/world/entity/monster/EntityGuardian.java -index 6980b6988549b37a33d204a6e84c9e81d384a57a..248c64ea21de214bfbb2fa39f289382fd4f76202 100644 +index 66ae664add95f4441724b49a470a2fef569042d6..291b2e0defe4d63d4f746a3879c1fee59d2997d7 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityGuardian.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityGuardian.java @@ -86,6 +86,11 @@ public class EntityGuardian extends EntityMonster { @@ -905,7 +905,7 @@ index 15ed51a2746c09538a425fce25fa25f2619b7033..626a207cdb727866cb75f4e53a688086 public static AttributeProvider.Builder m() { diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java -index a836839b17cbda8ac269f032b141ba448e3bab8c..902b26d609aef8dd46e8875cb7c06f187511e8d5 100644 +index 1ea3054cebbf32588219f8915f9fb496495e3a10..437d602cf4a0da52fc61a50321d795290eea11bf 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java @@ -120,6 +120,11 @@ public class EntityPhantom extends EntityFlying implements IMonster { @@ -966,10 +966,10 @@ index 2a4ac6e608650d56cc2b564e715b7b685e7f3f62..43a1a31db5ddfd30b66c63c6b2cceb1d @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java b/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java -index dc1ca7b334e89b4d0be775b6f6e6f4222ea02dcc..80c3cd540a46e249e85586e8d7a2f0f6226091fc 100644 +index cc37e545ece89803fad91801775470df4620bd62..7e3b59e2302a27f7b8a3f43b75527199722a896f 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java -@@ -81,6 +81,11 @@ public class EntityRavager extends EntityRaider { +@@ -80,6 +80,11 @@ public class EntityRavager extends EntityRaider { double speed = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).getBaseValue(); getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(speed); } @@ -1078,7 +1078,7 @@ index cb52c4e63ac487d55dc16accca6976f44f904112..62f1808a456f46a6c7fbb5e030d9ed65 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntitySlime.java b/src/main/java/net/minecraft/world/entity/monster/EntitySlime.java -index 0cbe3032fd3b048b0eb8ec3d8592a662c69c9e30..ce0d52a501dbff7c4eb70270bafa3e2a77599107 100644 +index feb40c2ca8e8f3fae5665b2d71296a6b811b11f6..2b826dadb4b9132541c9844d144ce7050829250b 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntitySlime.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntitySlime.java @@ -51,6 +51,7 @@ import com.destroystokyo.paper.event.entity.SlimeChangeDirectionEvent; @@ -1170,7 +1170,7 @@ index cba66a08feceeeaf7c123da595fc7b12c5749783..892aa844a98ae0d192737c6fc6df0a21 public static boolean c(EntityTypes entitytypes, GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn, BlockPosition blockposition, Random random) { diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityVex.java b/src/main/java/net/minecraft/world/entity/monster/EntityVex.java -index 4301ece0a04f3f2b4d198a684d0ca314deef2aef..69d47697442fa80fbed08a11bb9e66057d059101 100644 +index 5e2114d2321c1542dc892bc7aed07080008cfd20..6835abd1badd1f03401870f4fed2b6911211d931 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityVex.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityVex.java @@ -92,6 +92,11 @@ public class EntityVex extends EntityMonster { @@ -1218,7 +1218,7 @@ index c4663c5b02363bd1499ce1f3b50027f8aa7c68e7..a119923ee8d8ac00892f594a8af6d392 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityZoglin.java b/src/main/java/net/minecraft/world/entity/monster/EntityZoglin.java -index c5b1ce9268d6e6f3ec26eda4b5d8e7ae2a2ea672..17c96e8eaa5cde028024f5ad4b853e3399a942d5 100644 +index 249fb9cf43527af5c7818ce6b07487ad446811b7..4d03a2dc2aed9b292ac17dc57d560f13e655cf4a 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityZoglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityZoglin.java @@ -72,6 +72,11 @@ public class EntityZoglin extends EntityMonster implements IMonster, IOglin { @@ -1319,7 +1319,7 @@ index b8395c7317494adf36010080931a1c8635ab6cfa..aeeee97a87680f072188d1fcc9ec55b5 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java -index 828d01abe8202a246ce07c1c652a17cbc829d904..b271df48d04f12a68e0b7abf2f1375749a9a0f08 100644 +index 8c2815c8b11c8db8e6c1d0caf71188322e52094d..0b6c80e908392025197b68d1ba6b3eed6d69c9b2 100644 --- a/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java @@ -76,6 +76,11 @@ public class EntityHoglin extends EntityAnimal implements IMonster, IOglin { @@ -1335,7 +1335,7 @@ index 828d01abe8202a246ce07c1c652a17cbc829d904..b271df48d04f12a68e0b7abf2f137574 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java -index 8c6f5273ed2ab4ec63b7854e290f790b2eca8c2f..99fc16aae085da564c5236e68925a8a2225f5c27 100644 +index 2311d82824314a9feede9c3c106b0e1b24ac1b7a..17dde4532714378f7480f55991d94fc82e9a2b05 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java @@ -80,6 +80,11 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow { @@ -1351,7 +1351,7 @@ index 8c6f5273ed2ab4ec63b7854e290f790b2eca8c2f..99fc16aae085da564c5236e68925a8a2 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglinBrute.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglinBrute.java -index da2220b08a9cd9c2d7d3fd06702e6690e12f095e..c441d6b2ce29d914a29c2f39d70adb14e9ab31a6 100644 +index 1370d2d8568a4ed62f2ec3d54abc7d2bebc48f75..201b78ffb5062254a6b3447f217df03dfb498710 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglinBrute.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglinBrute.java @@ -49,6 +49,11 @@ public class EntityPiglinBrute extends EntityPiglinAbstract { diff --git a/patches/Purpur/patches/server/0149-Phantom-flames-on-swoop.patch b/patches/Purpur/patches/server/0149-Phantom-flames-on-swoop.patch index d4d78cad..574a9b30 100644 --- a/patches/Purpur/patches/server/0149-Phantom-flames-on-swoop.patch +++ b/patches/Purpur/patches/server/0149-Phantom-flames-on-swoop.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Phantom flames on swoop diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java -index 902b26d609aef8dd46e8875cb7c06f187511e8d5..4f3d4f2596c69881f0653bddcc3bf2b9ede3ca8f 100644 +index 437d602cf4a0da52fc61a50321d795290eea11bf..fe07d9798eaae670e218d25fe23256c87c41d686 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityPhantom.java @@ -226,6 +226,7 @@ public class EntityPhantom extends EntityFlying implements IMonster { diff --git a/patches/Purpur/patches/server/0151-Implement-TPSBar.patch b/patches/Purpur/patches/server/0151-Implement-TPSBar.patch index ce1c18e6..7bf449ab 100644 --- a/patches/Purpur/patches/server/0151-Implement-TPSBar.patch +++ b/patches/Purpur/patches/server/0151-Implement-TPSBar.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement TPSBar diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java -index 2f5e8ed345ace0d9abb7edebe1fd47e562b1d272..ce95a7d9c967d723bad468bd00a5c0a6b887aa33 100644 +index 0ea56c863a9a1019b36f7f9f9164301aef12637b..4338b459011bf7a083790b7bb76cf1b24471fd19 100644 --- a/src/main/java/net/minecraft/commands/CommandDispatcher.java +++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java @@ -193,6 +193,7 @@ public class CommandDispatcher { @@ -17,10 +17,10 @@ index 2f5e8ed345ace0d9abb7edebe1fd47e562b1d272..ce95a7d9c967d723bad468bd00a5c0a6 if (commanddispatcher_servertype.d) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 4ceaa8e905c9ba7277ee00cea020d01d14ae2178..137c52999666ea331ac52c230f0674d489a95524 100644 +index 8ba25be0ea59483e824be9afc63d47cb75b5b334..61603bda0d1e305679ab2463188c3f6cf9c8c18d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -989,6 +989,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 0) { --this.c; diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java -index b8b0ee65798dc94d707fa64bd53fdda5506331d9..355735c2efbba62481d059b8e733c9c70e834be1 100644 +index 5a2e624f1b6636f058cc69989324914f174a271a..03fee11004b27402ec9da39c617c226175242bb4 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityFox.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityFox.java -@@ -1075,7 +1075,7 @@ public class EntityFox extends EntityAnimal { +@@ -1073,7 +1073,7 @@ public class EntityFox extends EntityAnimal { } protected void n() { @@ -89,10 +89,10 @@ index b8b0ee65798dc94d707fa64bd53fdda5506331d9..355735c2efbba62481d059b8e733c9c7 if (iblockdata.a(Blocks.SWEET_BERRY_BUSH)) { diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java -index 284c52276b2fd816990c23b7b8a9ee50e70ab005..acb4c79b23fada090c5605cd352a573bdb0667bf 100644 +index ef031ac08b06e78d8826579c49cf5e43683318f9..a5be1a9d4e6f08f23215b49a30c1121167cc7a89 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityRabbit.java -@@ -518,7 +518,7 @@ public class EntityRabbit extends EntityAnimal { +@@ -517,7 +517,7 @@ public class EntityRabbit extends EntityAnimal { @Override public boolean a() { if (this.c <= 0) { @@ -102,7 +102,7 @@ index 284c52276b2fd816990c23b7b8a9ee50e70ab005..acb4c79b23fada090c5605cd352a573b } diff --git a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java -index 88db8ff8cb415b84ab98cc0550c705d5a472230c..17f27d2bf5be746a0fa0e1e0fecab8158b2b3587 100644 +index 3934966b06eb9880ed316cee84d099edd80c09b9..b13cd3f344a0e2c4c02b30f80ca9a81d93cc1954 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java @@ -123,7 +123,7 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt @@ -115,7 +115,7 @@ index 88db8ff8cb415b84ab98cc0550c705d5a472230c..17f27d2bf5be746a0fa0e1e0fecab815 } diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java -index 999a6d17eccd6305c0063e1558abfe70d72c39fe..a81d782877ff6116477792fa4cec0846e56ed384 100644 +index aeff46b575a05145fb509b5e5a489b2067776e2f..0614483830336f3bbd348319ca3eed8767568852 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java @@ -539,7 +539,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { @@ -128,10 +128,10 @@ index 999a6d17eccd6305c0063e1558abfe70d72c39fe..a81d782877ff6116477792fa4cec0846 // flag1 = this.world.a(blockposition, false) || flag1; flag1 = true; diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java -index beb4d59faf4bd7501468b2eaa0e866613625e963..fa6b72c7a12b20f8ccffa360a3895e4d8f4277e4 100644 +index 34103234140d61a5dc1d3e9f575fb8a65cde956b..9a152b7cd351380e696640a51e5f8b64225f25f0 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java -@@ -380,7 +380,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -378,7 +378,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { if (this.getInvul() > 0) { i = this.getInvul() - 1; if (i <= 0) { @@ -140,7 +140,7 @@ index beb4d59faf4bd7501468b2eaa0e866613625e963..fa6b72c7a12b20f8ccffa360a3895e4d // CraftBukkit start // this.world.createExplosion(this, this.locX(), this.getHeadY(), this.locZ(), 7.0F, false, explosion_effect); ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 7.0F, false); -@@ -492,7 +492,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -490,7 +490,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { if (this.bw > 0) { --this.bw; @@ -150,7 +150,7 @@ index beb4d59faf4bd7501468b2eaa0e866613625e963..fa6b72c7a12b20f8ccffa360a3895e4d j = MathHelper.floor(this.locX()); int j1 = MathHelper.floor(this.locZ()); diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index 478ac5bfdc69b5c3e24906bb5e0ea1dff81cea98..ea500a6080f73dcc35d83a3b5a170f57dedaa431 100644 +index a1cc0b414479e693de9428412ba837fd9bf57751..d8c568d821b859bac0a9839c42c9596cf964b16e 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java @@ -455,7 +455,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { @@ -185,10 +185,10 @@ index 8d7b8d2ac9a7340e2cfd0d1b8963e4e4d97e8bc8..8a219ac18307c715913f5c2a80b1ff35 } else { List list = EntityEvoker.this.world.a(EntitySheep.class, this.e, EntityEvoker.this, EntityEvoker.this.getBoundingBox().grow(16.0D, 4.0D, 16.0D)); diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java b/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java -index 80c3cd540a46e249e85586e8d7a2f0f6226091fc..6809c93fe435d183a27204fb4460fd68a86aa04f 100644 +index 7e3b59e2302a27f7b8a3f43b75527199722a896f..16da85620c067b005ce029c8b9c5ea1642a794f0 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java -@@ -179,7 +179,7 @@ public class EntityRavager extends EntityRaider { +@@ -178,7 +178,7 @@ public class EntityRavager extends EntityRaider { this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(MathHelper.d(0.1D, d1, d0)); } @@ -286,10 +286,10 @@ index ff41ee884e3e46af1b1e9fb550f0abc6998fd031..8eec32af12c69e1963dcd304a25ec481 if (this.b.fb() && !this.b.fa().a() && this.b.eN() && !ItemStack.matches(this.b.getEquipment(EnumItemSlot.HEAD), Raid.s())) { diff --git a/src/main/java/net/minecraft/world/level/block/BlockCampfire.java b/src/main/java/net/minecraft/world/level/block/BlockCampfire.java -index 21baa8fb99b0587da503e14e2b04abf3134d03bc..3f816358758165bf5e346eaffcb3edc46c48dd40 100644 +index 023128e5c737ad26e40e4019e70df856395addcb..bb071b5053442fcbc20b00bd84cd8a37fdf7a314 100644 --- a/src/main/java/net/minecraft/world/level/block/BlockCampfire.java +++ b/src/main/java/net/minecraft/world/level/block/BlockCampfire.java -@@ -181,7 +181,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged +@@ -182,7 +182,7 @@ public class BlockCampfire extends BlockTileEntity implements IBlockWaterlogged public void a(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) { if (!world.isClientSide && iprojectile.isBurning()) { Entity entity = iprojectile.getShooter(); @@ -299,13 +299,13 @@ index 21baa8fb99b0587da503e14e2b04abf3134d03bc..3f816358758165bf5e346eaffcb3edc4 if (flag && !(Boolean) iblockdata.get(BlockCampfire.LIT) && !(Boolean) iblockdata.get(BlockCampfire.d)) { BlockPosition blockposition = movingobjectpositionblock.getBlockPosition(); diff --git a/src/main/java/net/minecraft/world/level/block/BlockCrops.java b/src/main/java/net/minecraft/world/level/block/BlockCrops.java -index 09f15d9087f1c40e5d50cb56f8c764ddaa992e41..5f8366beeaac7153a0421554f9bf91fbf265edca 100644 +index 32d71b6fc3fd0300386fb80e6d12d5f7c2361efe..55ad7693ced8bab5bc8b36a375c85370e84ccb77 100644 --- a/src/main/java/net/minecraft/world/level/block/BlockCrops.java +++ b/src/main/java/net/minecraft/world/level/block/BlockCrops.java -@@ -160,7 +160,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement - +@@ -161,7 +161,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement @Override public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, blockposition)).callEvent()) { return; } // Paper - if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // CraftBukkit + if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), (!world.purpurConfig.ravagerBypassMobGriefing && !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING))).isCancelled()) { // CraftBukkit // Purpur world.a(blockposition, true, entity); diff --git a/patches/Purpur/patches/server/0159-Add-EntityTeleportHinderedEvent.patch b/patches/Purpur/patches/server/0159-Add-EntityTeleportHinderedEvent.patch index a4fd0b52..2bc96f22 100644 --- a/patches/Purpur/patches/server/0159-Add-EntityTeleportHinderedEvent.patch +++ b/patches/Purpur/patches/server/0159-Add-EntityTeleportHinderedEvent.patch @@ -17,13 +17,13 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/level/block/BlockEnderPortal.java b/src/main/java/net/minecraft/world/level/block/BlockEnderPortal.java -index fc89b3bf5075497596885548d80e4ed0b800ea89..4900c90597358f7b701b8becd2ac58de11aacc71 100644 +index ed916f69747b44b75eb06db4cf27adaf5e47fd1e..80aad27c2475535f22077a1674114eebfadbd711 100644 --- a/src/main/java/net/minecraft/world/level/block/BlockEnderPortal.java +++ b/src/main/java/net/minecraft/world/level/block/BlockEnderPortal.java -@@ -43,7 +43,15 @@ public class BlockEnderPortal extends BlockTileEntity { - +@@ -44,7 +44,15 @@ public class BlockEnderPortal extends BlockTileEntity { @Override public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, blockposition)).callEvent()) { return; } // Paper - if (world instanceof WorldServer && !entity.isPassenger() && !entity.isVehicle() && entity.canPortal() && VoxelShapes.c(VoxelShapes.a(entity.getBoundingBox().d((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()))), iblockdata.getShape(world, blockposition), OperatorBoolean.AND)) { + // Purpur start + if (world instanceof WorldServer && /*!entity.isPassenger() && !entity.isVehicle() &&*/ entity.canPortal() && VoxelShapes.c(VoxelShapes.a(entity.getBoundingBox().d((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()))), iblockdata.getShape(world, blockposition), OperatorBoolean.AND)) { @@ -38,13 +38,13 @@ index fc89b3bf5075497596885548d80e4ed0b800ea89..4900c90597358f7b701b8becd2ac58de WorldServer worldserver = ((WorldServer) world).getMinecraftServer().getWorldServer(resourcekey); diff --git a/src/main/java/net/minecraft/world/level/block/BlockPortal.java b/src/main/java/net/minecraft/world/level/block/BlockPortal.java -index 5f797260eff317409a5039b88b01ad79ee2fdd91..ac5ce96ab62ec210816e7af85a4269073b7a9270 100644 +index f030aa3ddd001e018539ae93c238f2afb26e0fc2..41733979141ed62523e9058a3f4c4ea753bfbc64 100644 --- a/src/main/java/net/minecraft/world/level/block/BlockPortal.java +++ b/src/main/java/net/minecraft/world/level/block/BlockPortal.java -@@ -82,7 +82,15 @@ public class BlockPortal extends Block { - +@@ -83,7 +83,15 @@ public class BlockPortal extends Block { @Override public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, blockposition)).callEvent()) { return; } // Paper - if (!entity.isPassenger() && !entity.isVehicle() && entity.canPortal()) { + // Purpur start + if (/*!entity.isPassenger() && !entity.isVehicle() &&*/ entity.canPortal()) { @@ -82,7 +82,7 @@ index d918194e45953764fa3fd286b715714330a60941..70496562faa89e92da34a4f7b891f845 if (this.exitPortal == null && this.world.getTypeKey() == DimensionManager.THE_END) { // CraftBukkit - work in alternate worlds this.a((WorldServer) this.world); diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java -index 0ea0a1fc5f4d879d48bbdf24731dabec10dbccd1..370378b3b153720bf79a3d61d30d3f3d614a5d10 100644 +index df595dc52858807479584ce8da49390a25695990..0990eb8b2e2d8a5f7c1a2640727d86c37a50298e 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java @@ -303,6 +303,7 @@ public abstract class BlockBase { @@ -108,10 +108,10 @@ index a0df754d98e4be46720ba0962bdf7bf62f3425bb..c8b510a49ba5c299ec38ea1a56f5245e + } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index c524a0994f1c9ef1d0534403efa4e4481955b2f3..a80f664d2cf713fd751421be3735e2f4779f0056 100644 +index dcdc82b42689b4962323938a62cf7ded49afd6f4..4a70d657fd83627e8d66b52cb5f87381b43ad76a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -554,6 +554,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -550,6 +550,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { location.checkFinite(); if (entity.isVehicle() || entity.dead) { @@ -123,7 +123,7 @@ index c524a0994f1c9ef1d0534403efa4e4481955b2f3..a80f664d2cf713fd751421be3735e2f4 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e204374c8f17ca5514e9bcfd24d411069285de29..7e0b3aa37af39db2bc2f630e479008dd9a443776 100644 +index e557157c5128ea89d728de2ab92b5e1a7b3437ef..dbac5843088e221cd7d654a0c872ef4451b53075 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -126,6 +126,7 @@ import org.bukkit.entity.EntityType; @@ -134,7 +134,7 @@ index e204374c8f17ca5514e9bcfd24d411069285de29..7e0b3aa37af39db2bc2f630e479008dd import org.bukkit.event.player.PlayerUnregisterChannelEvent; import org.bukkit.inventory.InventoryView.Property; import org.bukkit.inventory.ItemStack; -@@ -883,6 +884,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -881,6 +882,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } if (entity.isVehicle()) { diff --git a/patches/Purpur/patches/server/0162-Movement-options-for-armor-stands.patch b/patches/Purpur/patches/server/0162-Movement-options-for-armor-stands.patch index 4880fe0f..a0bd6b69 100644 --- a/patches/Purpur/patches/server/0162-Movement-options-for-armor-stands.patch +++ b/patches/Purpur/patches/server/0162-Movement-options-for-armor-stands.patch @@ -17,10 +17,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c6128dc68be7cd60cf49db90ff5e816e4e14c4cf..a198829b370b66e4e58ad47dcb4aa27f1990bcc1 100644 +index ebdeb74a882f5f70214e6adfd83c5254dab29a5a..1b381125b16f231686b507985807028824b9d441 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1500,7 +1500,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -1499,7 +1499,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return this.isInWater() || flag; } diff --git a/patches/Purpur/patches/server/0163-Fix-stuck-in-portals.patch b/patches/Purpur/patches/server/0163-Fix-stuck-in-portals.patch index 03eb8d6c..62172e6d 100644 --- a/patches/Purpur/patches/server/0163-Fix-stuck-in-portals.patch +++ b/patches/Purpur/patches/server/0163-Fix-stuck-in-portals.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix stuck in portals diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index a1d5662911ee3a038da427bf2e0b69a11f187149..9c520e7600986b7b7df3af96a715c91c5347f30d 100644 +index 8a7f75baa730729dd0022fe74da15fe669eced24..c69ef7ee5e40e2557b3a3971c6fb24c9966d6809 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -1291,6 +1291,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1299,6 +1299,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { playerlist.d(this); worldserver1.removePlayer(this); this.dead = false; @@ -17,10 +17,10 @@ index a1d5662911ee3a038da427bf2e0b69a11f187149..9c520e7600986b7b7df3af96a715c91c // CraftBukkit end this.spawnIn(worldserver); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index a198829b370b66e4e58ad47dcb4aa27f1990bcc1..1f306bd4f29086cae8839b36a87f477d03394295 100644 +index 1b381125b16f231686b507985807028824b9d441..6cbd6b38ac77dac8ecde224849f74a6f5a4f9d98 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2551,12 +2551,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2550,12 +2550,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return new Vec2F(this.pitch, this.yaw); } diff --git a/patches/Purpur/patches/server/0165-Toggle-for-water-sensitive-mob-damage.patch b/patches/Purpur/patches/server/0165-Toggle-for-water-sensitive-mob-damage.patch index d14f4bc8..f64db131 100644 --- a/patches/Purpur/patches/server/0165-Toggle-for-water-sensitive-mob-damage.patch +++ b/patches/Purpur/patches/server/0165-Toggle-for-water-sensitive-mob-damage.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Toggle for water sensitive mob damage diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index a6ea96683b0f4d35015dff6168f3bf458346fb6f..95c08c31cb4d9df73f0af8f0e3b61236e1b46faa 100644 +index 4da6e2dd956a44d7cd47a234f1b251c930722015..b69bc34bfc4873dc2214aea19bfa877c37740418 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -@@ -863,7 +863,8 @@ public abstract class EntityInsentient extends EntityLiving { +@@ -861,7 +861,8 @@ public abstract class EntityInsentient extends EntityLiving { if (goalFloat.validConditions()) goalFloat.update(); this.getControllerJump().jumpIfSet(); } @@ -19,7 +19,7 @@ index a6ea96683b0f4d35015dff6168f3bf458346fb6f..95c08c31cb4d9df73f0af8f0e3b61236 } return; diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 56ea148ddff1674e46c258f2658d0f4b5313e63a..b4a203be4de6b9aba280dfef22a91c02266c9f36 100644 +index 87806ef6119699a5f6652652f27c49eb829e1ec0..a67081f4014bf775e3aeea0bf1ab4e3fc9d22b21 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -2990,6 +2990,7 @@ public abstract class EntityLiving extends Entity { @@ -31,7 +31,7 @@ index 56ea148ddff1674e46c258f2658d0f4b5313e63a..b4a203be4de6b9aba280dfef22a91c02 return false; } diff --git a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java -index 17f27d2bf5be746a0fa0e1e0fecab8158b2b3587..ad30cc92333aabf7d9fb3fb046e7ecb63629ee5b 100644 +index b13cd3f344a0e2c4c02b30f80ca9a81d93cc1954..d7aa3bd329eef71d58a8ea9be5735c58a598222b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntitySnowman.java @@ -108,7 +108,7 @@ public class EntitySnowman extends EntityGolem implements IShearable, IRangedEnt @@ -44,7 +44,7 @@ index 17f27d2bf5be746a0fa0e1e0fecab8158b2b3587..ad30cc92333aabf7d9fb3fb046e7ecb6 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java b/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java -index 45e69d2f8da4c5babfd2e67055cc0a4c6d3baac7..f90a0fcd41996cfb6935a2299306e6a4bf19701a 100644 +index 55b6f483aca8cbb5c30b3759e23c86a699e19569..09f8f792bb800a274f7b127bc925c07416906ed5 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityBlaze.java @@ -143,7 +143,7 @@ public class EntityBlaze extends EntityMonster { @@ -57,7 +57,7 @@ index 45e69d2f8da4c5babfd2e67055cc0a4c6d3baac7..f90a0fcd41996cfb6935a2299306e6a4 @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index ea500a6080f73dcc35d83a3b5a170f57dedaa431..d290787f74579dd4c138eb827e44544814bfe315 100644 +index d8c568d821b859bac0a9839c42c9596cf964b16e..402a07551d9e78bac5e0f45e30b0abb7a4c82704 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java @@ -290,7 +290,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { diff --git a/patches/Purpur/patches/server/0166-Config-to-always-tame-in-Creative.patch b/patches/Purpur/patches/server/0166-Config-to-always-tame-in-Creative.patch index edd6d0ed..97db59cb 100644 --- a/patches/Purpur/patches/server/0166-Config-to-always-tame-in-Creative.patch +++ b/patches/Purpur/patches/server/0166-Config-to-always-tame-in-Creative.patch @@ -20,7 +20,7 @@ index d285f5aa66fa81a2f56920c05afb4506cb82fa54..39e348847bcecd91013452e71ef16729 return; } diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityCat.java b/src/main/java/net/minecraft/world/entity/animal/EntityCat.java -index 7143b0801be7877762e41da336ea5e4e57f2e463..a099d8e0c5a3e4b804c8af978161ec1747ee7fa3 100644 +index a4e3e36f081803b0588a0e907a3a834b7a3ab3eb..84784e91eb6c4bee7e66a6dee8736b948414a7a5 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityCat.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityCat.java @@ -439,7 +439,7 @@ public class EntityCat extends EntityTameableAnimal { @@ -33,7 +33,7 @@ index 7143b0801be7877762e41da336ea5e4e57f2e463..a099d8e0c5a3e4b804c8af978161ec17 this.setWillSit(true); this.world.broadcastEntityEffect(this, (byte) 7); diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java -index efa4318989893c946e9d7671d0dead6c4a6e315f..b2a8bfc3e53a2071ab7451fbdb3d49d97f0c430a 100644 +index 7500de8bcdd32f08bf6d32e70cfe09baf097cc2b..2f51e80a02817f1e36c8fe9542809ab881263a16 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java @@ -301,7 +301,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird { diff --git a/patches/Purpur/patches/server/0168-Add-unsafe-Entity-serialization-API.patch b/patches/Purpur/patches/server/0168-Add-unsafe-Entity-serialization-API.patch index d1c84d44..9e1a3646 100644 --- a/patches/Purpur/patches/server/0168-Add-unsafe-Entity-serialization-API.patch +++ b/patches/Purpur/patches/server/0168-Add-unsafe-Entity-serialization-API.patch @@ -29,10 +29,10 @@ index 2cf4e8f68fa85c4e09effda0da0c3a3f64ae7ba9..c166e0a8e7eadb4f714078f764ef35f7 return SystemUtils.a(a(nbttagcompound).map((entitytypes) -> { return entitytypes.a(world); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index a80f664d2cf713fd751421be3735e2f4779f0056..6c37bf58bd269c2d7e1c84e5791e8245e4c75aea 100644 +index 4a70d657fd83627e8d66b52cb5f87381b43ad76a..af69023b241560031f6aa116561d7407b2502578 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1200,5 +1200,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1196,5 +1196,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public boolean isRidableInWater() { return getHandle().isRidableInWater(); } @@ -46,7 +46,7 @@ index a80f664d2cf713fd751421be3735e2f4779f0056..6c37bf58bd269c2d7e1c84e5791e8245 // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 67f93f252a26f8b598a4b48c63c321728b246cae..b05b6e911026b8b8ad2e12b7a6705364ec90769d 100644 +index 3fa4d18d7a1e2d351fbe8e02d1e749587f98c2a2..bfe4f7ed53620510b52d4f01c5ea2a3f726942d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -410,9 +410,14 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/Purpur/patches/server/0169-Add-ghast-allow-griefing-option.patch b/patches/Purpur/patches/server/0169-Add-ghast-allow-griefing-option.patch index 388d033b..fc94c688 100644 --- a/patches/Purpur/patches/server/0169-Add-ghast-allow-griefing-option.patch +++ b/patches/Purpur/patches/server/0169-Add-ghast-allow-griefing-option.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add ghast allow-griefing option diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java b/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java -index 5c39a9aec865d25a9aa5edcfd3a0fd6d1166cbd1..4bc8b6ec44a03390ced313e84b03ab6662a3c0a2 100644 +index e83d9aae4a04fc67587d40cec1f24ba5ebb58e10..5834b38ab206a9db6d3e336074095ce85bdbcc50 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityGhast.java @@ -230,6 +230,7 @@ public class EntityGhast extends EntityFlying implements IMonster { diff --git a/patches/Purpur/patches/server/0170-Configs-for-if-Wither-Ender-Dragon-can-ride-vehicles.patch b/patches/Purpur/patches/server/0170-Configs-for-if-Wither-Ender-Dragon-can-ride-vehicles.patch index 5bef17ba..c7e26012 100644 --- a/patches/Purpur/patches/server/0170-Configs-for-if-Wither-Ender-Dragon-can-ride-vehicles.patch +++ b/patches/Purpur/patches/server/0170-Configs-for-if-Wither-Ender-Dragon-can-ride-vehicles.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configs for if Wither/Ender Dragon can ride vehicles diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 1f306bd4f29086cae8839b36a87f477d03394295..f140574c7f35a0424b523054553c41c3717c8035 100644 +index 6cbd6b38ac77dac8ecde224849f74a6f5a4f9d98..e915905af690124f17407876c0fb854750f5db71 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2401,7 +2401,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2400,7 +2400,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } } @@ -18,7 +18,7 @@ index 1f306bd4f29086cae8839b36a87f477d03394295..f140574c7f35a0424b523054553c41c3 } diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java -index a81d782877ff6116477792fa4cec0846e56ed384..6b0a71ce1c51e587ee17c8d60aaa52bbc87fb321 100644 +index 0614483830336f3bbd348319ca3eed8767568852..d27f61959e924e1ce6c7d76c905d98a762823e91 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java @@ -1073,6 +1073,7 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster { @@ -30,10 +30,10 @@ index a81d782877ff6116477792fa4cec0846e56ed384..6b0a71ce1c51e587ee17c8d60aaa52bb } diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java -index fa6b72c7a12b20f8ccffa360a3895e4d8f4277e4..4a3e0f7f59ca4fd64be62a580d08b6ab84649ee8 100644 +index 9a152b7cd351380e696640a51e5f8b64225f25f0..e34e25d62bd677fc7373e73b4118898a4f7f4d26 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/EntityWither.java -@@ -730,6 +730,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { +@@ -728,6 +728,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity { @Override protected boolean n(Entity entity) { diff --git a/patches/Purpur/patches/server/0171-Dont-run-with-scissors.patch b/patches/Purpur/patches/server/0171-Dont-run-with-scissors.patch index 370a0f79..734fbd6e 100644 --- a/patches/Purpur/patches/server/0171-Dont-run-with-scissors.patch +++ b/patches/Purpur/patches/server/0171-Dont-run-with-scissors.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Dont run with scissors! diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index fbfb3eba79ded3720edf93b3d1c18cbc02c086dd..0bed1f132200876122f92f0ca539e53afa222c14 100644 +index 2bf4acf2e08abcfdf8f2529480b48f1eb9b85d27..fda4e5b5c15e9d1fab48006991ec8139907abc74 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -1552,6 +1552,12 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/patches/Purpur/patches/server/0172-One-Punch-Man.patch b/patches/Purpur/patches/server/0172-One-Punch-Man.patch index e6222924..67e9417f 100644 --- a/patches/Purpur/patches/server/0172-One-Punch-Man.patch +++ b/patches/Purpur/patches/server/0172-One-Punch-Man.patch @@ -5,7 +5,7 @@ Subject: [PATCH] One Punch Man! diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index b4a203be4de6b9aba280dfef22a91c02266c9f36..535fbd84b23275398954d312bf825b321b87da4d 100644 +index a67081f4014bf775e3aeea0bf1ab4e3fc9d22b21..2b47287b135fd4a9798379e1f50c31db5e9d865c 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -2032,6 +2032,23 @@ public abstract class EntityLiving extends Entity { @@ -33,7 +33,7 @@ index b4a203be4de6b9aba280dfef22a91c02266c9f36..535fbd84b23275398954d312bf825b32 if (human) { // PAIL: Be sure to drag all this code from the EntityHuman subclass each update. diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 132972755ac74838f3386e0fac5033380b71fce5..26fff0540e3d8863e83b0a60df2205422d50f1e1 100644 +index a4c41caae425e054db3f40a9abc41f45ccd20730..2e4bc664412feb8657c7b9995d281203a14d48fd 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -897,6 +897,7 @@ public final class ItemStack { diff --git a/patches/Purpur/patches/server/0175-Config-to-ignore-nearby-mobs-when-sleeping.patch b/patches/Purpur/patches/server/0175-Config-to-ignore-nearby-mobs-when-sleeping.patch index 228c989c..0e34d469 100644 --- a/patches/Purpur/patches/server/0175-Config-to-ignore-nearby-mobs-when-sleeping.patch +++ b/patches/Purpur/patches/server/0175-Config-to-ignore-nearby-mobs-when-sleeping.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Config to ignore nearby mobs when sleeping diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index 9c520e7600986b7b7df3af96a715c91c5347f30d..4ec18d28c0022614b0ef6900774ddd4bda814308 100644 +index c69ef7ee5e40e2557b3a3971c6fb24c9966d6809..96520df171fadbc90c130555bd0c7139579f73d8 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -1441,7 +1441,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1463,7 +1463,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { return entitymonster.f((EntityHuman) this); }); diff --git a/patches/Purpur/patches/server/0176-Config-for-Enderman-to-aggro-spawned-Endermites.patch b/patches/Purpur/patches/server/0176-Config-for-Enderman-to-aggro-spawned-Endermites.patch index 88ef17f3..95fbae18 100644 --- a/patches/Purpur/patches/server/0176-Config-for-Enderman-to-aggro-spawned-Endermites.patch +++ b/patches/Purpur/patches/server/0176-Config-for-Enderman-to-aggro-spawned-Endermites.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Config for Enderman to aggro spawned Endermites By default, Enderman do not attack Endermites unless spawned by an Ender Pearl. diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index d290787f74579dd4c138eb827e44544814bfe315..46143a710e057378ebe0ad644de275604b11d886 100644 +index 402a07551d9e78bac5e0f45e30b0abb7a4c82704..f113d5106bbee6fb0a5267547154f0839d03d089 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java @@ -72,7 +72,7 @@ public class EntityEnderman extends EntityMonster implements IEntityAngerable { diff --git a/patches/Purpur/patches/server/0177-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch b/patches/Purpur/patches/server/0177-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch index 89b12676..2dfe053f 100644 --- a/patches/Purpur/patches/server/0177-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch +++ b/patches/Purpur/patches/server/0177-Config-to-ignore-Dragon-Head-wearers-and-stare-aggro.patch @@ -7,7 +7,7 @@ Prevents Enderman from becoming aggresive towards players that are wearing a Dra Adds functionality to a useless item! diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java -index 46143a710e057378ebe0ad644de275604b11d886..0ed19429c1a9021e636fdfffa582b4e093fbc2e7 100644 +index f113d5106bbee6fb0a5267547154f0839d03d089..bd03e91861237eeda50e607af4e26c1ad2d71297 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityEnderman.java @@ -50,6 +50,7 @@ import net.minecraft.world.entity.ai.goal.target.PathfinderGoalUniversalAngerRes diff --git a/patches/Purpur/patches/server/0179-Config-to-disable-Llama-caravans.patch b/patches/Purpur/patches/server/0179-Config-to-disable-Llama-caravans.patch index bd95b49c..baaca271 100644 --- a/patches/Purpur/patches/server/0179-Config-to-disable-Llama-caravans.patch +++ b/patches/Purpur/patches/server/0179-Config-to-disable-Llama-caravans.patch @@ -19,7 +19,7 @@ index 34a854131dd939693a6df4d52103714ebe373dc3..ea02a78c31ed43220a2b83be4bd2a896 List list = this.a.world.getEntities(this.a, this.a.getBoundingBox().grow(9.0D, 4.0D, 9.0D), (entity) -> { EntityTypes entitytypes = entity.getEntityType(); diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java b/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java -index 762fed5ba27474951c1962e6f034e8494b1035d6..567a1da3c167c20ae3fb86c2a1f3608ebb1056b6 100644 +index 4bea68fa35177d84a35dc5ced3e501a87e2a5391..f91e9dc5ae635329257f6b78b88c9c7c89e2f43d 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/EntityLlama.java @@ -518,7 +518,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn diff --git a/patches/Purpur/patches/server/0180-Config-to-make-Creepers-explode-on-death.patch b/patches/Purpur/patches/server/0180-Config-to-make-Creepers-explode-on-death.patch index 8965bc9c..d2b09623 100644 --- a/patches/Purpur/patches/server/0180-Config-to-make-Creepers-explode-on-death.patch +++ b/patches/Purpur/patches/server/0180-Config-to-make-Creepers-explode-on-death.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Config to make Creepers explode on death Creepers exploded after being killed in the alpha days. This brings that back. diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java -index 62d40f726355283baddde349c52bee0599bb293c..014091f35ee5aac0ee2f155ccec2daf586e4d3d3 100644 +index d049aac0208386198d1da4e9470e64898d27b1c9..27d5e9fc5ec1396e95180fc14e8a61b030cfd1e6 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java @@ -7,6 +7,7 @@ import net.minecraft.network.syncher.DataWatcher; diff --git a/patches/Purpur/patches/server/0181-Configurable-ravager-griefable-blocks-list.patch b/patches/Purpur/patches/server/0181-Configurable-ravager-griefable-blocks-list.patch index f556a319..0fa842b4 100644 --- a/patches/Purpur/patches/server/0181-Configurable-ravager-griefable-blocks-list.patch +++ b/patches/Purpur/patches/server/0181-Configurable-ravager-griefable-blocks-list.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable ravager griefable blocks list diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java b/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java -index 6809c93fe435d183a27204fb4460fd68a86aa04f..aee5e370907d238cb0a0fb55a45341c8f60ed7d0 100644 +index 16da85620c067b005ce029c8b9c5ea1642a794f0..c2a6f1cb399c2cd659e2b2191edbc2a687a40eeb 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java +++ b/src/main/java/net/minecraft/world/entity/monster/EntityRavager.java -@@ -189,7 +189,7 @@ public class EntityRavager extends EntityRaider { +@@ -188,7 +188,7 @@ public class EntityRavager extends EntityRaider { IBlockData iblockdata = this.world.getType(blockposition); Block block = iblockdata.getBlock(); @@ -18,13 +18,13 @@ index 6809c93fe435d183a27204fb4460fd68a86aa04f..aee5e370907d238cb0a0fb55a45341c8 } } diff --git a/src/main/java/net/minecraft/world/level/block/BlockCrops.java b/src/main/java/net/minecraft/world/level/block/BlockCrops.java -index 5f8366beeaac7153a0421554f9bf91fbf265edca..7fca4d1713e8061d9de825cdae48401217d4c6b1 100644 +index 55ad7693ced8bab5bc8b36a375c85370e84ccb77..99df890883165c39e0c8190c4729b952af03e1c8 100644 --- a/src/main/java/net/minecraft/world/level/block/BlockCrops.java +++ b/src/main/java/net/minecraft/world/level/block/BlockCrops.java -@@ -160,7 +160,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement - +@@ -161,7 +161,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement @Override public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, blockposition)).callEvent()) { return; } // Paper - if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), (!world.purpurConfig.ravagerBypassMobGriefing && !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING))).isCancelled()) { // CraftBukkit // Purpur + if (entity instanceof EntityRavager && world.purpurConfig.ravagerGriefableBlocks.contains(world.getType(blockposition).getBlock()) && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), (!world.purpurConfig.ravagerBypassMobGriefing && !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING))).isCancelled()) { // CraftBukkit // Purpur world.a(blockposition, true, entity); diff --git a/patches/Purpur/patches/server/0183-Config-for-skipping-night.patch b/patches/Purpur/patches/server/0183-Config-for-skipping-night.patch index 3dd2e82f..a84320d2 100644 --- a/patches/Purpur/patches/server/0183-Config-for-skipping-night.patch +++ b/patches/Purpur/patches/server/0183-Config-for-skipping-night.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Config for skipping night diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 267cb5dd651d94eed7b221ff70d7c2eb821917c3..a76559900487772b564018ac88d7204842e85ca1 100644 +index 6e75df2c18a1f432668fec932719aeea1dd153b7..93e853c241ffc8cf69f75a75c9bfbe6489933607 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java -@@ -1028,7 +1028,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1044,7 +1044,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } // CraftBukkit end diff --git a/patches/Purpur/patches/server/0186-Drowning-Settings.patch b/patches/Purpur/patches/server/0186-Drowning-Settings.patch index 2fbfcb96..7ff930cc 100644 --- a/patches/Purpur/patches/server/0186-Drowning-Settings.patch +++ b/patches/Purpur/patches/server/0186-Drowning-Settings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Drowning Settings diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index f140574c7f35a0424b523054553c41c3717c8035..013586baa739156cc34c47eba201f36b44ad56c9 100644 +index e915905af690124f17407876c0fb854750f5db71..9325163e392213be1d51588b95361af63d294952 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2606,7 +2606,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2605,7 +2605,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } public int getDefaultPortalCooldown() { @@ -18,7 +18,7 @@ index f140574c7f35a0424b523054553c41c3717c8035..013586baa739156cc34c47eba201f36b public Iterable bn() { diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 535fbd84b23275398954d312bf825b321b87da4d..89b8840e5cfc0fe0aa023882375c9b83826d1037 100644 +index 2b47287b135fd4a9798379e1f50c31db5e9d865c..cb18f3c88a0b8ef374cbcf4226848e1541bc8675 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -394,7 +394,7 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Purpur/patches/server/0191-Config-to-allow-for-unsafe-enchants.patch b/patches/Purpur/patches/server/0191-Config-to-allow-for-unsafe-enchants.patch index 998e7425..a888769e 100644 --- a/patches/Purpur/patches/server/0191-Config-to-allow-for-unsafe-enchants.patch +++ b/patches/Purpur/patches/server/0191-Config-to-allow-for-unsafe-enchants.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Config to allow for unsafe enchants diff --git a/src/main/java/net/minecraft/server/commands/CommandEnchant.java b/src/main/java/net/minecraft/server/commands/CommandEnchant.java -index 96991d77cfef2ef0fdada1a831619293ffe37e70..4d85ae98369039bcbb5ed5acb2d281bd65523fad 100644 +index 96991d77cfef2ef0fdada1a831619293ffe37e70..bd035a0f3554fd44f135c23fc92f3411ccf74e0d 100644 --- a/src/main/java/net/minecraft/server/commands/CommandEnchant.java +++ b/src/main/java/net/minecraft/server/commands/CommandEnchant.java @@ -48,7 +48,7 @@ public class CommandEnchant { @@ -22,10 +22,39 @@ index 96991d77cfef2ef0fdada1a831619293ffe37e70..4d85ae98369039bcbb5ed5acb2d281bd if (!itemstack.isEmpty()) { - if (enchantment.canEnchant(itemstack) && EnchantmentManager.a((Collection) EnchantmentManager.a(itemstack).keySet(), enchantment)) { -+ if (net.pl3x.purpur.PurpurConfig.allowUnsafeEnchants || (enchantment.canEnchant(itemstack) && EnchantmentManager.a((Collection) EnchantmentManager.a(itemstack).keySet(), enchantment))) { // Purpur ++ if ((enchantment.canEnchant(itemstack) && EnchantmentManager.a((Collection) EnchantmentManager.a(itemstack).keySet(), enchantment)) || (net.pl3x.purpur.PurpurConfig.allowUnsafeEnchants && !itemstack.hasEnchantment(enchantment))) { // Purpur itemstack.addEnchantment(enchantment, i); ++j; } else if (collection.size() == 1) { +diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java +index 2e4bc664412feb8657c7b9995d281203a14d48fd..677f866dfaab653b05c693663adaeb2465117a55 100644 +--- a/src/main/java/net/minecraft/world/item/ItemStack.java ++++ b/src/main/java/net/minecraft/world/item/ItemStack.java +@@ -860,6 +860,12 @@ public final class ItemStack { + return this.tag != null && this.tag.hasKeyOfType("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false; + } + ++ // Purpur start ++ public boolean hasEnchantment(Enchantment enchantment) { ++ return hasEnchantments() && EnchantmentManager.getEnchantmentMap(getEnchantments()).containsKey(enchantment); ++ } ++ // Purpur end ++ + public void getOrCreateTagAndSet(String s, NBTBase nbtbase) { a(s, nbtbase);} // Paper - OBFHELPER + public void a(String s, NBTBase nbtbase) { + this.getOrCreateTag().set(s, nbtbase); +diff --git a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentManager.java b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentManager.java +index b2d28c2bf0a9e93d38583e2d734c12fed4f63d5d..63a6f63a2d3e03e74c314cdebf7cb61b66fd5108 100644 +--- a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentManager.java ++++ b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentManager.java +@@ -59,6 +59,7 @@ public class EnchantmentManager { + return a(nbttaglist); + } + ++ public static Map getEnchantmentMap(NBTTagList nbttaglist) { return a(nbttaglist); } // Purpur - OBFHELPER + public static Map a(NBTTagList nbttaglist) { + Map map = Maps.newLinkedHashMap(); + diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java index f469b27273883c56cee98fee464c4d1a32a31478..b410d38a431f79971ca183b476115d9e85e1cd6e 100644 --- a/src/main/java/net/pl3x/purpur/PurpurConfig.java diff --git a/patches/Purpur/patches/server/0195-Piglin-portal-spawn-modifier.patch b/patches/Purpur/patches/server/0195-Piglin-portal-spawn-modifier.patch index c0636e3a..0d0a814d 100644 --- a/patches/Purpur/patches/server/0195-Piglin-portal-spawn-modifier.patch +++ b/patches/Purpur/patches/server/0195-Piglin-portal-spawn-modifier.patch @@ -18,7 +18,7 @@ Difficulties: 3 - hard diff --git a/src/main/java/net/minecraft/world/level/block/BlockPortal.java b/src/main/java/net/minecraft/world/level/block/BlockPortal.java -index ac5ce96ab62ec210816e7af85a4269073b7a9270..84140e01eba780ffb8289bff75d1b58af4deab76 100644 +index 41733979141ed62523e9058a3f4c4ea753bfbc64..757e3b56221eca5449ded2d94b93cffe10f3c5d9 100644 --- a/src/main/java/net/minecraft/world/level/block/BlockPortal.java +++ b/src/main/java/net/minecraft/world/level/block/BlockPortal.java @@ -52,7 +52,7 @@ public class BlockPortal extends Block { diff --git a/patches/Purpur/patches/server/0197-Configurable-damage-settings-for-magma-blocks.patch b/patches/Purpur/patches/server/0197-Configurable-damage-settings-for-magma-blocks.patch index 8856fc65..84e02bb1 100644 --- a/patches/Purpur/patches/server/0197-Configurable-damage-settings-for-magma-blocks.patch +++ b/patches/Purpur/patches/server/0197-Configurable-damage-settings-for-magma-blocks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable damage settings for magma blocks diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 013586baa739156cc34c47eba201f36b44ad56c9..96c876960a1a8a5534802cba3ed30d0f71aee71e 100644 +index 9325163e392213be1d51588b95361af63d294952..4f0b8d966ba38672a39f95d1f6f55f95cdc8d334 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -894,7 +894,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -893,7 +893,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } // CraftBukkit end @@ -18,10 +18,10 @@ index 013586baa739156cc34c47eba201f36b44ad56c9..96c876960a1a8a5534802cba3ed30d0f } diff --git a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentManager.java b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentManager.java -index b2d28c2bf0a9e93d38583e2d734c12fed4f63d5d..b889e5426781da215b5c26477015d04457142213 100644 +index 63a6f63a2d3e03e74c314cdebf7cb61b66fd5108..7ad0035045011737eab536343688ebd333f1b93f 100644 --- a/src/main/java/net/minecraft/world/item/enchantment/EnchantmentManager.java +++ b/src/main/java/net/minecraft/world/item/enchantment/EnchantmentManager.java -@@ -241,7 +241,7 @@ public class EnchantmentManager { +@@ -242,7 +242,7 @@ public class EnchantmentManager { return a(Enchantments.WATER_WORKER, entityliving) > 0; } diff --git a/patches/Purpur/patches/server/0199-Add-credits-command.patch b/patches/Purpur/patches/server/0199-Add-credits-command.patch index 993d994e..b5b5e9a4 100644 --- a/patches/Purpur/patches/server/0199-Add-credits-command.patch +++ b/patches/Purpur/patches/server/0199-Add-credits-command.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add credits command diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java -index ce95a7d9c967d723bad468bd00a5c0a6b887aa33..0703148d079d86921dac42ef90e514d3584bf569 100644 +index 4338b459011bf7a083790b7bb76cf1b24471fd19..c5babb19a3b4d20c4f9e414d5654d18c570d2b2d 100644 --- a/src/main/java/net/minecraft/commands/CommandDispatcher.java +++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java @@ -191,6 +191,7 @@ public class CommandDispatcher { diff --git a/patches/Purpur/patches/server/0200-Gamemode-extra-permissions.patch b/patches/Purpur/patches/server/0200-Gamemode-extra-permissions.patch index af93f8e5..284d8b96 100644 --- a/patches/Purpur/patches/server/0200-Gamemode-extra-permissions.patch +++ b/patches/Purpur/patches/server/0200-Gamemode-extra-permissions.patch @@ -31,17 +31,43 @@ index 4480fe75cfad35a5104b5116c5ec2c80d18f15f5..d73daa29f784283e03ad2ea3126cca7e return this.d; } diff --git a/src/main/java/net/minecraft/server/commands/CommandGamemode.java b/src/main/java/net/minecraft/server/commands/CommandGamemode.java -index 376d5eac9c17365266d8a4986bf4c19030454c9a..f004d027d673ec09c768c3ab0734b6b099921ef9 100644 +index 8da48d9cbadfbe83ae8410cf49d78df49f50fb08..323fa988529a7ad316a4dc8d3fc0f62b1478c334 100644 --- a/src/main/java/net/minecraft/server/commands/CommandGamemode.java +++ b/src/main/java/net/minecraft/server/commands/CommandGamemode.java -@@ -55,6 +55,7 @@ public class CommandGamemode { +@@ -55,6 +55,21 @@ public class CommandGamemode { } private static int a(CommandContext commandcontext, Collection collection, EnumGamemode enumgamemode) { -+ if (net.pl3x.purpur.PurpurConfig.commandGamemodeRequiresPermission && !commandcontext.getSource().testPermission(2, "minecraft.command.gamemode." + enumgamemode.b())) return 0; // Purpur ++ // Purpur start ++ if (net.pl3x.purpur.PurpurConfig.commandGamemodeRequiresPermission) { ++ String gamemode = enumgamemode.getName(); ++ CommandListenerWrapper sender = commandcontext.getSource(); ++ if (!sender.testPermission(2, "minecraft.command.gamemode." + gamemode)) { ++ return 0; ++ } ++ if (sender.getEntity() instanceof EntityPlayer) { ++ EntityPlayer player = (EntityPlayer) sender.getEntity(); ++ if ((collection.size() > 1 || !collection.contains(player)) && !sender.testPermission(2, "minecraft.command.gamemode." + gamemode + ".other")) { ++ return 0; ++ } ++ } ++ } ++ // Purpur end int i = 0; Iterator iterator = collection.iterator(); +diff --git a/src/main/java/net/minecraft/world/level/EnumGamemode.java b/src/main/java/net/minecraft/world/level/EnumGamemode.java +index eea551a68ba44927cb23560b898dd2c17f041442..1b049bdc897aaf1f0cb9b6dfeaf3a1e44214aef1 100644 +--- a/src/main/java/net/minecraft/world/level/EnumGamemode.java ++++ b/src/main/java/net/minecraft/world/level/EnumGamemode.java +@@ -20,6 +20,7 @@ public enum EnumGamemode { + return this.f; + } + ++ public String getName() { return b(); } // Purpur - OBFHELPER + public String b() { + return this.g; + } diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java index e0228fb58149ac8a9430d54157d5e92c93618f22..56424e45c04e7165c0671f74cdcd0147d1069af7 100644 --- a/src/main/java/net/pl3x/purpur/PurpurConfig.java @@ -59,18 +85,21 @@ index e0228fb58149ac8a9430d54157d5e92c93618f22..56424e45c04e7165c0671f74cdcd0147 public static boolean enderChestSixRows = false; public static boolean enderChestPermissionRows = false; diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java -index f0a57d225b81a505ff12425155ba838d8fad990c..81ead4723872528c53efa9e0f23799571447ac86 100644 +index f0a57d225b81a505ff12425155ba838d8fad990c..9341bba9e48d4def2609d759a0dea7e099d5d777 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java +++ b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java -@@ -23,7 +23,12 @@ public final class CommandPermissions { +@@ -23,7 +23,15 @@ public final class CommandPermissions { DefaultPermissions.registerPermission(PREFIX + "kick", "Allows the user to kick players", PermissionDefault.OP, commands); DefaultPermissions.registerPermission(PREFIX + "stop", "Allows the user to stop the server", PermissionDefault.OP, commands); DefaultPermissions.registerPermission(PREFIX + "list", "Allows the user to list all online players", PermissionDefault.OP, commands); - DefaultPermissions.registerPermission(PREFIX + "gamemode", "Allows the user to change the gamemode of another player", PermissionDefault.OP, commands); + // Purpur start -+ Permission gamemode = DefaultPermissions.registerPermission(PREFIX + "gamemode", "Allows the user to change the gamemode of another player", PermissionDefault.OP, commands); ++ Permission gamemodeVanilla = DefaultPermissions.registerPermission(PREFIX + "gamemode", "Allows the user to change the gamemode", PermissionDefault.OP, commands); + for (net.minecraft.world.level.EnumGamemode enumgamemode : net.minecraft.world.level.EnumGamemode.values()) { -+ gamemode.addParent(DefaultPermissions.registerPermission(PREFIX + "gamemode." + enumgamemode.b(), "Allows the user to set " + enumgamemode.b() + " gamemode", PermissionDefault.OP), true); ++ Permission gamemodeSelf = DefaultPermissions.registerPermission(PREFIX + "gamemode." + enumgamemode.getName(), "Allows the user to set " + enumgamemode.getName() + " gamemode for self", PermissionDefault.OP); ++ Permission gamemodeOther = DefaultPermissions.registerPermission(PREFIX + "gamemode." + enumgamemode.getName() + ".other", "Allows the user to set " + enumgamemode.getName() + " gamemode for other players", PermissionDefault.OP); ++ gamemodeSelf.addParent(gamemodeOther, true); ++ gamemodeVanilla.addParent(gamemodeSelf, true); + } + // Purpur end DefaultPermissions.registerPermission(PREFIX + "xp", "Allows the user to give themselves or others arbitrary values of experience", PermissionDefault.OP, commands); diff --git a/patches/Purpur/patches/server/0201-Config-for-changing-the-blocks-that-turn-into-paths.patch b/patches/Purpur/patches/server/0201-Config-for-changing-the-blocks-that-turn-into-paths.patch index 2ac77e0c..a4558dd3 100644 --- a/patches/Purpur/patches/server/0201-Config-for-changing-the-blocks-that-turn-into-paths.patch +++ b/patches/Purpur/patches/server/0201-Config-for-changing-the-blocks-that-turn-into-paths.patch @@ -18,10 +18,10 @@ index 9ba8ae49e18fb8714b434715bd669b8e22004cd7..c0c87d0dc8d6f02597219cd6a74e6ed7 if (iblockdata1 != null && world.getType(blockposition.up()).isAir()) { diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 3d3e4e686cd74145b002b2df276e61762697918b..63a1b0f569c8f034e7577c304ec23a7a96c666f7 100644 +index 3d3e4e686cd74145b002b2df276e61762697918b..e082de2fdbd4803f5c79699b813062291f8e2bb7 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -469,6 +469,18 @@ public class PurpurWorldConfig { +@@ -469,6 +469,16 @@ public class PurpurWorldConfig { totemOfUndyingWorksInInventory = getBoolean("gameplay-mechanics.player.totem-of-undying-works-in-inventory", totemOfUndyingWorksInInventory); } @@ -29,8 +29,6 @@ index 3d3e4e686cd74145b002b2df276e61762697918b..63a1b0f569c8f034e7577c304ec23a7a + private void shovelSettings() { + getList("gameplay-mechanics.shovel-turns-block-to-grass-path", new ArrayList(){{ + add("minecraft:grass_block"); -+ add("minecraft:dirt"); -+ add("minecraft:coarse_dirt"); + }}).forEach(key -> { + Block block = IRegistry.BLOCK.get(new MinecraftKey(key.toString())); + if (block != Blocks.AIR) shovelTurnsBlockToGrassPath.add(block); diff --git a/patches/Purpur/patches/server/0202-Allows-you-to-change-the-thrust-limit-of-a-piston-by.patch b/patches/Purpur/patches/server/0202-Allows-you-to-change-the-thrust-limit-of-a-piston-by.patch index bd4c9680..8c5c9d2d 100644 --- a/patches/Purpur/patches/server/0202-Allows-you-to-change-the-thrust-limit-of-a-piston-by.patch +++ b/patches/Purpur/patches/server/0202-Allows-you-to-change-the-thrust-limit-of-a-piston-by.patch @@ -45,10 +45,10 @@ index 6c9c4ab65b7e42efa68027057242e25b70313081..cbe34059659e0f80ff384508b01e516c } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 63a1b0f569c8f034e7577c304ec23a7a96c666f7..a08bf2a374a486cf44128a87667567df65329e0c 100644 +index e082de2fdbd4803f5c79699b813062291f8e2bb7..07c66f9d41e7a74021dde6702d654710e400e93b 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -@@ -2157,4 +2157,9 @@ public class PurpurWorldConfig { +@@ -2155,4 +2155,9 @@ public class PurpurWorldConfig { magmaBlockDamageWhenSneaking = getBoolean("blocks.magma-block.damage-when-sneaking", magmaBlockDamageWhenSneaking); magmaBlockDamageWithFrostWalker = getBoolean("blocks.magma-block.damage-with-frost-walker", magmaBlockDamageWithFrostWalker); } diff --git a/patches/Purpur/patches/server/0203-Allows-to-display-progress-messages-by-player-instea.patch b/patches/Purpur/patches/server/0203-Allows-to-display-progress-messages-by-player-instea.patch index b8d9435f..5037fba4 100644 --- a/patches/Purpur/patches/server/0203-Allows-to-display-progress-messages-by-player-instea.patch +++ b/patches/Purpur/patches/server/0203-Allows-to-display-progress-messages-by-player-instea.patch @@ -5,35 +5,11 @@ Subject: [PATCH] Allows to display progress messages by player instead to everyone on the server. -diff --git a/src/main/java/net/minecraft/advancements/Advancement.java b/src/main/java/net/minecraft/advancements/Advancement.java -index 8bfd20ff9a3c96fa9ff5cc618ca7e858e62943a0..97479cacc2a3f7850df8647f78d7dbb5710ae27b 100644 ---- a/src/main/java/net/minecraft/advancements/Advancement.java -+++ b/src/main/java/net/minecraft/advancements/Advancement.java -@@ -125,6 +125,7 @@ public class Advancement { - return this.requirements; - } - -+ public IChatBaseComponent getChatComponent() { return j(); } // Purpur - OBFHELPER - public IChatBaseComponent j() { - return this.chatComponent; - } -diff --git a/src/main/java/net/minecraft/advancements/AdvancementFrameType.java b/src/main/java/net/minecraft/advancements/AdvancementFrameType.java -index f096ecf8d77b085e6c2ef4c3b64f0b65409bb287..bfa86826b93a2eee7f22203ca09250e15f12d217 100644 ---- a/src/main/java/net/minecraft/advancements/AdvancementFrameType.java -+++ b/src/main/java/net/minecraft/advancements/AdvancementFrameType.java -@@ -31,6 +31,7 @@ public enum AdvancementFrameType { - this.g = new ChatMessage("advancements.toast." + s); - } - -+ public String getName() { return a(); } // Purpur - OBFHELPER - public String a() { - return this.d; - } diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -index 59d781b5e61c5d2c004bc92300d8d42e81821308..b81a0e1c3ff3d749b6bbd9efdbc7823d1c631b8e 100644 +index a1ee1066108985a95abddb03ff447b5a14f4f85f..4720644ae82f76f835f14c0b3a00e7b7874fb1e2 100644 --- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java +++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -@@ -59,7 +59,7 @@ public class AdvancementDataPlayer { +@@ -60,7 +60,7 @@ public class AdvancementDataPlayer { private static final TypeToken> c = new TypeToken>() { }; private final DataFixer d; @@ -42,22 +18,21 @@ index 59d781b5e61c5d2c004bc92300d8d42e81821308..b81a0e1c3ff3d749b6bbd9efdbc7823d private final File f; public final Map data = Maps.newLinkedHashMap(); private final Set h = Sets.newLinkedHashSet(); -@@ -317,7 +317,14 @@ public class AdvancementDataPlayer { - this.player.world.getServer().getPluginManager().callEvent(new org.bukkit.event.player.PlayerAdvancementDoneEvent(this.player.getBukkitEntity(), advancement.bukkit)); // CraftBukkit +@@ -325,7 +325,13 @@ public class AdvancementDataPlayer { advancement.d().a(this.player); - if (advancement.c() != null && advancement.c().i() && this.player.world.getGameRules().getBoolean(GameRules.ANNOUNCE_ADVANCEMENTS)) { -- this.e.sendMessage(new ChatMessage("chat.type.advancement." + advancement.c().e().a(), new Object[]{this.player.getScoreboardDisplayName(), advancement.j()}), ChatMessageType.SYSTEM, SystemUtils.b); + // Paper start - Add Adventure message to PlayerAdvancementDoneEvent + if (message != null && this.player.world.getGameRules().getBoolean(GameRules.ANNOUNCE_ADVANCEMENTS)) { +- this.e.sendMessage(PaperAdventure.asVanilla(message), ChatMessageType.SYSTEM, SystemUtils.getNullUUID()); + // Purpur Start - AdvancementMessage By Player -+ ChatMessage advancementMessage = new ChatMessage("chat.type.advancement." + advancement.getDisplay().getFrameType().getName(), this.player.getScoreboardDisplayName(), advancement.getChatComponent()); + if (net.pl3x.purpur.PurpurConfig.advancementOnlyBroadcastToAffectedPlayer) { -+ this.player.sendMessage(advancementMessage, SystemUtils.getNullUUID()); ++ this.player.sendMessage(PaperAdventure.asVanilla(message), SystemUtils.getNullUUID()); + } else { -+ getPlayerList().sendMessage(advancementMessage, ChatMessageType.SYSTEM, SystemUtils.getNullUUID()); ++ getPlayerList().sendMessage(PaperAdventure.asVanilla(message), ChatMessageType.SYSTEM, SystemUtils.getNullUUID()); + } + // Purpur End + // Paper end } } - } diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java index 56424e45c04e7165c0671f74cdcd0147d1069af7..7e8654e4df61527f33d4fce2afdb14e29b90a4c2 100644 --- a/src/main/java/net/pl3x/purpur/PurpurConfig.java diff --git a/patches/Purpur/patches/server/0204-Fix-SPIGOT-6278.patch b/patches/Purpur/patches/server/0204-Fix-SPIGOT-6278.patch index f3497e42..65fa0890 100644 --- a/patches/Purpur/patches/server/0204-Fix-SPIGOT-6278.patch +++ b/patches/Purpur/patches/server/0204-Fix-SPIGOT-6278.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix SPIGOT-6278 diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java -index 99fc16aae085da564c5236e68925a8a2225f5c27..c6f51a483c919d032edb5b8b16a95c0750cef71b 100644 +index 17dde4532714378f7480f55991d94fc82e9a2b05..31de422d9ad5809653c0ce129ebc565d12352e65 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/EntityPiglin.java @@ -172,7 +172,7 @@ public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow { diff --git a/patches/Purpur/patches/server/0205-Implement-Mob-Blindness.patch b/patches/Purpur/patches/server/0205-Implement-Mob-Blindness.patch new file mode 100644 index 00000000..397e4e9a --- /dev/null +++ b/patches/Purpur/patches/server/0205-Implement-Mob-Blindness.patch @@ -0,0 +1,46 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Encode42 +Date: Tue, 11 May 2021 21:00:53 -0400 +Subject: [PATCH] Implement Mob Blindness + +Ported from https://github.com/raltsmc/mobblindness + +diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java +index cb18f3c88a0b8ef374cbcf4226848e1541bc8675..9e0c00bf0c1fb41d09de39d2a3831b6bc6658259 100644 +--- a/src/main/java/net/minecraft/world/entity/EntityLiving.java ++++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java +@@ -925,6 +925,18 @@ public abstract class EntityLiving extends Entity { + // Airplane end + d0 *= 0.5D; + } ++ ++ // Purpur start ++ if (entity instanceof EntityLiving) { ++ EntityLiving livingEntity = (EntityLiving) entity; ++ if (livingEntity.hasEffect(MobEffects.BLINDNESS)) { ++ int amplifier = livingEntity.getEffect(MobEffects.BLINDNESS).getAmplifier(); ++ for (int i = 0; i < amplifier; i++) { ++ d0 *= world.purpurConfig.mobsBlindnessMultiplier; ++ } ++ } ++ } ++ // Purpur end + } + + return d0; +diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +index 07c66f9d41e7a74021dde6702d654710e400e93b..b8622f687b4fd70aaee5fa44cc50b8ee38582582 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +@@ -542,6 +542,11 @@ public class PurpurWorldConfig { + mobsSpawnOnBlueIce = getBoolean("blocks.blue_ice.allow-mob-spawns", mobsSpawnOnBlueIce); + } + ++ public double mobsBlindnessMultiplier = 1; ++ private void blindnessSettings() { ++ mobsBlindnessMultiplier = getDouble("gameplay-mechanics.entity-blindness-multiplier", mobsBlindnessMultiplier); ++ } ++ + public boolean chestOpenWithBlockOnTop = false; + private void chestSettings() { + chestOpenWithBlockOnTop = getBoolean("blocks.chest.open-with-solid-block-on-top", chestOpenWithBlockOnTop); diff --git a/patches/Purpur/patches/server/0206-Hide-hidden-players-from-entity-selector.patch b/patches/Purpur/patches/server/0206-Hide-hidden-players-from-entity-selector.patch new file mode 100644 index 00000000..e555fb33 --- /dev/null +++ b/patches/Purpur/patches/server/0206-Hide-hidden-players-from-entity-selector.patch @@ -0,0 +1,76 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Thu, 13 May 2021 16:18:29 -0500 +Subject: [PATCH] Hide hidden players from entity selector + + +diff --git a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelector.java b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelector.java +index ee3123ac8a568d915ca4e1b42fc1196c269b287e..82125185233bdc59ef93d376e7327180c98c794d 100644 +--- a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelector.java ++++ b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelector.java +@@ -169,10 +169,10 @@ public class EntitySelector { + + if (this.j != null) { + entityplayer = commandlistenerwrapper.getServer().getPlayerList().getPlayer(this.j); +- return (List) (entityplayer == null ? Collections.emptyList() : Lists.newArrayList(new EntityPlayer[]{entityplayer})); ++ return entityplayer == null || !canSee(commandlistenerwrapper, entityplayer) ? Collections.emptyList() : Lists.newArrayList(entityplayer); // Purpur + } else if (this.k != null) { + entityplayer = commandlistenerwrapper.getServer().getPlayerList().getPlayer(this.k); +- return (List) (entityplayer == null ? Collections.emptyList() : Lists.newArrayList(new EntityPlayer[]{entityplayer})); ++ return entityplayer == null || !canSee(commandlistenerwrapper, entityplayer) ? Collections.emptyList() : Lists.newArrayList(entityplayer); // Purpur + } else { + Vec3D vec3d = (Vec3D) this.f.apply(commandlistenerwrapper.getPosition()); + Predicate predicate = this.a(vec3d); +@@ -182,7 +182,7 @@ public class EntitySelector { + EntityPlayer entityplayer1 = (EntityPlayer) commandlistenerwrapper.getEntity(); + + if (predicate.test(entityplayer1)) { +- return Lists.newArrayList(new EntityPlayer[]{entityplayer1}); ++ return !canSee(commandlistenerwrapper, entityplayer1) ? Collections.emptyList() : Lists.newArrayList(entityplayer1); // Purpur + } + } + +@@ -195,6 +195,7 @@ public class EntitySelector { + + predicate.getClass(); + object = worldserver.a(predicate::test); ++ ((List) object).removeIf(entityplayer3 -> !canSee(commandlistenerwrapper, (EntityPlayer) entityplayer3)); // Purpur + } else { + object = Lists.newArrayList(); + Iterator iterator = commandlistenerwrapper.getServer().getPlayerList().getPlayers().iterator(); +@@ -202,7 +203,7 @@ public class EntitySelector { + while (iterator.hasNext()) { + EntityPlayer entityplayer2 = (EntityPlayer) iterator.next(); + +- if (predicate.test(entityplayer2)) { ++ if (predicate.test(entityplayer2) && canSee(commandlistenerwrapper, entityplayer2)) { // Purpur + ((List) object).add(entityplayer2); + } + } +@@ -244,4 +245,11 @@ public class EntitySelector { + public static IChatMutableComponent a(List list) { + return ChatComponentUtils.b(list, Entity::getScoreboardDisplayName); + } ++ ++ // Purpur start ++ private boolean canSee(CommandListenerWrapper commandlistenerwrapper, EntityPlayer target) { ++ Entity entity = commandlistenerwrapper.getEntity(); ++ return !net.pl3x.purpur.PurpurConfig.hideHiddenPlayersFromEntitySelector || !(entity instanceof EntityPlayer) || ((EntityPlayer) entity).getBukkitEntity().canSee(target.getBukkitEntity()); ++ } ++ // Purpur end + } +diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java +index 7e8654e4df61527f33d4fce2afdb14e29b90a4c2..61f385021e8e870a4cb1b9c2744105988c8b709a 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java +@@ -212,8 +212,10 @@ public class PurpurConfig { + } + + public static boolean commandGamemodeRequiresPermission = false; ++ public static boolean hideHiddenPlayersFromEntitySelector = false; + private static void commandSettings() { + commandGamemodeRequiresPermission = getBoolean("settings.command.gamemode.requires-specific-permission", commandGamemodeRequiresPermission); ++ hideHiddenPlayersFromEntitySelector = getBoolean("settings.command.hide-hidden-players-from-entity-selector", hideHiddenPlayersFromEntitySelector); + } + + public static boolean barrelSixRows = false; diff --git a/patches/Purpur/patches/server/0207-Config-for-health-to-impact-Creeper-explosion-radius.patch b/patches/Purpur/patches/server/0207-Config-for-health-to-impact-Creeper-explosion-radius.patch new file mode 100644 index 00000000..3ef06697 --- /dev/null +++ b/patches/Purpur/patches/server/0207-Config-for-health-to-impact-Creeper-explosion-radius.patch @@ -0,0 +1,42 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Encode42 +Date: Thu, 29 Apr 2021 20:28:18 -0400 +Subject: [PATCH] Config for health to impact Creeper explosion radius + + +diff --git a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java +index 27d5e9fc5ec1396e95180fc14e8a61b030cfd1e6..d2ae28bb1a2db6dde2aa7c95589656b6eaf3072d 100644 +--- a/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java ++++ b/src/main/java/net/minecraft/world/entity/monster/EntityCreeper.java +@@ -341,9 +341,10 @@ public class EntityCreeper extends EntityMonster { + if (!this.world.isClientSide) { + Explosion.Effect explosion_effect = this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING) && world.purpurConfig.creeperAllowGriefing ? Explosion.Effect.DESTROY : Explosion.Effect.NONE; // Purpur + float f = this.isPowered() ? 2.0F : 1.0F; ++ float multiplier = this.world.purpurConfig.creeperHealthRadius ? this.getHealth() / this.getMaxHealth() : 1; // Purpur + + // CraftBukkit start +- ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), this.explosionRadius * f, false); ++ ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), multiplier * (this.explosionRadius * f), false); // Purpur + this.world.getServer().getPluginManager().callEvent(event); + if (!event.isCancelled()) { + this.killed = true; +diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +index b8622f687b4fd70aaee5fa44cc50b8ee38582582..5659e75177f3c5acb935b0f6dc0b720853602108 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +@@ -830,6 +830,7 @@ public class PurpurWorldConfig { + public boolean creeperRidable = false; + public boolean creeperRidableInWater = false; + public boolean creeperExplodeWhenKilled = false; ++ public boolean creeperHealthRadius = false; + public boolean creeperAllowGriefing = true; + public double creeperChargedChance = 0.0D; + public double creeperMaxHealth = 20.0D; +@@ -837,6 +838,7 @@ public class PurpurWorldConfig { + creeperRidable = getBoolean("mobs.creeper.ridable", creeperRidable); + creeperRidableInWater = getBoolean("mobs.creeper.ridable-in-water", creeperRidableInWater); + creeperExplodeWhenKilled = getBoolean("mobs.creeper.explode-when-killed", creeperExplodeWhenKilled); ++ creeperHealthRadius = getBoolean("mobs.creeper.health-impacts-explosion", creeperHealthRadius); + creeperAllowGriefing = getBoolean("mobs.creeper.allow-griefing", creeperAllowGriefing); + creeperChargedChance = getDouble("mobs.creeper.naturally-charged-chance", creeperChargedChance); + if (PurpurConfig.version < 10) { diff --git a/patches/Purpur/patches/server/0208-Optimize-collisions.patch b/patches/Purpur/patches/server/0208-Optimize-collisions.patch new file mode 100644 index 00000000..84f78fff --- /dev/null +++ b/patches/Purpur/patches/server/0208-Optimize-collisions.patch @@ -0,0 +1,78 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: DoctaEnkoda +Date: Tue, 11 May 2021 00:28:13 +0200 +Subject: [PATCH] Optimize collisions + + +diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java +index 93e853c241ffc8cf69f75a75c9bfbe6489933607..7955f847dccf100488f348a1afad4e3ad6be9733 100644 +--- a/src/main/java/net/minecraft/server/level/WorldServer.java ++++ b/src/main/java/net/minecraft/server/level/WorldServer.java +@@ -678,16 +678,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { + } + } + +- int minBlockX = MathHelper.floor(axisalignedbb.minX - MCUtil.COLLISION_EPSILON) - 1; +- int maxBlockX = MathHelper.floor(axisalignedbb.maxX + MCUtil.COLLISION_EPSILON) + 1; +- ++ // Purpur Start Rebase - Calculate when needed only + int minBlockY = MathHelper.floor(axisalignedbb.minY - MCUtil.COLLISION_EPSILON) - 1; + int maxBlockY = MathHelper.floor(axisalignedbb.maxY + MCUtil.COLLISION_EPSILON) + 1; + +- int minBlockZ = MathHelper.floor(axisalignedbb.minZ - MCUtil.COLLISION_EPSILON) - 1; +- int maxBlockZ = MathHelper.floor(axisalignedbb.maxZ + MCUtil.COLLISION_EPSILON) + 1; +- +- + BlockPosition.MutableBlockPosition mutablePos = new BlockPosition.MutableBlockPosition(); + net.minecraft.world.phys.shapes.VoxelShapeCollision collisionShape = null; + +@@ -697,6 +691,13 @@ public class WorldServer extends World implements GeneratorAccessSeed { + return ret; + } + ++ int minBlockX = MathHelper.floor(axisalignedbb.minX - MCUtil.COLLISION_EPSILON) - 1; ++ int maxBlockX = MathHelper.floor(axisalignedbb.maxX + MCUtil.COLLISION_EPSILON) + 1; ++ ++ int minBlockZ = MathHelper.floor(axisalignedbb.minZ - MCUtil.COLLISION_EPSILON) - 1; ++ int maxBlockZ = MathHelper.floor(axisalignedbb.maxZ + MCUtil.COLLISION_EPSILON) + 1; ++ // Purpur End ++ + int minYIterate = Math.max(0, minBlockY); + int maxYIterate = Math.min(255, maxBlockY); + +diff --git a/src/main/java/net/minecraft/world/level/ChunkCache.java b/src/main/java/net/minecraft/world/level/ChunkCache.java +index b547eb352f90f68cf36ffb82e43ad7acb1892f6a..f165f39758ef09948b4ce24e2d31f8350f68fcfd 100644 +--- a/src/main/java/net/minecraft/world/level/ChunkCache.java ++++ b/src/main/java/net/minecraft/world/level/ChunkCache.java +@@ -60,16 +60,10 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess { + } + } + +- int minBlockX = net.minecraft.util.MathHelper.floor(axisalignedbb.minX - net.minecraft.server.MCUtil.COLLISION_EPSILON) - 1; +- int maxBlockX = net.minecraft.util.MathHelper.floor(axisalignedbb.maxX + net.minecraft.server.MCUtil.COLLISION_EPSILON) + 1; +- ++ // Purpur Rebase - Calculate when needed only + int minBlockY = net.minecraft.util.MathHelper.floor(axisalignedbb.minY - net.minecraft.server.MCUtil.COLLISION_EPSILON) - 1; + int maxBlockY = net.minecraft.util.MathHelper.floor(axisalignedbb.maxY + net.minecraft.server.MCUtil.COLLISION_EPSILON) + 1; + +- int minBlockZ = net.minecraft.util.MathHelper.floor(axisalignedbb.minZ - net.minecraft.server.MCUtil.COLLISION_EPSILON) - 1; +- int maxBlockZ = net.minecraft.util.MathHelper.floor(axisalignedbb.maxZ + net.minecraft.server.MCUtil.COLLISION_EPSILON) + 1; +- +- + BlockPosition.MutableBlockPosition mutablePos = new BlockPosition.MutableBlockPosition(); + net.minecraft.world.phys.shapes.VoxelShapeCollision collisionShape = null; + +@@ -79,6 +73,13 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess { + return ret; + } + ++ int minBlockX = net.minecraft.util.MathHelper.floor(axisalignedbb.minX - net.minecraft.server.MCUtil.COLLISION_EPSILON) - 1; ++ int maxBlockX = net.minecraft.util.MathHelper.floor(axisalignedbb.maxX + net.minecraft.server.MCUtil.COLLISION_EPSILON) + 1; ++ ++ int minBlockZ = net.minecraft.util.MathHelper.floor(axisalignedbb.minZ - net.minecraft.server.MCUtil.COLLISION_EPSILON) - 1; ++ int maxBlockZ = net.minecraft.util.MathHelper.floor(axisalignedbb.maxZ + net.minecraft.server.MCUtil.COLLISION_EPSILON) + 1; ++ // Purpur End ++ + int minYIterate = Math.max(0, minBlockY); + int maxYIterate = Math.min(255, maxBlockY); + diff --git a/patches/Purpur/patches/server/0209-Iron-golem-poppy-calms-anger.patch b/patches/Purpur/patches/server/0209-Iron-golem-poppy-calms-anger.patch new file mode 100644 index 00000000..3763feae --- /dev/null +++ b/patches/Purpur/patches/server/0209-Iron-golem-poppy-calms-anger.patch @@ -0,0 +1,148 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Thu, 13 May 2021 21:22:51 -0500 +Subject: [PATCH] Iron golem poppy calms anger + + +diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/target/PathfinderGoalReceiveFlower.java b/src/main/java/net/minecraft/world/entity/ai/goal/target/PathfinderGoalReceiveFlower.java +new file mode 100644 +index 0000000000000000000000000000000000000000..6a288fead988d424aa369b8ef6378ab3c9ec16af +--- /dev/null ++++ b/src/main/java/net/minecraft/world/entity/ai/goal/target/PathfinderGoalReceiveFlower.java +@@ -0,0 +1,79 @@ ++package net.minecraft.world.entity.ai.goal.target; ++ ++import net.minecraft.server.level.EntityPlayer; ++import net.minecraft.server.level.WorldServer; ++import net.minecraft.world.entity.Entity; ++import net.minecraft.world.entity.ai.goal.PathfinderGoal; ++import net.minecraft.world.entity.animal.EntityIronGolem; ++import net.minecraft.world.item.ItemStack; ++import net.minecraft.world.level.block.Blocks; ++ ++import java.util.EnumSet; ++import java.util.UUID; ++ ++public class PathfinderGoalReceiveFlower extends PathfinderGoal { ++ private final EntityIronGolem entity; ++ private EntityPlayer target; ++ private int cooldown; ++ ++ public PathfinderGoalReceiveFlower(EntityIronGolem entity) { ++ this.entity = entity; ++ this.setTypes(EnumSet.of(Type.MOVE, Type.LOOK)); ++ } ++ ++ @Override ++ public boolean shouldActivate() { ++ if (this.entity.getHoldingFlowerTick() > 0) { ++ return false; ++ } ++ if (!this.entity.isAngry()) { ++ return false; ++ } ++ UUID uuid = this.entity.getAngerTarget(); ++ if (uuid == null) { ++ return false; ++ } ++ Entity target = ((WorldServer) this.entity.world).getEntity(uuid); ++ if (!(target instanceof EntityPlayer)) { ++ return false; ++ } ++ EntityPlayer player = (EntityPlayer) target; ++ if (!isHoldingFlower(player)) { ++ return false; ++ } ++ this.target = player; ++ return true; ++ } ++ ++ @Override ++ public boolean shouldStayActive() { ++ return this.cooldown > 0; ++ } ++ ++ @Override ++ public void start() { ++ this.cooldown = 100; ++ this.entity.pacify(); ++ this.entity.holdFlower(true); ++ } ++ ++ @Override ++ public void onTaskReset() { ++ this.entity.holdFlower(false); ++ this.target = null; ++ } ++ ++ @Override ++ public void tick() { ++ this.entity.getControllerLook().lookAt(this.target, 30.0F, 30.0F); ++ --this.cooldown; ++ } ++ ++ private boolean isHoldingFlower(EntityPlayer player) { ++ return isPoppy(player.getItemInMainHand()) || isPoppy(player.getItemInOffHand()); ++ } ++ ++ private boolean isPoppy(ItemStack item) { ++ return item.getItem() == Blocks.POPPY.getItem(); ++ } ++} +diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java b/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java +index 9ee82c908008190e31034e614c241fc7a66248e1..402a8733905ebbbb9c1d962bafa7fd806a9253cc 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java ++++ b/src/main/java/net/minecraft/world/entity/animal/EntityIronGolem.java +@@ -42,6 +42,7 @@ import net.minecraft.world.entity.ai.goal.PathfinderGoalStrollVillageGolem; + import net.minecraft.world.entity.ai.goal.target.PathfinderGoalDefendVillage; + import net.minecraft.world.entity.ai.goal.target.PathfinderGoalHurtByTarget; + import net.minecraft.world.entity.ai.goal.target.PathfinderGoalNearestAttackableTarget; ++import net.minecraft.world.entity.ai.goal.target.PathfinderGoalReceiveFlower; + import net.minecraft.world.entity.ai.goal.target.PathfinderGoalUniversalAngerReset; + import net.minecraft.world.entity.monster.EntityCreeper; + import net.minecraft.world.entity.monster.IMonster; +@@ -60,7 +61,7 @@ public class EntityIronGolem extends EntityGolem implements IEntityAngerable { + + protected static final DataWatcherObject b = DataWatcher.a(EntityIronGolem.class, DataWatcherRegistry.a); + private int c; +- private int d; ++ private int d; public int getHoldingFlowerTick() { return d; } // Purpur - OBFHELPER + private static final IntRange bo = TimeRange.a(20, 39); + private int bp; + private UUID bq; +@@ -91,6 +92,7 @@ public class EntityIronGolem extends EntityGolem implements IEntityAngerable { + protected void initPathfinder() { + if (world.purpurConfig.ironGolemCanSwim) this.goalSelector.a(0, new PathfinderGoalFloat(this)); // Purpur + this.goalSelector.a(0, new PathfinderGoalHasRider(this)); // Purpur ++ if (world.purpurConfig.ironGolemPoppyCalm) this.goalSelector.addGoal(0, new PathfinderGoalReceiveFlower(this)); // Purpur + this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, true)); + this.goalSelector.a(2, new PathfinderGoalMoveTowardsTarget(this, 0.9D, 32.0F)); + this.goalSelector.a(2, new PathfinderGoalStrollVillage(this, 0.6D, false)); +@@ -241,6 +243,7 @@ public class EntityIronGolem extends EntityGolem implements IEntityAngerable { + return EntityIronGolem.CrackLevel.a(this.getHealth() / this.getMaxHealth()); + } + ++ public void holdFlower(boolean flag) { t(flag); } // Purpur - OBFHELPER + public void t(boolean flag) { + if (flag) { + this.d = 400; +diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +index 5659e75177f3c5acb935b0f6dc0b720853602108..ffb8d505a723d61bd6311f4116524d9a99a27f62 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +@@ -1183,6 +1183,7 @@ public class PurpurWorldConfig { + public boolean ironGolemRidableInWater = false; + public boolean ironGolemCanSwim = false; + public double ironGolemMaxHealth = 100.0D; ++ public boolean ironGolemPoppyCalm = false; + private void ironGolemSettings() { + ironGolemRidable = getBoolean("mobs.iron_golem.ridable", ironGolemRidable); + ironGolemRidableInWater = getBoolean("mobs.iron_golem.ridable-in-water", ironGolemRidableInWater); +@@ -1193,6 +1194,7 @@ public class PurpurWorldConfig { + set("mobs.iron_golem.attributes.max_health", oldValue); + } + ironGolemMaxHealth = getDouble("mobs.iron_golem.attributes.max_health", ironGolemMaxHealth); ++ ironGolemPoppyCalm = getBoolean("mobs.iron_golem.poppy-calms-anger", ironGolemPoppyCalm); + } + + public boolean llamaRidable = false; diff --git a/patches/Purpur/patches/server/0210-Breedable-parrots.patch b/patches/Purpur/patches/server/0210-Breedable-parrots.patch new file mode 100644 index 00000000..a14b9507 --- /dev/null +++ b/patches/Purpur/patches/server/0210-Breedable-parrots.patch @@ -0,0 +1,88 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Thu, 13 May 2021 22:17:50 -0500 +Subject: [PATCH] Breedable parrots + + +diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java +index 2f51e80a02817f1e36c8fe9542809ab881263a16..abfb08ff562ef4c8971b12f6f64ede08dca15cd0 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java ++++ b/src/main/java/net/minecraft/world/entity/animal/EntityParrot.java +@@ -44,6 +44,7 @@ import net.minecraft.world.entity.GroupDataEntity; + import net.minecraft.world.entity.ai.attributes.AttributeProvider; + import net.minecraft.world.entity.ai.attributes.GenericAttributes; + import net.minecraft.world.entity.ai.control.ControllerMoveFlying; ++import net.minecraft.world.entity.ai.goal.PathfinderGoalBreed; + import net.minecraft.world.entity.ai.goal.PathfinderGoalFloat; + import net.minecraft.world.entity.ai.goal.PathfinderGoalFollowEntity; + import net.minecraft.world.entity.ai.goal.PathfinderGoalFollowOwner; +@@ -75,7 +76,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird { + } + }; + private static final Item bw = Items.COOKIE; +- private static final Set bx = Sets.newHashSet(new Item[]{Items.WHEAT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.BEETROOT_SEEDS}); ++ private static final Set bx = Sets.newHashSet(new Item[]{Items.WHEAT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.BEETROOT_SEEDS}); public static Set temptItems() { return bx; } // Purpur - OBFHELPER + private static final Map, SoundEffect> by = (Map) SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // CraftBukkit - decompile error + hashmap.put(EntityTypes.BLAZE, SoundEffects.ENTITY_PARROT_IMITATE_BLAZE); + hashmap.put(EntityTypes.CAVE_SPIDER, SoundEffects.ENTITY_PARROT_IMITATE_SPIDER); +@@ -205,6 +206,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird { + this.goalSelector.a(0, new PathfinderGoalFloat(this)); + this.goalSelector.a(0, new PathfinderGoalHasRider(this)); // Purpur + this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.25D)); // Purpur ++ if (world.purpurConfig.parrotBreedable) this.goalSelector.addGoal(1, new PathfinderGoalBreed(this, 1.0D)); // Purpur + this.goalSelector.a(1, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F)); + this.goalSelector.a(2, new PathfinderGoalSit(this)); + this.goalSelector.a(2, new PathfinderGoalFollowOwner(this, 1.0D, 5.0F, 1.0F, true)); +@@ -309,6 +311,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird { + } + } + ++ if (world.purpurConfig.parrotBreedable) return super.b(entityhuman, enumhand); // Purpur + return EnumInteractionResult.a(this.world.isClientSide); + } else if (itemstack.getItem() == EntityParrot.bw) { + if (!entityhuman.abilities.canInstantlyBuild) { +@@ -334,7 +337,7 @@ public class EntityParrot extends EntityPerchable implements EntityBird { + + @Override + public boolean k(ItemStack itemstack) { +- return false; ++ return world.purpurConfig.parrotBreedable && temptItems().contains(itemstack.getItem()); // Purpur + } + + public static boolean c(EntityTypes entitytypes, GeneratorAccess generatoraccess, EnumMobSpawn enummobspawn, BlockPosition blockposition, Random random) { +@@ -353,13 +356,13 @@ public class EntityParrot extends EntityPerchable implements EntityBird { + + @Override + public boolean mate(EntityAnimal entityanimal) { +- return false; ++ return super.mate(entityanimal); // Purpur + } + + @Nullable + @Override + public EntityAgeable createChild(WorldServer worldserver, EntityAgeable entityageable) { +- return null; ++ return worldserver.purpurConfig.parrotBreedable ? EntityTypes.PARROT.create(worldserver) : null; // Purpur + } + + @Override +diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +index ffb8d505a723d61bd6311f4116524d9a99a27f62..db8b31972b38f907a53b4f63465c83d1f47f4dc3 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +@@ -1345,6 +1345,7 @@ public class PurpurWorldConfig { + public boolean parrotRidableInWater = false; + public double parrotMaxY = 256D; + public double parrotMaxHealth = 6.0D; ++ public boolean parrotBreedable = false; + private void parrotSettings() { + parrotRidable = getBoolean("mobs.parrot.ridable", parrotRidable); + parrotRidableInWater = getBoolean("mobs.parrot.ridable-in-water", parrotRidableInWater); +@@ -1355,6 +1356,7 @@ public class PurpurWorldConfig { + set("mobs.parrot.attributes.max_health", oldValue); + } + parrotMaxHealth = getDouble("mobs.parrot.attributes.max_health", parrotMaxHealth); ++ parrotBreedable = getBoolean("mobs.parrot.can-breed", parrotBreedable); + } + + public boolean phantomRidable = false; diff --git a/patches/Purpur/patches/server/0211-Configurable-powered-rail-boost-modifier.patch b/patches/Purpur/patches/server/0211-Configurable-powered-rail-boost-modifier.patch new file mode 100644 index 00000000..8ca1fab0 --- /dev/null +++ b/patches/Purpur/patches/server/0211-Configurable-powered-rail-boost-modifier.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Callum Seabrook +Date: Fri, 14 May 2021 21:22:57 +0100 +Subject: [PATCH] Configurable powered rail boost modifier + + +diff --git a/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java b/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java +index 7b49544210d087f5006a83c2a0d5c47c785c567f..9e91fc85e8f7ebadde239941700282fd820588e4 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java +@@ -705,7 +705,7 @@ public abstract class EntityMinecartAbstract extends Entity { + if (d18 > 0.01D) { + double d20 = 0.06D; + +- this.setMot(vec3d4.add(vec3d4.x / d18 * 0.06D, 0.0D, vec3d4.z / d18 * 0.06D)); ++ this.setMot(vec3d4.add(vec3d4.x / d18 * world.purpurConfig.poweredRailBoostModifier, 0.0D, vec3d4.z / d18 * world.purpurConfig.poweredRailBoostModifier)); // Purpur + } else { + Vec3D vec3d5 = this.getMot(); + double d21 = vec3d5.x; +diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +index db8b31972b38f907a53b4f63465c83d1f47f4dc3..99c196f1262660b901f84c0ac66d10c9d1e6bcf7 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +@@ -133,6 +133,7 @@ public class PurpurWorldConfig { + public boolean minecartControllableFallDamage = true; + public double minecartControllableBaseSpeed = 0.1D; + public Map minecartControllableBlockSpeeds = new HashMap<>(); ++ public double poweredRailBoostModifier = 0.06; + private void minecartSettings() { + if (PurpurConfig.version < 12) { + boolean oldBool = getBoolean("gameplay-mechanics.controllable-minecarts.place-anywhere", minecartPlaceAnywhere); +@@ -185,6 +186,7 @@ public class PurpurWorldConfig { + set("gameplay-mechanics.minecart.controllable.block-speed.grass_block", 0.3D); + set("gameplay-mechanics.minecart.controllable.block-speed.stone", 0.5D); + } ++ poweredRailBoostModifier = getDouble("gameplay-mechanics.minecart.powered-rail.boost-modifier", poweredRailBoostModifier); + } + + public int daytimeTicks = 12000; diff --git a/patches/Purpur/patches/server/0212-Add-config-change-multiplier-critical-damage-value.patch b/patches/Purpur/patches/server/0212-Add-config-change-multiplier-critical-damage-value.patch new file mode 100644 index 00000000..751cc7e1 --- /dev/null +++ b/patches/Purpur/patches/server/0212-Add-config-change-multiplier-critical-damage-value.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: DoctaEnkoda +Date: Mon, 17 May 2021 02:40:13 +0200 +Subject: [PATCH] Add config change multiplier critical damage value + + +diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java +index 663dfa707dd948df2f25dab287fa4a0580070b75..abac4b996c7935ac6115a9ad96191f2a57afc95f 100644 +--- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java ++++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java +@@ -1189,7 +1189,7 @@ public abstract class EntityHuman extends EntityLiving { + flag2 = flag2 && !this.isSprinting(); + if (flag2) { + this.isCritical = true; // Purpur +- f *= 1.5F; ++ f *= this.world.purpurConfig.playerCriticalDamageMultiplier; // Purpur + } + + f += f1; +diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +index 99c196f1262660b901f84c0ac66d10c9d1e6bcf7..78af40e0fe7faeca45ab7ef1264a02fc2c61f2b6 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +@@ -356,6 +356,7 @@ public class PurpurWorldConfig { + public boolean creativeOnePunch = false; + public boolean playerSleepNearMonsters = false; + public boolean playersSkipNight = true; ++ public double playerCriticalDamageMultiplier = 1.5D; + private void miscGameplayMechanicsSettings() { + useBetterMending = getBoolean("gameplay-mechanics.use-better-mending", useBetterMending); + alwaysTameInCreative = getBoolean("gameplay-mechanics.always-tame-in-creative", alwaysTameInCreative); +@@ -377,6 +378,7 @@ public class PurpurWorldConfig { + creativeOnePunch = getBoolean("gameplay-mechanics.player.one-punch-in-creative", creativeOnePunch); + playerSleepNearMonsters = getBoolean("gameplay-mechanics.player.sleep-ignore-nearby-mobs", playerSleepNearMonsters); + playersSkipNight = getBoolean("gameplay-mechanics.player.can-skip-night", playersSkipNight); ++ playerCriticalDamageMultiplier = getDouble("gameplay-mechanics.player.critical-damage-multiplier", playerCriticalDamageMultiplier); + } + + public boolean catSpawning; diff --git a/patches/Purpur/patches/server/0213-Option-to-disable-dragon-egg-teleporting.patch b/patches/Purpur/patches/server/0213-Option-to-disable-dragon-egg-teleporting.patch new file mode 100644 index 00000000..a028be71 --- /dev/null +++ b/patches/Purpur/patches/server/0213-Option-to-disable-dragon-egg-teleporting.patch @@ -0,0 +1,34 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: BillyGalbreath +Date: Mon, 17 May 2021 04:46:23 -0500 +Subject: [PATCH] Option to disable dragon egg teleporting + + +diff --git a/src/main/java/net/minecraft/world/level/block/BlockDragonEgg.java b/src/main/java/net/minecraft/world/level/block/BlockDragonEgg.java +index ce2931f6e1304e6d8fe14e86ba7a8e0e8ac54d1d..5f429a4f82d4d3024ba3df10bc9b21d504361602 100644 +--- a/src/main/java/net/minecraft/world/level/block/BlockDragonEgg.java ++++ b/src/main/java/net/minecraft/world/level/block/BlockDragonEgg.java +@@ -42,6 +42,7 @@ public class BlockDragonEgg extends BlockFalling { + } + + private void d(IBlockData iblockdata, World world, BlockPosition blockposition) { ++ if (!world.purpurConfig.dragonEggTeleport) return; // Purpur + for (int i = 0; i < 1000; ++i) { + BlockPosition blockposition1 = blockposition.b(world.random.nextInt(16) - world.random.nextInt(16), world.random.nextInt(8) - world.random.nextInt(8), world.random.nextInt(16) - world.random.nextInt(16)); + +diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +index 78af40e0fe7faeca45ab7ef1264a02fc2c61f2b6..cda80cf8d2556defd1453b473aca76bf7c014794 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +@@ -537,6 +537,11 @@ public class PurpurWorldConfig { + }); + } + ++ public boolean dragonEggTeleport = true; ++ private void dragonEggSettings() { ++ dragonEggTeleport = getBoolean("blocks.dragon_egg.teleport", dragonEggTeleport); ++ } ++ + public boolean snowOnBlueIce = true; + public boolean mobsSpawnOnPackedIce = true; + public boolean mobsSpawnOnBlueIce = true; diff --git a/patches/Purpur/patches/server/0214-Config-for-unverified-username-message.patch b/patches/Purpur/patches/server/0214-Config-for-unverified-username-message.patch new file mode 100644 index 00000000..692faa90 --- /dev/null +++ b/patches/Purpur/patches/server/0214-Config-for-unverified-username-message.patch @@ -0,0 +1,39 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Ben Kerllenevich +Date: Wed, 19 May 2021 15:33:43 -0400 +Subject: [PATCH] Config for unverified username message + + +diff --git a/src/main/java/net/minecraft/server/network/LoginListener.java b/src/main/java/net/minecraft/server/network/LoginListener.java +index 25437a993c02379fa43e5d46159cd9ba2aebf10f..f378d654a7fdd61ca31ca50ba45eff6acd93c3f1 100644 +--- a/src/main/java/net/minecraft/server/network/LoginListener.java ++++ b/src/main/java/net/minecraft/server/network/LoginListener.java +@@ -280,7 +280,7 @@ public class LoginListener implements PacketLoginInListener { + LoginListener.this.i = LoginListener.this.a(gameprofile); + LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT; + } else { +- LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.unverified_username")); ++ LoginListener.this.disconnect(net.pl3x.purpur.PurpurConfig.unverifiedUsername.equals("default") ? new ChatMessage("multiplayer.disconnect.unverified_username") : PaperAdventure.asVanilla(PaperAdventure.LEGACY_SECTION_UXRC.deserialize(net.pl3x.purpur.PurpurConfig.unverifiedUsername))); // Purpur + LoginListener.LOGGER.error("Username '{}' tried to join with an invalid session", gameprofile.getName()); + } + } catch (AuthenticationUnavailableException authenticationunavailableexception) { +diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java +index 61f385021e8e870a4cb1b9c2744105988c8b709a..5a228c14a6e6335399f3436419deb51420082ad2 100644 +--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java ++++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java +@@ -164,6 +164,7 @@ public class PurpurConfig { + public static String creditsCommandOutput = "§a%s has been shown the end credits"; + public static String pingCommandOutput = "§a%s's ping is %sms"; + public static String cannotRideMob = "§cYou cannot mount that mob"; ++ public static String unverifiedUsername = "default"; + private static void messages() { + afkBroadcastAway = getString("settings.messages.afk-broadcast-away", afkBroadcastAway); + afkBroadcastBack = getString("settings.messages.afk-broadcast-back", afkBroadcastBack); +@@ -173,6 +174,7 @@ public class PurpurConfig { + creditsCommandOutput = getString("settings.messages.credits-command-output", creditsCommandOutput); + pingCommandOutput = getString("settings.messages.ping-command-output", pingCommandOutput); + cannotRideMob = getString("settings.messages.cannot-ride-mob", cannotRideMob); ++ unverifiedUsername = getString("settings.messages.unverified-username", unverifiedUsername); + } + + public static int dungeonSeed = -1; diff --git a/patches/Tuinity/patches/api/0001-Tuinity-POM-Changes.patch b/patches/Tuinity/patches/api/0001-Tuinity-POM-Changes.patch index f67edb56..2b7381d6 100644 --- a/patches/Tuinity/patches/api/0001-Tuinity-POM-Changes.patch +++ b/patches/Tuinity/patches/api/0001-Tuinity-POM-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Tuinity POM Changes diff --git a/pom.xml b/pom.xml -index c2e9ca1cc7f14d3a696385edc3cb341f902fa2fd..4d826aa8ea1139e66514767da6ba17811f7ecc5c 100644 +index 73fbd5d5a591871a3a386fb5c455cd96a3992e7a..6fd6066b16d4dbf8695be16ec8b2d135d4d04901 100644 --- a/pom.xml +++ b/pom.xml @@ -3,18 +3,18 @@ diff --git a/patches/Tuinity/patches/api/0002-Tuinity-config.patch b/patches/Tuinity/patches/api/0002-Tuinity-config.patch index 93aa13a4..d1b967df 100644 --- a/patches/Tuinity/patches/api/0002-Tuinity-config.patch +++ b/patches/Tuinity/patches/api/0002-Tuinity-config.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Tuinity config API to retrieve raw YamlConfiguration + timing exports diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index f3e27d2d02a9407bb1b091b8c1125ad5abf99e55..b3e7b2a8eaa3980e34bc74a846320b7871dc6e4b 100644 +index 35ec8a060c2a2d2d48477b1bb940db51d18bf38e..d1a9322cf54f57f0d213145aa50c219f0eb2a90b 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1595,6 +1595,14 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/Tuinity/patches/server/0001-Tuinity-POM-Changes.patch b/patches/Tuinity/patches/server/0001-Tuinity-POM-Changes.patch index f2a2e0a2..e761f511 100644 --- a/patches/Tuinity/patches/server/0001-Tuinity-POM-Changes.patch +++ b/patches/Tuinity/patches/server/0001-Tuinity-POM-Changes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Tuinity POM Changes diff --git a/pom.xml b/pom.xml -index ab57297272c2d6f3d21067081bcaf8775b8fff09..3c60bf75dacd00cac2e35b0e597992ce0ce9448c 100644 +index 1a9204c869dd36e80932b1366352db15ebd70723..ca8471fc36549df2f62065ce619a5c12cb7ecc61 100644 --- a/pom.xml +++ b/pom.xml @@ -1,11 +1,11 @@ @@ -45,7 +45,7 @@ index ab57297272c2d6f3d21067081bcaf8775b8fff09..3c60bf75dacd00cac2e35b0e597992ce ${project.version} compile -@@ -160,15 +160,15 @@ +@@ -187,15 +187,15 @@ diff --git a/patches/Tuinity/patches/server/0002-Brand-changes.patch b/patches/Tuinity/patches/server/0002-Brand-changes.patch index 5e05582b..c15cd7c1 100644 --- a/patches/Tuinity/patches/server/0002-Brand-changes.patch +++ b/patches/Tuinity/patches/server/0002-Brand-changes.patch @@ -40,10 +40,10 @@ index a0f53c9eff04a40780b3ba568dbfc5bbe9bd8504..3bc5cd1e53dd7c94b948e7f57f0dc8e0 throwable = throwable1; throw throwable1; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 61712ae515b329a6b85dbe2e5960e4e864dc7731..5acae1e8e0324723e567674f6df3d0ac1d0ca68c 100644 +index 848219f43b2bcb2d79147107c68df52efd46d461..2f71aef1a4b21ec83e36c91eca687b1ade9e1343 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1579,7 +1579,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant void mergeSortedSets(final java.util.function.Consumer consumer, final java.util.Comparator comparator, final java.util.SortedSet...sets) { final ObjectRBTreeSet all = new ObjectRBTreeSet<>(comparator); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5acae1e8e0324723e567674f6df3d0ac1d0ca68c..cc06164291f454e074c3955f63df758990b6075e 100644 +index 2f71aef1a4b21ec83e36c91eca687b1ade9e1343..0e23428360a1709c198845b1e58b1b54ccfcc48d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -267,6 +267,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant processQueue = new java.util.concurrent.ConcurrentLinkedQueue(); public int autosavePeriod; public boolean serverAutoSave = false; // Paper -@@ -1098,6 +1099,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant resourcekey, DimensionManager dimensionmanager, WorldLoadListener worldloadlistener, ChunkGenerator chunkgenerator, boolean flag, long i, List list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { super(iworlddataserver, resourcekey, dimensionmanager, minecraftserver::getMethodProfiler, false, flag, i, gen, env, executor); // Paper pass executor diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 429f0591c6a55f6c5d08a0755f7d39da676468bc..6a3e859eef2878d9e203bba7930e52d7513d96e8 100644 +index 6fdcd96fd75cd63d769b012827519f554af4cf54..91fbda3edc0034ed356ad7559552e3acc5d4736d 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -299,6 +299,14 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/patches/Tuinity/patches/server/0005-Tuinity-Server-Config.patch b/patches/Tuinity/patches/server/0005-Tuinity-Server-Config.patch index 7d47293e..ab69a4a9 100644 --- a/patches/Tuinity/patches/server/0005-Tuinity-Server-Config.patch +++ b/patches/Tuinity/patches/server/0005-Tuinity-Server-Config.patch @@ -262,10 +262,10 @@ index 0000000000000000000000000000000000000000..0f66484a80d3cc7caaf8a111bd50229e +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cc06164291f454e074c3955f63df758990b6075e..61830a9c953e35b5c429be18da4331806294ffa5 100644 +index 0e23428360a1709c198845b1e58b1b54ccfcc48d..0515a01dbd1863b11b1418550aba82d8557f0668 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1082,6 +1082,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant(s, comparator, 0L); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3b3eda95c0ff8b129adedbae6561bba2d01c2f3a..03f74fb19e93620e057e71ac0c6c368e81aa532e 100644 +index 9d858f91828d6c2787ff1dc677a247bcab172701..bc18949c18fb1c8b85d44aff1a3255900013bab7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -505,6 +505,7 @@ public class CraftWorld implements World { diff --git a/patches/Tuinity/patches/server/0010-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch b/patches/Tuinity/patches/server/0010-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch index 8a581c50..468110f4 100644 --- a/patches/Tuinity/patches/server/0010-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch +++ b/patches/Tuinity/patches/server/0010-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch @@ -10,7 +10,7 @@ hoping that at least then we don't swap chunks, and maybe recover them all. diff --git a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java -index a4970654496c52fcd02c5c055ff5ac551bd19da3..6725b31a5183d5af7f8f7566ed21eb61797ef4c9 100644 +index dca2e9e45116df22d8c95d1be8f0a7e3c2d2b6b1..cb394ec310712cc97d65afe068284b277d7f0483 100644 --- a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java +++ b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java @@ -235,7 +235,7 @@ public class WorldUpgrader { @@ -55,7 +55,7 @@ index 4eaf497d048324a85ce49fc1c6e9559991c20df7..2d6b14345d4fcc803b011235e9798d5d nbttagcompound1.setString("Status", ichunkaccess.getChunkStatus().d()); ChunkConverter chunkconverter = ichunkaccess.p(); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java -index 890362d28ab9cb760c73fe5014e144fb08ada6b8..3c532d3996dfc734ec07181701280b6072bff55f 100644 +index e20b9e6c46093d48d5fa5eb3006087d4e998c205..dd8c307bdd5ad2927734eb098413b0245e2c30a1 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java @@ -39,7 +39,7 @@ public class IChunkLoader implements AutoCloseable { @@ -741,10 +741,10 @@ index c96eac4b0b519b2807153fa5a8ebf5a020a2b140..b5c8d9b17c2d5e229db5b48448709194 int j = 0; diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java -index ebb0d6988f87013ea5d523ab4a1b31cb669ccc43..68cdbe184cd2e490595900d988c64f2011e47495 100644 +index 74d826853389b8e01ffe2b076cf2b179d29da216..6ef54d8929814172427cb0dba5dc7711f6be69d1 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileCache.java -@@ -22,12 +22,43 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final +@@ -22,8 +22,15 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final public final Long2ObjectLinkedOpenHashMap cache = new Long2ObjectLinkedOpenHashMap(); private final File b; private final boolean c; @@ -760,35 +760,7 @@ index ebb0d6988f87013ea5d523ab4a1b31cb669ccc43..68cdbe184cd2e490595900d988c64f20 this.b = file; this.c = flag; } - -+ // Tuinity start -+ public static ChunkCoordIntPair getRegionFileCoordinates(File file) { -+ String fileName = file.getName(); -+ if (!fileName.startsWith("r.") || !fileName.endsWith(".mca")) { -+ return null; -+ } -+ -+ String[] split = fileName.split("\\."); -+ -+ if (split.length != 4) { -+ return null; -+ } -+ -+ try { -+ int x = Integer.parseInt(split[1]); -+ int z = Integer.parseInt(split[2]); -+ -+ return new ChunkCoordIntPair(x << 5, z << 5); -+ } catch (NumberFormatException ex) { -+ return null; -+ } -+ } -+ // Tuinity end -+ - - // Paper start - public synchronized RegionFile getRegionFileIfLoaded(ChunkCoordIntPair chunkcoordintpair) { // Paper - synchronize for async io -@@ -61,9 +92,9 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final +@@ -83,9 +90,9 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final this.b.mkdirs(); } @@ -800,7 +772,7 @@ index ebb0d6988f87013ea5d523ab4a1b31cb669ccc43..68cdbe184cd2e490595900d988c64f20 this.cache.putAndMoveToFirst(i, regionfile1); // Paper start -@@ -152,6 +183,13 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final +@@ -174,6 +181,13 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final return null; } // CraftBukkit end @@ -814,7 +786,7 @@ index ebb0d6988f87013ea5d523ab4a1b31cb669ccc43..68cdbe184cd2e490595900d988c64f20 try { // Paper DataInputStream datainputstream = regionfile.a(chunkcoordintpair); // Paper start -@@ -167,6 +205,17 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final +@@ -189,6 +203,17 @@ public class RegionFileCache implements AutoCloseable { // Paper - no final try { if (datainputstream != null) { nbttagcompound = NBTCompressedStreamTools.a((DataInput) datainputstream); diff --git a/patches/Tuinity/patches/server/0013-Per-World-Spawn-Limits.patch b/patches/Tuinity/patches/server/0013-Per-World-Spawn-Limits.patch index 6e7f9791..e2ea19f5 100644 --- a/patches/Tuinity/patches/server/0013-Per-World-Spawn-Limits.patch +++ b/patches/Tuinity/patches/server/0013-Per-World-Spawn-Limits.patch @@ -35,7 +35,7 @@ index 5aa558bd05c4ab735730263f220478c36a4ba0fd..6473b951788a3ecbeee4811ea0288ff4 } \ No newline at end of file diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 03f74fb19e93620e057e71ac0c6c368e81aa532e..c89b4788cec45354e03efc3f9b05dd3891101349 100644 +index bc18949c18fb1c8b85d44aff1a3255900013bab7..c15777178657d3db16de7237c7ed2127c331166a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -342,6 +342,14 @@ public class CraftWorld implements World { diff --git a/patches/Tuinity/patches/server/0014-Detail-more-information-in-watchdog-dumps.patch b/patches/Tuinity/patches/server/0014-Detail-more-information-in-watchdog-dumps.patch index f52c2de5..5be23549 100644 --- a/patches/Tuinity/patches/server/0014-Detail-more-information-in-watchdog-dumps.patch +++ b/patches/Tuinity/patches/server/0014-Detail-more-information-in-watchdog-dumps.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Detail more information in watchdog dumps - Dump player name, player uuid, position, and world for packet handling diff --git a/src/main/java/net/minecraft/network/NetworkManager.java b/src/main/java/net/minecraft/network/NetworkManager.java -index f86f430598026a3a7e27fb8d40cfc5fe7b9b845d..7a61e5d21486a9e62cf5cfa4250e859d60385f0e 100644 +index bf0c01eaf593972bbb18c22cfdb3abd658ec6498..c52f653a9882765e82c4b149649d1a847edd574c 100644 --- a/src/main/java/net/minecraft/network/NetworkManager.java +++ b/src/main/java/net/minecraft/network/NetworkManager.java @@ -405,7 +405,14 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -74,7 +74,7 @@ index 67d8fe8ad036a9252c774bb6a914c8ec79981876..71a000edfab27c9965d1929af7858282 }); throw CancelledPacketHandleException.INSTANCE; diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 0f91d8e7bef57044611d3d581f9fad7a0b5352ee..6b1577f0498cce01bb8d04d327cb1f2e2863bdc9 100644 +index ed3d4753eb6005337fc13a24021f138da5704a7f..64b9e420d8590e541cfad0881b9dc1fa58469953 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -1015,7 +1015,26 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -119,7 +119,7 @@ index 0f91d8e7bef57044611d3d581f9fad7a0b5352ee..6b1577f0498cce01bb8d04d327cb1f2e public void a(Entity entity, Entity entity1) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 6a3e859eef2878d9e203bba7930e52d7513d96e8..3912a524c6ada9c3b6d4abddc1578368c5391bee 100644 +index 91fbda3edc0034ed356ad7559552e3acc5d4736d..2eddfed1768d0a8a882cbaaf5f17e555c513c71a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -691,7 +691,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/patches/Tuinity/patches/server/0015-Execute-chunk-tasks-mid-tick.patch b/patches/Tuinity/patches/server/0015-Execute-chunk-tasks-mid-tick.patch index 43e841a7..741cbc7c 100644 --- a/patches/Tuinity/patches/server/0015-Execute-chunk-tasks-mid-tick.patch +++ b/patches/Tuinity/patches/server/0015-Execute-chunk-tasks-mid-tick.patch @@ -18,10 +18,10 @@ index 4666d6582535d6e49c5bd40d4fcdcdfe07590aa9..b870cca05f0ba354e6976a7051123563 // re-schedule eventually toTick.tickState = STATE_SCHEDULED; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 61830a9c953e35b5c429be18da4331806294ffa5..588325277546c9582d4990b18fe7acbfa451682f 100644 +index 0515a01dbd1863b11b1418550aba82d8557f0668..89892c22787e9e1e070d0aca4d20ac7ecc2ccb84 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1115,7 +1115,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { @@ -148,7 +148,7 @@ index 61830a9c953e35b5c429be18da4331806294ffa5..588325277546c9582d4990b18fe7acbf return !this.canOversleep(); }); isOversleep = false;MinecraftTimings.serverOversleep.stopTiming(); -@@ -1421,16 +1477,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> { diff --git a/patches/Tuinity/patches/server/0020-Make-CallbackExecutor-strict-again.patch b/patches/Tuinity/patches/server/0020-Make-CallbackExecutor-strict-again.patch index 937f8eec..f762e946 100644 --- a/patches/Tuinity/patches/server/0020-Make-CallbackExecutor-strict-again.patch +++ b/patches/Tuinity/patches/server/0020-Make-CallbackExecutor-strict-again.patch @@ -35,7 +35,7 @@ index ff883a306a138c2940d3de6ec46dfeb9d98e5b93..bc8114715f09496efa8aec8426c53542 } catch (Throwable thr) { if (thr instanceof ThreadDeath) { diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index 31d5356b1498f55ef53f3c66b6629bc556b9508f..2beb14192910a35936e0ff5878c227bf22abd442 100644 +index 85c4bb821d00971f8844afc1cbc616d99b48e3c3..7574546475be5ca800fd6792ec2fdba092a50d69 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -176,31 +176,28 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/patches/Tuinity/patches/server/0021-Optimise-entity-hard-collision-checking.patch b/patches/Tuinity/patches/server/0021-Optimise-entity-hard-collision-checking.patch index 6d91c40a..ba2b6a9b 100644 --- a/patches/Tuinity/patches/server/0021-Optimise-entity-hard-collision-checking.patch +++ b/patches/Tuinity/patches/server/0021-Optimise-entity-hard-collision-checking.patch @@ -11,7 +11,7 @@ Less crammed entities are likely to show significantly less benefit. Effectively, this patch optimises crammed entity situations. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 3912a524c6ada9c3b6d4abddc1578368c5391bee..b32b0ebf283a8face528ded0b845270953f536f1 100644 +index 2eddfed1768d0a8a882cbaaf5f17e555c513c71a..710b2aaa43de0d5079371d99c2ad86d3271e54ee 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -322,6 +322,41 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne @@ -112,10 +112,10 @@ index 1ff9e771788a4ab52129070e355ca48df2949470..4b0736d1f805b82e031e7cd7077b5936 } diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index 89d43183cf6c628c124aba486db69336f1e017df..bf7ca5c956a2a3a9cd2bfde7a0e4e8805d618797 100644 +index 56774d62568028108b3d62b49b657edebbd2e8ea..6d3dec7441d38ba2eec3117005cc29a5d068bac1 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -1144,6 +1144,35 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1153,6 +1153,35 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return this.getChunkAt(i, j, ChunkStatus.FULL, false); } diff --git a/patches/Tuinity/patches/server/0022-Improved-oversized-chunk-data-packet-handling.patch b/patches/Tuinity/patches/server/0022-Improved-oversized-chunk-data-packet-handling.patch deleted file mode 100644 index 966de024..00000000 --- a/patches/Tuinity/patches/server/0022-Improved-oversized-chunk-data-packet-handling.patch +++ /dev/null @@ -1,158 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Spottedleaf -Date: Mon, 3 Feb 2020 20:37:44 -0800 -Subject: [PATCH] Improved oversized chunk data packet handling - -Now target all TE data, except for TE's that do not have -update packets. - -This patch relies upon the improve extra packet handling -patch, as we now use PacketPlayOutMapChunk as an extra packet. -See its patch notes for further details. - -diff --git a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutMapChunk.java -index 3047cf8c4ec1b664d6b790f18d2b1657e4b00435..1295c391ae48f0864c243ca9046f31480eb768fe 100644 ---- a/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutMapChunk.java -+++ b/src/main/java/net/minecraft/network/protocol/game/PacketPlayOutMapChunk.java -@@ -32,7 +32,7 @@ public class PacketPlayOutMapChunk implements Packet { - @Nullable - private int[] e; - private byte[] f; private byte[] getData() { return this.f; } // Paper - OBFHELPER -- private List g; -+ private List g; private List getTileEntityData() { return this.g; } // Tuinity - OBFHELPER - private boolean h; - - // Paper start - Async-Anti-Xray - Set the ready flag to true -@@ -44,7 +44,9 @@ public class PacketPlayOutMapChunk implements Packet { - - // Paper start - private final java.util.List extraPackets = new java.util.ArrayList<>(); -- private static final int TE_LIMIT = Integer.getInteger("Paper.excessiveTELimit", 750); -+ private static final int TE_LIMIT = Integer.getInteger("tuinity.excessive-te-limit", 750); // Tuinity - handle oversized chunk data packets more robustly -+ private static final int TE_SPLIT_LIMIT = Math.max(4096 + 1, Integer.getInteger("tuinity.te-split-limit", 15_000)); // Tuinity - handle oversized chunk data packets more robustly -+ private boolean mustSplit; // Tuinity - handle oversized chunk data packets more robustly - - @Override - public java.util.List getExtraPackets() { -@@ -53,7 +55,7 @@ public class PacketPlayOutMapChunk implements Packet { - // Paper end - // Paper start - Anti-Xray - Add chunk packet info - @Deprecated public PacketPlayOutMapChunk(Chunk chunk, int i) { this(chunk, i, true); } // Notice for updates: Please make sure this constructor isn't used anywhere -- public PacketPlayOutMapChunk(Chunk chunk, int i, boolean modifyBlocks) { -+ public PacketPlayOutMapChunk(Chunk chunk, int i, boolean modifyBlocks) { final int chunkSectionBitSet = i; // Tuinity - handle oversized chunk data packets more robustly - ChunkPacketInfo chunkPacketInfo = modifyBlocks ? chunk.world.chunkPacketBlockController.getChunkPacketInfo(this, chunk, i) : null; - // Paper end - ChunkCoordIntPair chunkcoordintpair = chunk.getPos(); -@@ -62,27 +64,12 @@ public class PacketPlayOutMapChunk implements Packet { - this.b = chunkcoordintpair.z; - this.h = i == 65535; - this.d = new NBTTagCompound(); -- Iterator iterator = chunk.f().iterator(); -- -- Entry entry; -- -- while (iterator.hasNext()) { -- entry = (Entry) iterator.next(); -- if (((HeightMap.Type) entry.getKey()).c()) { -- this.d.set(((HeightMap.Type) entry.getKey()).b(), new NBTTagLongArray(((HeightMap) entry.getValue()).a())); -- } -- } -- -- if (this.h) { -- this.e = chunk.getBiomeIndex().a(); -- } -- -- this.f = new byte[this.a(chunk, i)]; -- // Paper start - Anti-Xray - Add chunk packet info -- if (chunkPacketInfo != null) { -- chunkPacketInfo.setData(this.getData()); -- } -- this.c = this.writeChunk(new PacketDataSerializer(this.j()), chunk, i, chunkPacketInfo); -+ // Tuinity - move this after the tile entity logic, we need to determine whether we're going to split -+ // Tuinity - before writing chunk block data -+ // Tuinity - note: for future maintenance, git will prefer the smallest diff, so if moving the TE code is -+ // Tuinity - a smaller diff, do that, else move the chunk writing - this makes sure the start/end is correct -+ Iterator iterator; // Tuinity - move declaration up -+ Entry entry; // Tuinity - move delcaration up - // Paper end - this.g = Lists.newArrayList(); - iterator = chunk.getTileEntities().entrySet().iterator(); -@@ -95,8 +82,16 @@ public class PacketPlayOutMapChunk implements Packet { - int j = blockposition.getY() >> 4; - - if (this.f() || (i & 1 << j) != 0) { -+ // Tuinity start - improve oversized chunk data packet handling -+ ++totalTileEntities; -+ if (totalTileEntities > TE_SPLIT_LIMIT) { -+ this.mustSplit = true; -+ this.getTileEntityData().clear(); -+ this.extraPackets.clear(); -+ break; -+ } - // Paper start - improve oversized chunk data packet handling -- if (++totalTileEntities > TE_LIMIT) { -+ if (totalTileEntities > TE_LIMIT) { // Tuinity end - improve oversized chunk data packet handling - PacketPlayOutTileEntityData updatePacket = tileentity.getUpdatePacket(); - if (updatePacket != null) { - this.extraPackets.add(updatePacket); -@@ -110,7 +105,42 @@ public class PacketPlayOutMapChunk implements Packet { - this.g.add(nbttagcompound); - } - } -+ // Tuinity start - moved after tile entity gathering -+ iterator = chunk.f().iterator(); // Declared earlier -+ -+ while (iterator.hasNext()) { -+ entry = (Entry) iterator.next(); -+ if (((HeightMap.Type) entry.getKey()).c()) { -+ this.d.set(((HeightMap.Type) entry.getKey()).b(), new NBTTagLongArray(((HeightMap) entry.getValue()).a())); -+ } -+ } -+ -+ if (this.h) { -+ this.e = chunk.getBiomeIndex().a(); -+ } -+ -+ this.f = new byte[this.a(chunk, i)]; -+ // Paper start - Anti-Xray - Add chunk packet info -+ if (chunkPacketInfo != null) { -+ chunkPacketInfo.setData(this.getData()); -+ } -+ this.c = this.writeChunk(new PacketDataSerializer(this.j()), chunk, i, chunkPacketInfo); -+ // Tuinity end - moved after tile entity gathering - chunk.world.chunkPacketBlockController.modifyBlocks(this, chunkPacketInfo); // Paper - Anti-Xray - Modify blocks -+ // Tuinity start - improve oversized chunk data packet handling -+ if (this.mustSplit) { -+ int chunkSectionBitSetCopy = chunkSectionBitSet; -+ for (int a = 0, len = Integer.bitCount(chunkSectionBitSet); a < len; ++a) { -+ int trailingBit = com.destroystokyo.paper.util.math.IntegerUtil.getTrailingBit(chunkSectionBitSetCopy); -+ int sectionIndex = Integer.numberOfTrailingZeros(trailingBit); -+ chunkSectionBitSetCopy ^= trailingBit; // move on to the next -+ -+ if (chunk.getSections()[sectionIndex] != null) { -+ this.extraPackets.add(new PacketPlayOutMapChunk(chunk, trailingBit)); -+ } -+ } -+ } -+ // Tuinity end - improve oversized chunk data packet handling - } - - // Paper start - Async-Anti-Xray - Getter and Setter for the ready flag -@@ -201,7 +231,7 @@ public class PacketPlayOutMapChunk implements Packet { - for (int l = achunksection.length; k < l; ++k) { - ChunkSection chunksection = achunksection[k]; - -- if (chunksection != Chunk.a && (!this.f() || !chunksection.c()) && (i & 1 << k) != 0) { -+ if ((!this.mustSplit && chunksection != Chunk.a) && (!this.f() || !chunksection.c()) && (i & 1 << k) != 0) { // Tuinity - improve oversized chunk data packet handling - j |= 1 << k; - chunksection.writeChunkSection(packetdataserializer, chunkPacketInfo); // Paper - Anti-Xray - Add chunk packet info - } -@@ -218,7 +248,7 @@ public class PacketPlayOutMapChunk implements Packet { - for (int l = achunksection.length; k < l; ++k) { - ChunkSection chunksection = achunksection[k]; - -- if (chunksection != Chunk.a && (!this.f() || !chunksection.c()) && (i & 1 << k) != 0) { -+ if ((!this.mustSplit && chunksection != Chunk.a) && (!this.f() || !chunksection.c()) && (i & 1 << k) != 0) { - j += chunksection.j(); - } - } diff --git a/patches/Tuinity/patches/server/0023-Reduce-iterator-allocation-from-chunk-gen.patch b/patches/Tuinity/patches/server/0022-Reduce-iterator-allocation-from-chunk-gen.patch similarity index 100% rename from patches/Tuinity/patches/server/0023-Reduce-iterator-allocation-from-chunk-gen.patch rename to patches/Tuinity/patches/server/0022-Reduce-iterator-allocation-from-chunk-gen.patch diff --git a/patches/Tuinity/patches/server/0024-Prevent-long-map-entry-creation-in-light-engine.patch b/patches/Tuinity/patches/server/0023-Prevent-long-map-entry-creation-in-light-engine.patch similarity index 100% rename from patches/Tuinity/patches/server/0024-Prevent-long-map-entry-creation-in-light-engine.patch rename to patches/Tuinity/patches/server/0023-Prevent-long-map-entry-creation-in-light-engine.patch diff --git a/patches/Tuinity/patches/server/0025-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch b/patches/Tuinity/patches/server/0024-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch similarity index 99% rename from patches/Tuinity/patches/server/0025-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch rename to patches/Tuinity/patches/server/0024-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch index b199d16f..94b812f4 100644 --- a/patches/Tuinity/patches/server/0025-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch +++ b/patches/Tuinity/patches/server/0024-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch @@ -248,10 +248,10 @@ index 006e7076932f6be576a64da09c4d84ca4a15f5dd..e832ea0497b2d6af7556bda7f6728e72 0, 2, 60L, TimeUnit.SECONDS, new LinkedBlockingQueue(), diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 588325277546c9582d4990b18fe7acbfa451682f..078b8444d6f7c79d504805bce011b26a951b5fa3 100644 +index 89892c22787e9e1e070d0aca4d20ac7ecc2ccb84..2b9b5db565161884539175d975d9fd8253b8de7b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1451,6 +1451,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant getEntities(@Nullable Entity entity, AxisAlignedBB axisalignedbb, @Nullable Predicate predicate) { diff --git a/patches/Tuinity/patches/server/0026-Reduce-allocation-rate-from-crammed-entities.patch b/patches/Tuinity/patches/server/0025-Reduce-allocation-rate-from-crammed-entities.patch similarity index 94% rename from patches/Tuinity/patches/server/0026-Reduce-allocation-rate-from-crammed-entities.patch rename to patches/Tuinity/patches/server/0025-Reduce-allocation-rate-from-crammed-entities.patch index ec3d6314..6c9ea0d8 100644 --- a/patches/Tuinity/patches/server/0026-Reduce-allocation-rate-from-crammed-entities.patch +++ b/patches/Tuinity/patches/server/0025-Reduce-allocation-rate-from-crammed-entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Reduce allocation rate from crammed entities diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 2537c9fcf155253da53ada3829c3caca765f35f4..96cc46a26eef701b0579f3407e67af9176e1743b 100644 +index 2657dd71213455e2da3a4ff4d338a33896ffe855..33f689b1c9f4c00969fbdd8ddb21901637afb81c 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -2973,7 +2973,11 @@ public abstract class EntityLiving extends Entity { diff --git a/patches/Tuinity/patches/server/0027-Optimise-chunk-tick-iteration.patch b/patches/Tuinity/patches/server/0026-Optimise-chunk-tick-iteration.patch similarity index 100% rename from patches/Tuinity/patches/server/0027-Optimise-chunk-tick-iteration.patch rename to patches/Tuinity/patches/server/0026-Optimise-chunk-tick-iteration.patch diff --git a/patches/Tuinity/patches/server/0028-Use-entity-ticking-chunk-map-for-entity-tracker.patch b/patches/Tuinity/patches/server/0027-Use-entity-ticking-chunk-map-for-entity-tracker.patch similarity index 93% rename from patches/Tuinity/patches/server/0028-Use-entity-ticking-chunk-map-for-entity-tracker.patch rename to patches/Tuinity/patches/server/0027-Use-entity-ticking-chunk-map-for-entity-tracker.patch index 9e789719..61fd7b69 100644 --- a/patches/Tuinity/patches/server/0028-Use-entity-ticking-chunk-map-for-entity-tracker.patch +++ b/patches/Tuinity/patches/server/0027-Use-entity-ticking-chunk-map-for-entity-tracker.patch @@ -7,10 +7,10 @@ Should bring us back in-line with tracker performance before the loaded entity list reversion. diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index 2beb14192910a35936e0ff5878c227bf22abd442..db271a5a1f09f8c11ac2498f8975cf7b025dd5e3 100644 +index 7574546475be5ca800fd6792ec2fdba092a50d69..4d230d2df0e33e6f3da089ea9610cc9f0f950d3f 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -@@ -2153,22 +2153,25 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -2161,22 +2161,25 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private final void processTrackQueue() { this.world.timings.tracker1.startTiming(); try { diff --git a/patches/Tuinity/patches/server/0029-Improve-paper-prevent-moving-into-unloaded-chunk-che.patch b/patches/Tuinity/patches/server/0028-Improve-paper-prevent-moving-into-unloaded-chunk-che.patch similarity index 96% rename from patches/Tuinity/patches/server/0029-Improve-paper-prevent-moving-into-unloaded-chunk-che.patch rename to patches/Tuinity/patches/server/0028-Improve-paper-prevent-moving-into-unloaded-chunk-che.patch index 1d7a4b01..798ddd32 100644 --- a/patches/Tuinity/patches/server/0029-Improve-paper-prevent-moving-into-unloaded-chunk-che.patch +++ b/patches/Tuinity/patches/server/0028-Improve-paper-prevent-moving-into-unloaded-chunk-che.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Improve paper prevent moving into unloaded chunk check Check the AABB of the move diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index 8c9e97bb093c0e6297397edc71d72deebbcfbed9..8a01ef6d87e57d8f659558044d4b8ed6d1c26515 100644 +index 304310cad03bce78a25ab0fb3e5e5f62ebd5558b..26142bae7f326323385046ea3038a6d183d60fd5 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -570,7 +570,9 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/patches/Tuinity/patches/server/0030-Improve-async-tp-to-not-load-chunks-when-crossing-wo.patch b/patches/Tuinity/patches/server/0029-Improve-async-tp-to-not-load-chunks-when-crossing-wo.patch similarity index 100% rename from patches/Tuinity/patches/server/0030-Improve-async-tp-to-not-load-chunks-when-crossing-wo.patch rename to patches/Tuinity/patches/server/0029-Improve-async-tp-to-not-load-chunks-when-crossing-wo.patch diff --git a/patches/Tuinity/patches/server/0031-Revert-getChunkAt-Async-retaining-chunks-for-long-pe.patch b/patches/Tuinity/patches/server/0030-Revert-getChunkAt-Async-retaining-chunks-for-long-pe.patch similarity index 94% rename from patches/Tuinity/patches/server/0031-Revert-getChunkAt-Async-retaining-chunks-for-long-pe.patch rename to patches/Tuinity/patches/server/0030-Revert-getChunkAt-Async-retaining-chunks-for-long-pe.patch index 683e1650..593ee591 100644 --- a/patches/Tuinity/patches/server/0031-Revert-getChunkAt-Async-retaining-chunks-for-long-pe.patch +++ b/patches/Tuinity/patches/server/0030-Revert-getChunkAt-Async-retaining-chunks-for-long-pe.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Revert getChunkAt(Async) retaining chunks for long periods of diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c89b4788cec45354e03efc3f9b05dd3891101349..6e9cc608fd5038b9729eeb56f6014de3ce19809d 100644 +index c15777178657d3db16de7237c7ed2127c331166a..e6ea687478a8f7282569a79e4fc29d967cbae7ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -423,14 +423,7 @@ public class CraftWorld implements World { diff --git a/patches/Tuinity/patches/server/0032-Rework-PlayerChunk-main-thread-checks.patch b/patches/Tuinity/patches/server/0031-Rework-PlayerChunk-main-thread-checks.patch similarity index 98% rename from patches/Tuinity/patches/server/0032-Rework-PlayerChunk-main-thread-checks.patch rename to patches/Tuinity/patches/server/0031-Rework-PlayerChunk-main-thread-checks.patch index 9ec912ed..e99bf860 100644 --- a/patches/Tuinity/patches/server/0032-Rework-PlayerChunk-main-thread-checks.patch +++ b/patches/Tuinity/patches/server/0031-Rework-PlayerChunk-main-thread-checks.patch @@ -74,7 +74,7 @@ index f7deb4fe98ef9900acb276c7680d5a2da9661e8f..6b939d35e13fdc84fd3767e74eaf78c9 if (chunk != null) { playerchunkmap.callbackExecutor.execute(() -> { diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index db271a5a1f09f8c11ac2498f8975cf7b025dd5e3..d395a694335f2ffcdfae3abf3884f09fb69b59d7 100644 +index 4d230d2df0e33e6f3da089ea9610cc9f0f950d3f..d839a0267bc23f444294966bf29bd71861ea1301 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -1355,7 +1355,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/patches/Tuinity/patches/server/0033-Allow-Entities-to-be-removed-from-a-world-while-tick.patch b/patches/Tuinity/patches/server/0032-Allow-Entities-to-be-removed-from-a-world-while-tick.patch similarity index 99% rename from patches/Tuinity/patches/server/0033-Allow-Entities-to-be-removed-from-a-world-while-tick.patch rename to patches/Tuinity/patches/server/0032-Allow-Entities-to-be-removed-from-a-world-while-tick.patch index d15634fb..e4cbe4ee 100644 --- a/patches/Tuinity/patches/server/0033-Allow-Entities-to-be-removed-from-a-world-while-tick.patch +++ b/patches/Tuinity/patches/server/0032-Allow-Entities-to-be-removed-from-a-world-while-tick.patch @@ -9,7 +9,7 @@ issues where teleporting players across worlds while ticking. Also allows us to run mid tick while ticking entities. diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 2fc652655a9e426e27505e12338843a1b28f63b3..39dadd51d6a0d49742898eb42d8bf3f3094fd270 100644 +index de7d6ad3a84b44eec2fc3b6f3412f79530656988..f9d957c373eafa5f29beeea04e417a3d2d244dc9 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -174,7 +174,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/Tuinity/patches/server/0034-Prevent-unload-calls-removing-tickets-for-sync-loads.patch b/patches/Tuinity/patches/server/0033-Prevent-unload-calls-removing-tickets-for-sync-loads.patch similarity index 100% rename from patches/Tuinity/patches/server/0034-Prevent-unload-calls-removing-tickets-for-sync-loads.patch rename to patches/Tuinity/patches/server/0033-Prevent-unload-calls-removing-tickets-for-sync-loads.patch diff --git a/patches/Tuinity/patches/server/0035-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/Tuinity/patches/server/0034-Optimise-collision-checking-in-player-move-packet-ha.patch similarity index 99% rename from patches/Tuinity/patches/server/0035-Optimise-collision-checking-in-player-move-packet-ha.patch rename to patches/Tuinity/patches/server/0034-Optimise-collision-checking-in-player-move-packet-ha.patch index 90571269..9be42ab0 100644 --- a/patches/Tuinity/patches/server/0035-Optimise-collision-checking-in-player-move-packet-ha.patch +++ b/patches/Tuinity/patches/server/0034-Optimise-collision-checking-in-player-move-packet-ha.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimise collision checking in player move packet handling Move collision logic to just the hasNewCollision call instead of getCubes + hasNewCollision diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index 8a01ef6d87e57d8f659558044d4b8ed6d1c26515..ba8aa5dc5263e7efaddd6c7642abf39382b62a82 100644 +index 26142bae7f326323385046ea3038a6d183d60fd5..ba63cc4bff4a8614a25b1576ea2c8f838cb34e19 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -585,12 +585,14 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/patches/Tuinity/patches/server/0036-Manually-inline-methods-in-BlockPosition.patch b/patches/Tuinity/patches/server/0035-Manually-inline-methods-in-BlockPosition.patch similarity index 97% rename from patches/Tuinity/patches/server/0036-Manually-inline-methods-in-BlockPosition.patch rename to patches/Tuinity/patches/server/0035-Manually-inline-methods-in-BlockPosition.patch index 522aee8a..472f4178 100644 --- a/patches/Tuinity/patches/server/0036-Manually-inline-methods-in-BlockPosition.patch +++ b/patches/Tuinity/patches/server/0035-Manually-inline-methods-in-BlockPosition.patch @@ -41,7 +41,7 @@ index a44bcdb053877a6281e566ffe03ef72ffd50ca08..e72c852517f9fdc7b7a3a5bc5d3aa067 } diff --git a/src/main/java/net/minecraft/core/BlockPosition.java b/src/main/java/net/minecraft/core/BlockPosition.java -index eb67af795dd716d9f92ac32843accc1ec4efd647..8edc279e7a3fdfb7e10718f1deee34b7e3fb2f28 100644 +index 4abc87b7e737bc652e84f76a508ab85501d1556f..6a6381e85fef2ae2b9b5e6dff0b7917b92fa01e5 100644 --- a/src/main/java/net/minecraft/core/BlockPosition.java +++ b/src/main/java/net/minecraft/core/BlockPosition.java @@ -455,10 +455,10 @@ public class BlockPosition extends BaseBlockPosition { @@ -96,7 +96,7 @@ index eb67af795dd716d9f92ac32843accc1ec4efd647..8edc279e7a3fdfb7e10718f1deee34b7 } public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection, int i) { -@@ -517,21 +526,30 @@ public class BlockPosition extends BaseBlockPosition { +@@ -518,21 +527,30 @@ public class BlockPosition extends BaseBlockPosition { } } diff --git a/patches/Tuinity/patches/server/0037-Separate-lookup-locking-from-state-access-in-UserCac.patch b/patches/Tuinity/patches/server/0036-Separate-lookup-locking-from-state-access-in-UserCac.patch similarity index 100% rename from patches/Tuinity/patches/server/0037-Separate-lookup-locking-from-state-access-in-UserCac.patch rename to patches/Tuinity/patches/server/0036-Separate-lookup-locking-from-state-access-in-UserCac.patch diff --git a/patches/Tuinity/patches/server/0038-Distance-manager-tick-timings.patch b/patches/Tuinity/patches/server/0037-Distance-manager-tick-timings.patch similarity index 100% rename from patches/Tuinity/patches/server/0038-Distance-manager-tick-timings.patch rename to patches/Tuinity/patches/server/0037-Distance-manager-tick-timings.patch diff --git a/patches/Tuinity/patches/server/0039-Name-craft-scheduler-threads-according-to-the-plugin.patch b/patches/Tuinity/patches/server/0038-Name-craft-scheduler-threads-according-to-the-plugin.patch similarity index 100% rename from patches/Tuinity/patches/server/0039-Name-craft-scheduler-threads-according-to-the-plugin.patch rename to patches/Tuinity/patches/server/0038-Name-craft-scheduler-threads-according-to-the-plugin.patch diff --git a/patches/Tuinity/patches/server/0040-Fix-swamp-hut-cat-generation-deadlock.patch b/patches/Tuinity/patches/server/0039-Fix-swamp-hut-cat-generation-deadlock.patch similarity index 100% rename from patches/Tuinity/patches/server/0040-Fix-swamp-hut-cat-generation-deadlock.patch rename to patches/Tuinity/patches/server/0039-Fix-swamp-hut-cat-generation-deadlock.patch diff --git a/patches/Tuinity/patches/server/0041-Range-check-flag-dirty-calls-in-PlayerChunk.patch b/patches/Tuinity/patches/server/0040-Range-check-flag-dirty-calls-in-PlayerChunk.patch similarity index 100% rename from patches/Tuinity/patches/server/0041-Range-check-flag-dirty-calls-in-PlayerChunk.patch rename to patches/Tuinity/patches/server/0040-Range-check-flag-dirty-calls-in-PlayerChunk.patch diff --git a/patches/Tuinity/patches/server/0042-Optimise-tab-complete.patch b/patches/Tuinity/patches/server/0041-Optimise-tab-complete.patch similarity index 100% rename from patches/Tuinity/patches/server/0042-Optimise-tab-complete.patch rename to patches/Tuinity/patches/server/0041-Optimise-tab-complete.patch diff --git a/patches/Tuinity/patches/server/0043-Do-not-allow-ticket-level-changes-while-unloading-pl.patch b/patches/Tuinity/patches/server/0042-Do-not-allow-ticket-level-changes-while-unloading-pl.patch similarity index 97% rename from patches/Tuinity/patches/server/0043-Do-not-allow-ticket-level-changes-while-unloading-pl.patch rename to patches/Tuinity/patches/server/0042-Do-not-allow-ticket-level-changes-while-unloading-pl.patch index a0cb2771..d95574ee 100644 --- a/patches/Tuinity/patches/server/0043-Do-not-allow-ticket-level-changes-while-unloading-pl.patch +++ b/patches/Tuinity/patches/server/0042-Do-not-allow-ticket-level-changes-while-unloading-pl.patch @@ -20,7 +20,7 @@ index 9d26ca0ed8a8ad33091ee5b649289f2fae6c6f74..d1fa4602f2f443c19ff69bfbd39cacdb boolean flag = this.chunkMapDistance.a(this.playerChunkMap); boolean flag1 = this.playerChunkMap.b(); diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index d395a694335f2ffcdfae3abf3884f09fb69b59d7..3b727fcb05074dea7cc1689e8589d4f93d5ccceb 100644 +index d839a0267bc23f444294966bf29bd71861ea1301..b1f2841bed5b913cbfb8c18d7ee1c05a64d3e252 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -846,6 +846,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/patches/Tuinity/patches/server/0044-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch b/patches/Tuinity/patches/server/0043-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch similarity index 90% rename from patches/Tuinity/patches/server/0044-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch rename to patches/Tuinity/patches/server/0043-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch index 7636e2fc..59430670 100644 --- a/patches/Tuinity/patches/server/0044-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch +++ b/patches/Tuinity/patches/server/0043-Make-sure-inlined-getChunkAt-has-inlined-logic-for-l.patch @@ -13,10 +13,10 @@ Paper recently reverted this optimisation, so it's been reintroduced here. diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index a0ff1e87224f418a387656c8793151af7929454a..33b7d8247273d7744a241285f8732847d01e8892 100644 +index 7d3fcf93574d64f120f3a241667e7c93b490cc29..f34d8d223690570b69c19fa3da286ddeda54cddd 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -349,6 +349,15 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -358,6 +358,15 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @Override public final Chunk getChunkAt(int i, int j) { // Paper - final to help inline diff --git a/patches/Tuinity/patches/server/0045-Add-packet-limiter-config.patch b/patches/Tuinity/patches/server/0044-Add-packet-limiter-config.patch similarity index 99% rename from patches/Tuinity/patches/server/0045-Add-packet-limiter-config.patch rename to patches/Tuinity/patches/server/0044-Add-packet-limiter-config.patch index 2deb6bbb..a7621778 100644 --- a/patches/Tuinity/patches/server/0045-Add-packet-limiter-config.patch +++ b/patches/Tuinity/patches/server/0044-Add-packet-limiter-config.patch @@ -135,7 +135,7 @@ index 6473b951788a3ecbeee4811ea0288ff47b48355f..373b36fa36f98f64bb9ffa0dfaecefa3 public final String worldName; diff --git a/src/main/java/net/minecraft/network/NetworkManager.java b/src/main/java/net/minecraft/network/NetworkManager.java -index a9637772ead360ee476d59104b50a505e6d0ef4c..2abf64fda6e504a89b2e443af48894023d446cef 100644 +index 453fb6a337d0a71ca1a9587bda157ac40b920556..b0a573a5cc0d65cb7d8f3fd2aaabfc2efe169735 100644 --- a/src/main/java/net/minecraft/network/NetworkManager.java +++ b/src/main/java/net/minecraft/network/NetworkManager.java @@ -196,8 +196,64 @@ public class NetworkManager extends SimpleChannelInboundHandler> { diff --git a/patches/Tuinity/patches/server/0046-Optimise-closest-entity-lookup.patch b/patches/Tuinity/patches/server/0045-Optimise-closest-entity-lookup.patch similarity index 99% rename from patches/Tuinity/patches/server/0046-Optimise-closest-entity-lookup.patch rename to patches/Tuinity/patches/server/0045-Optimise-closest-entity-lookup.patch index 778a34b2..9242c433 100644 --- a/patches/Tuinity/patches/server/0046-Optimise-closest-entity-lookup.patch +++ b/patches/Tuinity/patches/server/0045-Optimise-closest-entity-lookup.patch @@ -613,10 +613,10 @@ index 69cc7664089c505eb5cfdc437f16b91e9713eada..7c9ed41ae67bce0e5e45b9c091180ca3 } diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index 33b7d8247273d7744a241285f8732847d01e8892..23db2bad910795b1335e247521d383c2dd87a23b 100644 +index f34d8d223690570b69c19fa3da286ddeda54cddd..cd15f9b17f7fb01428196dba5c50259217b5ad2c 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -1246,7 +1246,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1255,7 +1255,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { Chunk chunk = (Chunk)this.getChunkIfLoadedImmediately(i1, j1); // Paper if (chunk != null) { @@ -625,7 +625,7 @@ index 33b7d8247273d7744a241285f8732847d01e8892..23db2bad910795b1335e247521d383c2 } } } -@@ -1269,7 +1269,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1278,7 +1278,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { Chunk chunk = (Chunk)this.getChunkIfLoadedImmediately(i1, j1); // Paper if (chunk != null) { @@ -634,7 +634,7 @@ index 33b7d8247273d7744a241285f8732847d01e8892..23db2bad910795b1335e247521d383c2 } } } -@@ -1277,6 +1277,106 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -1286,6 +1286,106 @@ public abstract class World implements GeneratorAccess, AutoCloseable { return list; } diff --git a/patches/Tuinity/patches/server/0047-Optimise-nearby-player-lookups.patch b/patches/Tuinity/patches/server/0046-Optimise-nearby-player-lookups.patch similarity index 98% rename from patches/Tuinity/patches/server/0047-Optimise-nearby-player-lookups.patch rename to patches/Tuinity/patches/server/0046-Optimise-nearby-player-lookups.patch index 85a2312f..bf437276 100644 --- a/patches/Tuinity/patches/server/0047-Optimise-nearby-player-lookups.patch +++ b/patches/Tuinity/patches/server/0046-Optimise-nearby-player-lookups.patch @@ -26,7 +26,7 @@ index 37c3617979da7839ad89883d9800c14c34e8b19b..e3dc57282a559f783c027780740e8089 // Paper end - optimise isOutsideOfRange // Paper start - optimize chunk status progression without jumping through thread pool diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index 3b727fcb05074dea7cc1689e8589d4f93d5ccceb..7897fe870234ddef12926d855a3f060f9a72b2ba 100644 +index b1f2841bed5b913cbfb8c18d7ee1c05a64d3e252..42907d6a9f48818d758b5518c70440cd3c411eca 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -250,6 +250,12 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -97,7 +97,7 @@ index 3b727fcb05074dea7cc1689e8589d4f93d5ccceb..7897fe870234ddef12926d855a3f060f // Paper start - Chunk Prioritization public void queueHolderUpdate(PlayerChunk playerchunk) { diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 39dadd51d6a0d49742898eb42d8bf3f3094fd270..77646973d1ab7c7573de7591c820291016b9c57a 100644 +index f9d957c373eafa5f29beeea04e417a3d2d244dc9..24661b4d02aa09d51610a8733657de67220ad5be 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -414,6 +414,107 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -224,7 +224,7 @@ index 39dadd51d6a0d49742898eb42d8bf3f3094fd270..77646973d1ab7c7573de7591c8202910 this.ticking = true; gameprofilerfiller.enter("world border"); diff --git a/src/main/java/net/minecraft/world/entity/EntityInsentient.java b/src/main/java/net/minecraft/world/entity/EntityInsentient.java -index a246edd09854dabf095da75c9d200f5cf26e7138..aae13c2e6c2a30b69c33417932c6a4d0aefeb7f5 100644 +index 837bf1b02a66602892c2f572b38b17de6ba6d266..bd66ee1b93fc776f77218b87717e0915668e7c04 100644 --- a/src/main/java/net/minecraft/world/entity/EntityInsentient.java +++ b/src/main/java/net/minecraft/world/entity/EntityInsentient.java @@ -779,7 +779,13 @@ public abstract class EntityInsentient extends EntityLiving { @@ -308,12 +308,12 @@ index 24771c3522ea74ac12058591137eafc21adf3762..b3c73c6b4cffa20813355c5f2132fe3e } else if (worldserver.getSpawn().a((IPosition) (new Vec3D((double) blockposition_mutableblockposition.getX() + 0.5D, (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + 0.5D)), 24.0D)) { return false; diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index 23db2bad910795b1335e247521d383c2dd87a23b..a802c45538943b570ca0daa3a40607dc80e696eb 100644 +index cd15f9b17f7fb01428196dba5c50259217b5ad2c..dedcdba593d15b1e2f880ae9eaa00eb6edcd03cf 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -183,6 +183,65 @@ public abstract class World implements GeneratorAccess, AutoCloseable { - return typeKey; +@@ -192,6 +192,65 @@ public abstract class World implements GeneratorAccess, AutoCloseable { } + // Paper end - fix and optimise world upgrading + // Tuinity start - optimise checkDespawn + public final List getNearbyPlayers(@Nullable Entity source, double sourceX, double sourceY, double sourceZ, double maxRange, @Nullable Predicate predicate) { diff --git a/patches/Tuinity/patches/server/0048-Remove-streams-for-villager-AI.patch b/patches/Tuinity/patches/server/0047-Remove-streams-for-villager-AI.patch similarity index 99% rename from patches/Tuinity/patches/server/0048-Remove-streams-for-villager-AI.patch rename to patches/Tuinity/patches/server/0047-Remove-streams-for-villager-AI.patch index 8fc8503d..1cbf4179 100644 --- a/patches/Tuinity/patches/server/0048-Remove-streams-for-villager-AI.patch +++ b/patches/Tuinity/patches/server/0047-Remove-streams-for-villager-AI.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Remove streams for villager AI diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c5ce10a55de6f611ec65f32382b0082f86e73fe3..d1269c08dc0b4e2caa7289748a894519f5d0a66d 100644 +index 0cb2306e97e50f6cac308cec1e67348f4a41820f..4a96fc355b3e69ebd6b0b7dea1d687d722f5b810 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1681,6 +1681,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/patches/Tuinity/patches/server/0049-Don-t-lookup-fluid-state-when-raytracing.patch b/patches/Tuinity/patches/server/0048-Don-t-lookup-fluid-state-when-raytracing.patch similarity index 100% rename from patches/Tuinity/patches/server/0049-Don-t-lookup-fluid-state-when-raytracing.patch rename to patches/Tuinity/patches/server/0048-Don-t-lookup-fluid-state-when-raytracing.patch diff --git a/patches/Tuinity/patches/server/0050-Reduce-pathfinder-branches.patch b/patches/Tuinity/patches/server/0049-Reduce-pathfinder-branches.patch similarity index 100% rename from patches/Tuinity/patches/server/0050-Reduce-pathfinder-branches.patch rename to patches/Tuinity/patches/server/0049-Reduce-pathfinder-branches.patch diff --git a/patches/Tuinity/patches/server/0051-Add-Velocity-natives-for-encryption-and-compression.patch b/patches/Tuinity/patches/server/0050-Add-Velocity-natives-for-encryption-and-compression.patch similarity index 96% rename from patches/Tuinity/patches/server/0051-Add-Velocity-natives-for-encryption-and-compression.patch rename to patches/Tuinity/patches/server/0050-Add-Velocity-natives-for-encryption-and-compression.patch index 69fd70a9..a5648b79 100644 --- a/patches/Tuinity/patches/server/0051-Add-Velocity-natives-for-encryption-and-compression.patch +++ b/patches/Tuinity/patches/server/0050-Add-Velocity-natives-for-encryption-and-compression.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Velocity natives for encryption and compression This patch is licensed under the MIT license. See /licenses/MIT.md. diff --git a/pom.xml b/pom.xml -index 3c60bf75dacd00cac2e35b0e597992ce0ce9448c..84bedea0b7db6929698503f78ede260f6ea3d56e 100644 +index ca8471fc36549df2f62065ce619a5c12cb7ecc61..fa4d7b90b1c0b3b8235c3e3c36046dc8a13378fc 100644 --- a/pom.xml +++ b/pom.xml -@@ -156,6 +156,13 @@ +@@ -183,6 +183,13 @@ 4.8.47 test @@ -24,7 +24,7 @@ index 3c60bf75dacd00cac2e35b0e597992ce0ce9448c..84bedea0b7db6929698503f78ede260f diff --git a/src/main/java/net/minecraft/network/NetworkManager.java b/src/main/java/net/minecraft/network/NetworkManager.java -index 2abf64fda6e504a89b2e443af48894023d446cef..69bfe8d0a9cf745557c3e06141dec1ed3bb7d567 100644 +index b0a573a5cc0d65cb7d8f3fd2aaabfc2efe169735..20cc362e23d8cb7f1df081d6251da76c5cf70ca8 100644 --- a/src/main/java/net/minecraft/network/NetworkManager.java +++ b/src/main/java/net/minecraft/network/NetworkManager.java @@ -568,10 +568,16 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -291,7 +291,7 @@ index 5759f91d5e9dc52b16c8955b8d318da2b53c7af4..0960f415fd3c6c764cf3dd273bb9e9c5 } +// Tuinity end diff --git a/src/main/java/net/minecraft/server/network/LoginListener.java b/src/main/java/net/minecraft/server/network/LoginListener.java -index c67b94840e4c967baebf6eb351df15f0e4ead4be..ed836462123efc6903e406fa926e55e1cedddb95 100644 +index 5b69126142140c7fc96435a4d246752581f47c33..25437a993c02379fa43e5d46159cd9ba2aebf10f 100644 --- a/src/main/java/net/minecraft/server/network/LoginListener.java +++ b/src/main/java/net/minecraft/server/network/LoginListener.java @@ -256,7 +256,7 @@ public class LoginListener implements PacketLoginInListener { @@ -304,10 +304,10 @@ index c67b94840e4c967baebf6eb351df15f0e4ead4be..ed836462123efc6903e406fa926e55e1 throw new IllegalStateException("Protocol error", cryptographyexception); } diff --git a/src/main/java/net/minecraft/server/network/ServerConnection.java b/src/main/java/net/minecraft/server/network/ServerConnection.java -index 69fc2789df88344587b6052f93661ed38f24a503..92836f1200461ba7fff2f8bcb5e1755ec9a0c9ce 100644 +index 06b0ed65905b9829564dfddd29012218af0f403d..69a982832489fc78fd46418341bdcba1e2be69e9 100644 --- a/src/main/java/net/minecraft/server/network/ServerConnection.java +++ b/src/main/java/net/minecraft/server/network/ServerConnection.java -@@ -87,6 +87,11 @@ public class ServerConnection { +@@ -96,6 +96,11 @@ public class ServerConnection { ServerConnection.LOGGER.info("Using default channel type"); } diff --git a/patches/Tuinity/patches/server/0052-Optimise-non-flush-packet-sending.patch b/patches/Tuinity/patches/server/0051-Optimise-non-flush-packet-sending.patch similarity index 97% rename from patches/Tuinity/patches/server/0052-Optimise-non-flush-packet-sending.patch rename to patches/Tuinity/patches/server/0051-Optimise-non-flush-packet-sending.patch index 09a0dc8e..31a1df88 100644 --- a/patches/Tuinity/patches/server/0052-Optimise-non-flush-packet-sending.patch +++ b/patches/Tuinity/patches/server/0051-Optimise-non-flush-packet-sending.patch @@ -20,7 +20,7 @@ up on this optimisation before he came along. Locally this patch drops the entity tracker tick by a full 1.5x. diff --git a/pom.xml b/pom.xml -index 84bedea0b7db6929698503f78ede260f6ea3d56e..de7da911833569c97b7f800a43ee7354d19677e2 100644 +index fa4d7b90b1c0b3b8235c3e3c36046dc8a13378fc..642ee96ead8176f5c5a811946b050f4fa5dab6e2 100644 --- a/pom.xml +++ b/pom.xml @@ -50,6 +50,13 @@ @@ -37,7 +37,7 @@ index 84bedea0b7db6929698503f78ede260f6ea3d56e..de7da911833569c97b7f800a43ee7354 io.papermc minecraft-server -@@ -112,11 +119,7 @@ +@@ -107,11 +114,7 @@ cleaner 1.0-SNAPSHOT @@ -51,7 +51,7 @@ index 84bedea0b7db6929698503f78ede260f6ea3d56e..de7da911833569c97b7f800a43ee7354 com.googlecode.json-simple diff --git a/src/main/java/net/minecraft/network/NetworkManager.java b/src/main/java/net/minecraft/network/NetworkManager.java -index 69bfe8d0a9cf745557c3e06141dec1ed3bb7d567..02ad0611836160a1d0ba6b26476e6bd336d55681 100644 +index 20cc362e23d8cb7f1df081d6251da76c5cf70ca8..29c64a80336e501857c9a92b0ce698563d1abc93 100644 --- a/src/main/java/net/minecraft/network/NetworkManager.java +++ b/src/main/java/net/minecraft/network/NetworkManager.java @@ -45,6 +45,8 @@ import org.apache.logging.log4j.Logger; diff --git a/patches/Tuinity/patches/server/0053-Do-not-retain-playerchunkmap-instance-in-light-threa.patch b/patches/Tuinity/patches/server/0052-Do-not-retain-playerchunkmap-instance-in-light-threa.patch similarity index 94% rename from patches/Tuinity/patches/server/0053-Do-not-retain-playerchunkmap-instance-in-light-threa.patch rename to patches/Tuinity/patches/server/0052-Do-not-retain-playerchunkmap-instance-in-light-threa.patch index 9ae212e3..776a495a 100644 --- a/patches/Tuinity/patches/server/0053-Do-not-retain-playerchunkmap-instance-in-light-threa.patch +++ b/patches/Tuinity/patches/server/0052-Do-not-retain-playerchunkmap-instance-in-light-threa.patch @@ -7,7 +7,7 @@ The executor returned is finalizable and of course that causes issues. diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index 7897fe870234ddef12926d855a3f060f9a72b2ba..82e28afc75d93c39d6b6517faf6430183cb675fb 100644 +index 42907d6a9f48818d758b5518c70440cd3c411eca..65de161c5bff3f56aba39bb4b22932f18dde8ad5 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -410,9 +410,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/patches/Tuinity/patches/server/0054-Do-not-load-chunks-during-a-crash-report.patch b/patches/Tuinity/patches/server/0053-Do-not-load-chunks-during-a-crash-report.patch similarity index 97% rename from patches/Tuinity/patches/server/0054-Do-not-load-chunks-during-a-crash-report.patch rename to patches/Tuinity/patches/server/0053-Do-not-load-chunks-during-a-crash-report.patch index 6a354916..a1354496 100644 --- a/patches/Tuinity/patches/server/0054-Do-not-load-chunks-during-a-crash-report.patch +++ b/patches/Tuinity/patches/server/0053-Do-not-load-chunks-during-a-crash-report.patch @@ -22,7 +22,7 @@ index e50731723d266ba65b2163df2e935afb8b013a93..a6736d15282715d920bab85eb92074cd } value.append("},"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 6e9cc608fd5038b9729eeb56f6014de3ce19809d..7a94e9efddbffca4627a0685e2baee8e7d6a3176 100644 +index e6ea687478a8f7282569a79e4fc29d967cbae7ef..12e17315040de205b51ec254cd919b51682c0442 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -720,6 +720,30 @@ public class CraftWorld implements World { diff --git a/patches/Tuinity/patches/server/0055-Improve-abnormal-server-shutdown-process.patch b/patches/Tuinity/patches/server/0054-Improve-abnormal-server-shutdown-process.patch similarity index 87% rename from patches/Tuinity/patches/server/0055-Improve-abnormal-server-shutdown-process.patch rename to patches/Tuinity/patches/server/0054-Improve-abnormal-server-shutdown-process.patch index 13a321ed..fff734b2 100644 --- a/patches/Tuinity/patches/server/0055-Improve-abnormal-server-shutdown-process.patch +++ b/patches/Tuinity/patches/server/0054-Improve-abnormal-server-shutdown-process.patch @@ -11,10 +11,10 @@ gui. It looks like during sigint shutdown there can be some deadlock between the server thread and awt shutdown thread here. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 078b8444d6f7c79d504805bce011b26a951b5fa3..2767a9369ddc922f1d9c7cb6c7acc8270545535a 100644 +index 2b9b5db565161884539175d975d9fd8253b8de7b..72d1c1202581abc284848000663ada5514cfcb15 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -878,10 +878,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant TicketType a(String s, Comparator comparator) { diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 77646973d1ab7c7573de7591c820291016b9c57a..e01e35cda7090adb27f044672f02a126e08b29d5 100644 +index 24661b4d02aa09d51610a8733657de67220ad5be..c9d6a01879ac813d1ba7b04f867f63a8ce362c91 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -515,6 +515,13 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/Tuinity/patches/server/0060-Optimise-WorldServer-notify.patch b/patches/Tuinity/patches/server/0059-Optimise-WorldServer-notify.patch similarity index 98% rename from patches/Tuinity/patches/server/0060-Optimise-WorldServer-notify.patch rename to patches/Tuinity/patches/server/0059-Optimise-WorldServer-notify.patch index 1c4b4fad..cb9b9d37 100644 --- a/patches/Tuinity/patches/server/0060-Optimise-WorldServer-notify.patch +++ b/patches/Tuinity/patches/server/0059-Optimise-WorldServer-notify.patch @@ -8,7 +8,7 @@ Instead, only iterate over navigators in the current region that are eligible for repathing. diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index e30995df572df6135e159d34cd7646fd08db4a5a..b48d419f82f0d9df1f8848d95066bad7e8e5629a 100644 +index a8cda86d5ed830266082c34e2aaa0ca186284eef..0b1ba6ecec65b03986fc2cd61fc4e4f9bc21e0cf 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -353,17 +353,82 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -111,7 +111,7 @@ index e30995df572df6135e159d34cd7646fd08db4a5a..b48d419f82f0d9df1f8848d95066bad7 } // Tuiniy end diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index e01e35cda7090adb27f044672f02a126e08b29d5..87d80b32465da84c8cc807511a3fff0aa3ad4654 100644 +index c9d6a01879ac813d1ba7b04f867f63a8ce362c91..2d1e202a1a85149187fadc0c314d871191781198 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -1085,6 +1085,15 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/Tuinity/patches/server/0061-Actually-unload-POI-data.patch b/patches/Tuinity/patches/server/0060-Actually-unload-POI-data.patch similarity index 99% rename from patches/Tuinity/patches/server/0061-Actually-unload-POI-data.patch rename to patches/Tuinity/patches/server/0060-Actually-unload-POI-data.patch index 9e9cfac1..4e1fdaa6 100644 --- a/patches/Tuinity/patches/server/0061-Actually-unload-POI-data.patch +++ b/patches/Tuinity/patches/server/0060-Actually-unload-POI-data.patch @@ -25,7 +25,7 @@ index 4ee7070364a8989eece4fa4237b529926821f9c9..f22ab98d2e250081df8949be8a997370 this.a(Long.MAX_VALUE, i, j, flag); } diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index b48d419f82f0d9df1f8848d95066bad7e8e5629a..7136e2adc5844280471fd392a3d49da7295ef006 100644 +index 0b1ba6ecec65b03986fc2cd61fc4e4f9bc21e0cf..cfa5c9bdc9176ab2eb45187c70e13dc2c5a85d9f 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -982,6 +982,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { diff --git a/patches/Tuinity/patches/server/0062-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/Tuinity/patches/server/0061-Send-full-pos-packets-for-hard-colliding-entities.patch similarity index 100% rename from patches/Tuinity/patches/server/0062-Send-full-pos-packets-for-hard-colliding-entities.patch rename to patches/Tuinity/patches/server/0061-Send-full-pos-packets-for-hard-colliding-entities.patch diff --git a/patches/Tuinity/patches/server/0063-Fix-chunks-refusing-to-unload-at-low-TPS.patch b/patches/Tuinity/patches/server/0062-Fix-chunks-refusing-to-unload-at-low-TPS.patch similarity index 88% rename from patches/Tuinity/patches/server/0063-Fix-chunks-refusing-to-unload-at-low-TPS.patch rename to patches/Tuinity/patches/server/0062-Fix-chunks-refusing-to-unload-at-low-TPS.patch index b72bc269..a6a41b35 100644 --- a/patches/Tuinity/patches/server/0063-Fix-chunks-refusing-to-unload-at-low-TPS.patch +++ b/patches/Tuinity/patches/server/0062-Fix-chunks-refusing-to-unload-at-low-TPS.patch @@ -10,10 +10,10 @@ chunk future to complete. We can simply schedule to the immediate executor to get this effect, rather than the main mailbox. diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index 7136e2adc5844280471fd392a3d49da7295ef006..ece674f47c034e38b2fe9acff6b471f2301a6570 100644 +index cfa5c9bdc9176ab2eb45187c70e13dc2c5a85d9f..2bb030e72ef2fc22bf9fe85e79c2d6aca2fc67a4 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -@@ -1649,9 +1649,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1657,9 +1657,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { chunk.B(); return chunk; }); diff --git a/patches/Tuinity/patches/server/0064-Fix-incorrect-isRealPlayer-init.patch b/patches/Tuinity/patches/server/0063-Fix-incorrect-isRealPlayer-init.patch similarity index 95% rename from patches/Tuinity/patches/server/0064-Fix-incorrect-isRealPlayer-init.patch rename to patches/Tuinity/patches/server/0063-Fix-incorrect-isRealPlayer-init.patch index 81c450ba..6ee2cb49 100644 --- a/patches/Tuinity/patches/server/0064-Fix-incorrect-isRealPlayer-init.patch +++ b/patches/Tuinity/patches/server/0063-Fix-incorrect-isRealPlayer-init.patch @@ -9,7 +9,7 @@ paper placed their logic. So it wont correctly set in this case. Fix by moving it to a different place. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 9c0f92652acae204a2f0ef321b8039c5b6a0d966..8a33ccf37bfce3e0961ea43be3842b2397a933fb 100644 +index f1412d559e3aacda675d98ac9da4aec2b9ceb92f..132443d009ab8feb63d860868edd2fd6a4c9c23e 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -179,6 +179,7 @@ public abstract class PlayerList { diff --git a/patches/Tuinity/patches/server/0065-Do-not-run-raytrace-logic-for-AIR.patch b/patches/Tuinity/patches/server/0064-Do-not-run-raytrace-logic-for-AIR.patch similarity index 100% rename from patches/Tuinity/patches/server/0065-Do-not-run-raytrace-logic-for-AIR.patch rename to patches/Tuinity/patches/server/0064-Do-not-run-raytrace-logic-for-AIR.patch diff --git a/patches/Tuinity/patches/server/0066-Make-entity-tracker-use-highest-range-of-passengers.patch b/patches/Tuinity/patches/server/0065-Make-entity-tracker-use-highest-range-of-passengers.patch similarity index 93% rename from patches/Tuinity/patches/server/0066-Make-entity-tracker-use-highest-range-of-passengers.patch rename to patches/Tuinity/patches/server/0065-Make-entity-tracker-use-highest-range-of-passengers.patch index 14a6f01d..7766723a 100644 --- a/patches/Tuinity/patches/server/0066-Make-entity-tracker-use-highest-range-of-passengers.patch +++ b/patches/Tuinity/patches/server/0065-Make-entity-tracker-use-highest-range-of-passengers.patch @@ -8,7 +8,7 @@ just so players riding horses or whatever can be seen at the configured player range. diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index ece674f47c034e38b2fe9acff6b471f2301a6570..7a9cb2d44cb09746ff5bf1579a09fc95b9e7f9a5 100644 +index 2bb030e72ef2fc22bf9fe85e79c2d6aca2fc67a4..934d27104919a4151a4e0b0a8082a6e91b66d012 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -217,7 +217,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -20,7 +20,7 @@ index ece674f47c034e38b2fe9acff6b471f2301a6570..7a9cb2d44cb09746ff5bf1579a09fc95 private int convertSpigotRangeToVanilla(final int vanilla) { return MinecraftServer.getServer().applyTrackingRangeScale(vanilla); -@@ -2694,7 +2694,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -2702,7 +2702,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially int j = entity.getEntityType().getChunkRange() * 16; j = org.spigotmc.TrackingRange.getEntityTrackingRange(entity, j); // Paper @@ -30,7 +30,7 @@ index ece674f47c034e38b2fe9acff6b471f2301a6570..7a9cb2d44cb09746ff5bf1579a09fc95 } } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 275df19f44da1a05f60b190994d4a0f9d6c21b18..feab0ae1930b5271fe0d06a40c180317dcbc9d1d 100644 +index 505340573c584c5c1970cc2b910af0a3f368fa3c..6b6abf401cc7c7c79ffb472c35550596fc8e55b5 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -317,8 +317,21 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne diff --git a/patches/Tuinity/patches/server/0067-Do-not-allow-the-server-to-unload-chunks-at-request-.patch b/patches/Tuinity/patches/server/0066-Do-not-allow-the-server-to-unload-chunks-at-request-.patch similarity index 100% rename from patches/Tuinity/patches/server/0067-Do-not-allow-the-server-to-unload-chunks-at-request-.patch rename to patches/Tuinity/patches/server/0066-Do-not-allow-the-server-to-unload-chunks-at-request-.patch diff --git a/patches/Tuinity/patches/server/0068-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/Tuinity/patches/server/0067-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch similarity index 93% rename from patches/Tuinity/patches/server/0068-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch rename to patches/Tuinity/patches/server/0067-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch index 36517591..caa57450 100644 --- a/patches/Tuinity/patches/server/0068-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch +++ b/patches/Tuinity/patches/server/0067-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch @@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/ state desync POV because the TE is getting unloaded anyways. diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index f7eb6e920c9c1f26845bec58d5b9e3641303b677..b7eb11ee5a5922612fd051e7397327111a8e3125 100644 +index 89bd6b1c98e64b0db98d1abc21f308147a8eb6a9..922e1c48580943d9322c72f5445da39c2bc6c173 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -1718,6 +1718,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -1742,6 +1742,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.playerConnection.sendPacket(new PacketPlayOutCloseWindow(this.activeContainer.windowId)); this.o(); } @@ -31,7 +31,7 @@ index f7eb6e920c9c1f26845bec58d5b9e3641303b677..b7eb11ee5a5922612fd051e739732711 public void broadcastCarriedItem() { if (!this.e) { diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 87d80b32465da84c8cc807511a3fff0aa3ad4654..4a26578fe070c9eb6ede66071c700307accb5dbe 100644 +index 2d1e202a1a85149187fadc0c314d871191781198..a6c08e5b8f70a8a879a1055fc9e243d2f909b253 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -1908,10 +1908,14 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/Tuinity/patches/server/0069-Fix-NPE-in-pickup-logic-for-arrow.patch b/patches/Tuinity/patches/server/0068-Fix-NPE-in-pickup-logic-for-arrow.patch similarity index 100% rename from patches/Tuinity/patches/server/0069-Fix-NPE-in-pickup-logic-for-arrow.patch rename to patches/Tuinity/patches/server/0068-Fix-NPE-in-pickup-logic-for-arrow.patch diff --git a/patches/Tuinity/patches/server/0070-Remove-chunk-lookup-lambda-allocation-from-counting-.patch b/patches/Tuinity/patches/server/0069-Remove-chunk-lookup-lambda-allocation-from-counting-.patch similarity index 100% rename from patches/Tuinity/patches/server/0070-Remove-chunk-lookup-lambda-allocation-from-counting-.patch rename to patches/Tuinity/patches/server/0069-Remove-chunk-lookup-lambda-allocation-from-counting-.patch diff --git a/patches/Tuinity/patches/server/0071-Optimise-snow-ice-in-chunk-ticking.patch b/patches/Tuinity/patches/server/0070-Optimise-snow-ice-in-chunk-ticking.patch similarity index 98% rename from patches/Tuinity/patches/server/0071-Optimise-snow-ice-in-chunk-ticking.patch rename to patches/Tuinity/patches/server/0070-Optimise-snow-ice-in-chunk-ticking.patch index 81aab1aa..467ac73d 100644 --- a/patches/Tuinity/patches/server/0071-Optimise-snow-ice-in-chunk-ticking.patch +++ b/patches/Tuinity/patches/server/0070-Optimise-snow-ice-in-chunk-ticking.patch @@ -11,7 +11,7 @@ the biome methods, removing the need to invoke a chunk lookup. diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 4a26578fe070c9eb6ede66071c700307accb5dbe..7074bc4abaddde7a5183b26fcee02d18dda974ad 100644 +index a6c08e5b8f70a8a879a1055fc9e243d2f909b253..d0cf0ee1233fc16b92c95a170057d947fb29fd9f 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -1198,6 +1198,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/Tuinity/patches/server/0072-Oprimise-map-impl-for-tracked-players.patch b/patches/Tuinity/patches/server/0071-Oprimise-map-impl-for-tracked-players.patch similarity index 91% rename from patches/Tuinity/patches/server/0072-Oprimise-map-impl-for-tracked-players.patch rename to patches/Tuinity/patches/server/0071-Oprimise-map-impl-for-tracked-players.patch index 106fbf51..7516df80 100644 --- a/patches/Tuinity/patches/server/0072-Oprimise-map-impl-for-tracked-players.patch +++ b/patches/Tuinity/patches/server/0071-Oprimise-map-impl-for-tracked-players.patch @@ -7,7 +7,7 @@ Reference2BooleanOpenHashMap is going to have better lookups than HashMap. diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index 7a9cb2d44cb09746ff5bf1579a09fc95b9e7f9a5..1e627159cbb35fac47d4d158299ec3da7c1f9bf5 100644 +index 934d27104919a4151a4e0b0a8082a6e91b66d012..8fac805c74d24a65c01007307ae21c8ac3d3db9b 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -103,6 +103,7 @@ import net.minecraft.world.level.storage.WorldDataServer; @@ -18,7 +18,7 @@ index 7a9cb2d44cb09746ff5bf1579a09fc95b9e7f9a5..1e627159cbb35fac47d4d158299ec3da import org.apache.commons.lang3.mutable.MutableBoolean; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -2543,7 +2544,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -2551,7 +2552,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially // Paper start // Replace trackedPlayers Set with a Map. The value is true until the player receives // their first update (which is forced to have absolute coordinates), false afterward. diff --git a/patches/Tuinity/patches/server/0073-Use-hash-table-for-maintaing-changed-block-set.patch b/patches/Tuinity/patches/server/0072-Use-hash-table-for-maintaing-changed-block-set.patch similarity index 100% rename from patches/Tuinity/patches/server/0073-Use-hash-table-for-maintaing-changed-block-set.patch rename to patches/Tuinity/patches/server/0072-Use-hash-table-for-maintaing-changed-block-set.patch diff --git a/patches/Tuinity/patches/server/0074-Replace-player-chunk-loader-system.patch b/patches/Tuinity/patches/server/0073-Replace-player-chunk-loader-system.patch similarity index 98% rename from patches/Tuinity/patches/server/0074-Replace-player-chunk-loader-system.patch rename to patches/Tuinity/patches/server/0073-Replace-player-chunk-loader-system.patch index b885a3d6..18938693 100644 --- a/patches/Tuinity/patches/server/0074-Replace-player-chunk-loader-system.patch +++ b/patches/Tuinity/patches/server/0073-Replace-player-chunk-loader-system.patch @@ -1062,7 +1062,7 @@ index edb9b246bf327f67a8500f77f81b46eb9e04c9b0..e1dc7c1025e19f7393a45719af8fe7aa public final String worldName; diff --git a/src/main/java/net/minecraft/network/NetworkManager.java b/src/main/java/net/minecraft/network/NetworkManager.java -index 02ad0611836160a1d0ba6b26476e6bd336d55681..0f8cbe1f656b46f71c6494bd2e0057be63017272 100644 +index 29c64a80336e501857c9a92b0ce698563d1abc93..b6c0ef0df93f0350fa70e857e06d79ae34d7d4b1 100644 --- a/src/main/java/net/minecraft/network/NetworkManager.java +++ b/src/main/java/net/minecraft/network/NetworkManager.java @@ -123,6 +123,28 @@ public class NetworkManager extends SimpleChannelInboundHandler> { @@ -1223,10 +1223,10 @@ index 9e96376a1d710c0ba7a763868b23fc586253e1a8..fe040615ff03478a20cdf8376f89a6b7 try { boolean execChunkTask = com.destroystokyo.paper.io.chunk.ChunkTaskManager.pollChunkWaitQueue() || ChunkProviderServer.this.world.asyncChunkTaskManager.pollNextChunkTask(); // Paper diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index b7eb11ee5a5922612fd051e7397327111a8e3125..fb61b6ac167b34486282a24e598020fb96081f28 100644 +index 922e1c48580943d9322c72f5445da39c2bc6c173..32e400632ec1e61374f772c6262580f84a5b2288 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -261,7 +261,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -262,7 +262,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks @@ -1265,7 +1265,7 @@ index a8edac296cbdb053bca4b56a890c3e9e5544d3a6..d9b134302f739efd93f50e93c8730b47 } } diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c87db53bb4 100644 +index 8fac805c74d24a65c01007307ae21c8ac3d3db9b..44b9175fe49e798dbcd7f0ddd71a889b360587b0 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -236,20 +236,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1430,7 +1430,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 PlayerChunk chunk = getUpdatingChunk(coord.pair()); return chunk != null && (chunk.isFullChunkReady()); } -@@ -1738,7 +1664,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1746,7 +1672,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { int k = this.viewDistance; this.viewDistance = j; @@ -1439,7 +1439,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 } } -@@ -1747,25 +1673,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1755,25 +1681,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { public final void setNoTickViewDistance(int viewDistance) { com.tuinity.tuinity.util.TickThread.softEnsureTickThread("Cannot update view distance off of the main thread"); // Tuinity viewDistance = viewDistance == -1 ? -1 : MathHelper.clamp(viewDistance, 2, 32); @@ -1467,7 +1467,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 if (entityplayer.world == this.world) { if (flag1 && !flag) { PlayerChunk playerchunk = this.getVisibleChunk(chunkcoordintpair.pair()); -@@ -2159,6 +2071,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -2167,6 +2079,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { }*/ // Paper end - replaced by distance map this.updateMaps(entityplayer); // Paper - distance maps @@ -1475,7 +1475,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 } -@@ -2167,7 +2080,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -2175,7 +2088,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - per player view distance // there can be potential desync with player's last mapped section and the view distance map, so use the // view distance map here. @@ -1484,7 +1484,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 if (inRange == null) { return Stream.empty(); -@@ -2183,8 +2096,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -2191,8 +2104,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { continue; } EntityPlayer player = (EntityPlayer)temp; @@ -1496,7 +1496,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 int distX = Math.abs(MCUtil.getCoordinateX(lastPosition) - chunkcoordintpair.x); int distZ = Math.abs(MCUtil.getCoordinateZ(lastPosition) - chunkcoordintpair.z); -@@ -2199,6 +2113,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -2207,6 +2121,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { continue; } EntityPlayer player = (EntityPlayer)temp; @@ -1504,7 +1504,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 players.add(player); } } -@@ -2417,6 +2332,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -2425,6 +2340,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially apacket[1] = new PacketPlayOutLightUpdate(chunk.getPos(), this.lightEngine, true); // Paper start - Fix MC-162253 @@ -1512,7 +1512,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 final int lightMask = getLightMask(chunk); int i = 1; for (int x = -1; x <= 1; x++) { -@@ -2441,10 +2357,12 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -2449,10 +2365,12 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially apacket[i] = new PacketPlayOutLightUpdate(new ChunkCoordIntPair(chunk.getPos().x + x, chunk.getPos().z + z), lightEngine, updateLightMask, 0, true); } } @@ -1527,7 +1527,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 int j = 1; for (int x = -1; x <= 1; x++) { -@@ -2469,6 +2387,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -2477,6 +2395,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially entityplayer.playerConnection.sendPacket(packet); } } @@ -1535,7 +1535,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 // Paper end - Fix MC-162253 entityplayer.a(chunk.getPos(), apacket[0], apacket[1]); -@@ -2645,7 +2564,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -2653,7 +2572,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially double vec3d_dy = entityplayer.locY() - this.tracker.locY(); double vec3d_dz = entityplayer.locZ() - this.tracker.locZ(); // Paper end - remove allocation of Vec3D here @@ -1544,7 +1544,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 boolean flag = vec3d_dx >= (double) (-i) && vec3d_dx <= (double) i && vec3d_dz >= (double) (-i) && vec3d_dz <= (double) i && this.tracker.a(entityplayer); // Paper - remove allocation of Vec3D here if (flag) { -@@ -2655,7 +2574,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially +@@ -2663,7 +2582,7 @@ Sections go from 0..16. Now whenever a section is not empty, it can potentially ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(this.tracker.chunkX, this.tracker.chunkZ); PlayerChunk playerchunk = PlayerChunkMap.this.getVisibleChunk(chunkcoordintpair.pair()); @@ -1554,7 +1554,7 @@ index 1e627159cbb35fac47d4d158299ec3da7c1f9bf5..d7eede51f1c4ebbe8e00b16efd6331c8 } } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 8a33ccf37bfce3e0961ea43be3842b2397a933fb..76ba1e038fb68eafa2c2039fa1cdd74d060dcf9f 100644 +index 132443d009ab8feb63d860868edd2fd6a4c9c23e..ab113991486c913e0a05df1029571d3e920af9c7 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -270,7 +270,7 @@ public abstract class PlayerList { @@ -1648,10 +1648,10 @@ index f74685a7cdb905af8e9712ca8597e7ed3dc8b120..feedbd8c97c1b1c56eaff359e6a94069 double deltaZ = soundPos.getZ() - player.locZ(); double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index a802c45538943b570ca0daa3a40607dc80e696eb..af01f5d635eada7175b9d7fdb47a65530686a539 100644 +index dedcdba593d15b1e2f880ae9eaa00eb6edcd03cf..276b1f0c9c9af7db31fba9be0593ae9def540caf 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -606,7 +606,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -615,7 +615,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { this.notify(blockposition, iblockdata1, iblockdata, i); // Paper start - per player view distance - allow block updates for non-ticking chunks in player view distance // if copied from above @@ -1750,7 +1750,7 @@ index 3fe1508b091e1fd0325eae50138d02fa6445c9ff..a19a26a88f247d359354902efeece992 return new Vec3D((double) baseblockposition.getX() + 0.5D, (double) baseblockposition.getY() + 0.5D, (double) baseblockposition.getZ() + 0.5D); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 7a94e9efddbffca4627a0685e2baee8e7d6a3176..41ee7b1f2fe9a220abe1d96749887ad9babe9f95 100644 +index 12e17315040de205b51ec254cd919b51682c0442..3f9be0d2d6be83893b8835acfec93d2c1e28ed3d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -2701,14 +2701,14 @@ public class CraftWorld implements World { @@ -1795,10 +1795,10 @@ index 7a94e9efddbffca4627a0685e2baee8e7d6a3176..41ee7b1f2fe9a220abe1d96749887ad9 // Spigot start private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot() diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f150ba393bc62e52840e6ebbf3d7696b670ff7e4..51d68fc13fcb8c30c10e21063f4d658f403df8ce 100644 +index 34395248e3daea47178cb40aad53680fbce73600..f82fb89e30e30681b2052d1c6a2f24428d6fbfc7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2262,15 +2262,70 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2260,15 +2260,70 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/patches/Tuinity/patches/server/0075-Optimise-general-POI-access.patch b/patches/Tuinity/patches/server/0074-Optimise-general-POI-access.patch similarity index 100% rename from patches/Tuinity/patches/server/0075-Optimise-general-POI-access.patch rename to patches/Tuinity/patches/server/0074-Optimise-general-POI-access.patch diff --git a/patches/Tuinity/patches/server/0076-Be-aware-of-entity-teleports-when-chunk-checking-ent.patch b/patches/Tuinity/patches/server/0075-Be-aware-of-entity-teleports-when-chunk-checking-ent.patch similarity index 96% rename from patches/Tuinity/patches/server/0076-Be-aware-of-entity-teleports-when-chunk-checking-ent.patch rename to patches/Tuinity/patches/server/0075-Be-aware-of-entity-teleports-when-chunk-checking-ent.patch index 89a53ac6..7b200e12 100644 --- a/patches/Tuinity/patches/server/0076-Be-aware-of-entity-teleports-when-chunk-checking-ent.patch +++ b/patches/Tuinity/patches/server/0075-Be-aware-of-entity-teleports-when-chunk-checking-ent.patch @@ -8,7 +8,7 @@ that occured from the getChunkAt call, we would either add to the wrong chunk or add to both chunks! not good. diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 7074bc4abaddde7a5183b26fcee02d18dda974ad..a8a2c29874e95dc08b85eb41882fc947108fbe5b 100644 +index d0cf0ee1233fc16b92c95a170057d947fb29fd9f..6fc215df5ed3aa6ef0c23a57e8444602ff9309e8 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -1572,7 +1572,35 @@ public class WorldServer extends World implements GeneratorAccessSeed { diff --git a/patches/Tuinity/patches/server/0077-Custom-table-implementation-for-blockstate-state-loo.patch b/patches/Tuinity/patches/server/0076-Custom-table-implementation-for-blockstate-state-loo.patch similarity index 100% rename from patches/Tuinity/patches/server/0077-Custom-table-implementation-for-blockstate-state-loo.patch rename to patches/Tuinity/patches/server/0076-Custom-table-implementation-for-blockstate-state-loo.patch diff --git a/patches/Tuinity/patches/server/0078-Do-not-update-TE-s-in-generating-chunks.patch b/patches/Tuinity/patches/server/0077-Do-not-update-TE-s-in-generating-chunks.patch similarity index 100% rename from patches/Tuinity/patches/server/0078-Do-not-update-TE-s-in-generating-chunks.patch rename to patches/Tuinity/patches/server/0077-Do-not-update-TE-s-in-generating-chunks.patch diff --git a/patches/Tuinity/patches/server/0079-Stop-large-move-vectors-in-player-packet-handling-fr.patch b/patches/Tuinity/patches/server/0078-Stop-large-move-vectors-in-player-packet-handling-fr.patch similarity index 97% rename from patches/Tuinity/patches/server/0079-Stop-large-move-vectors-in-player-packet-handling-fr.patch rename to patches/Tuinity/patches/server/0078-Stop-large-move-vectors-in-player-packet-handling-fr.patch index 5ca7a57d..3e18caaf 100644 --- a/patches/Tuinity/patches/server/0079-Stop-large-move-vectors-in-player-packet-handling-fr.patch +++ b/patches/Tuinity/patches/server/0078-Stop-large-move-vectors-in-player-packet-handling-fr.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Stop large move vectors in player packet handling from Looks like we need to check three vectors, not two. fun. diff --git a/src/main/java/net/minecraft/server/network/PlayerConnection.java b/src/main/java/net/minecraft/server/network/PlayerConnection.java -index ba8aa5dc5263e7efaddd6c7642abf39382b62a82..e0c606bb6ecf23f2118a65775c05b437a09826d3 100644 +index ba63cc4bff4a8614a25b1576ea2c8f838cb34e19..64fe0acfccd50465c5fe8c49346a6db2b830155e 100644 --- a/src/main/java/net/minecraft/server/network/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/network/PlayerConnection.java @@ -542,6 +542,12 @@ public class PlayerConnection implements PacketListenerPlayIn { diff --git a/patches/Tuinity/patches/server/0080-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch b/patches/Tuinity/patches/server/0079-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch similarity index 93% rename from patches/Tuinity/patches/server/0080-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch rename to patches/Tuinity/patches/server/0079-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch index 0668acfb..44218c42 100644 --- a/patches/Tuinity/patches/server/0080-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch +++ b/patches/Tuinity/patches/server/0079-Don-t-read-neighbour-chunk-data-off-disk-when-conver.patch @@ -8,7 +8,7 @@ Lighting is purged on update anyways, so let's not add more into the conversion process diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java b/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java -index 3c532d3996dfc734ec07181701280b6072bff55f..8c4e87b9404cfe2fedd0c345983f64cad16f32a0 100644 +index dd8c307bdd5ad2927734eb098413b0245e2c30a1..2d03f5710bcbb059e9ce4761e00349e527e937c0 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/IChunkLoader.java @@ -46,6 +46,7 @@ public class IChunkLoader implements AutoCloseable { diff --git a/patches/Tuinity/patches/server/0081-Do-not-copy-visible-chunks.patch b/patches/Tuinity/patches/server/0080-Do-not-copy-visible-chunks.patch similarity index 97% rename from patches/Tuinity/patches/server/0081-Do-not-copy-visible-chunks.patch rename to patches/Tuinity/patches/server/0080-Do-not-copy-visible-chunks.patch index 65239b8d..d268fdd9 100644 --- a/patches/Tuinity/patches/server/0081-Do-not-copy-visible-chunks.patch +++ b/patches/Tuinity/patches/server/0080-Do-not-copy-visible-chunks.patch @@ -22,7 +22,7 @@ index 848eb25ed0640db61a0f28bc26ddabd0444e9ed4..ec2b9995f1bf0f6cf029df7bfac526c2 continue; } diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..b28995ecfd7f45e6b6197be96c418aa0d05d3383 100644 +index 44b9175fe49e798dbcd7f0ddd71a889b360587b0..33429be7da4d4c2b2469b8140e46e66d9921652c 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -116,8 +116,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -156,7 +156,7 @@ index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..b28995ecfd7f45e6b6197be96c418aa0 this.updatingChunksModified = false; return true; -@@ -1701,7 +1671,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1709,7 +1679,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } public int d() { @@ -166,7 +166,7 @@ index d7eede51f1c4ebbe8e00b16efd6331c87db53bb4..b28995ecfd7f45e6b6197be96c418aa0 protected PlayerChunkMap.a e() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 41ee7b1f2fe9a220abe1d96749887ad9babe9f95..02807cc1fe14e747a7c18edf0fcdc38630cc4e9f 100644 +index 3f9be0d2d6be83893b8835acfec93d2c1e28ed3d..4f296f09562fb269db4137efd325e2c258f4b90b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -298,7 +298,7 @@ public class CraftWorld implements World { diff --git a/patches/Tuinity/patches/server/0082-Correctly-handle-recursion-for-chunkholder-updates.patch b/patches/Tuinity/patches/server/0081-Correctly-handle-recursion-for-chunkholder-updates.patch similarity index 100% rename from patches/Tuinity/patches/server/0082-Correctly-handle-recursion-for-chunkholder-updates.patch rename to patches/Tuinity/patches/server/0081-Correctly-handle-recursion-for-chunkholder-updates.patch diff --git a/patches/Tuinity/patches/server/0083-Replace-ticket-level-propagator.patch b/patches/Tuinity/patches/server/0082-Replace-ticket-level-propagator.patch similarity index 100% rename from patches/Tuinity/patches/server/0083-Replace-ticket-level-propagator.patch rename to patches/Tuinity/patches/server/0082-Replace-ticket-level-propagator.patch diff --git a/patches/api/0001-Modify-POM.patch b/patches/api/0001-Modify-POM.patch index 4558565e..eace81d3 100644 --- a/patches/api/0001-Modify-POM.patch +++ b/patches/api/0001-Modify-POM.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Modify POM diff --git a/pom.xml b/pom.xml -index 4d826aa8ea1139e66514767da6ba17811f7ecc5c..0f456204857fc9dea93a7dd47189bb059d1712fc 100644 +index 6fd6066b16d4dbf8695be16ec8b2d135d4d04901..57f8d001e6a83ea6ada0fb820a4e5b25866c0edb 100644 --- a/pom.xml +++ b/pom.xml @@ -3,18 +3,18 @@ @@ -69,8 +69,8 @@ index 4d826aa8ea1139e66514767da6ba17811f7ecc5c..0f456204857fc9dea93a7dd47189bb05 + 1.28 compile - -@@ -129,7 +142,7 @@ + +@@ -148,7 +161,7 @@ org.slf4j slf4j-api @@ -79,7 +79,7 @@ index 4d826aa8ea1139e66514767da6ba17811f7ecc5c..0f456204857fc9dea93a7dd47189bb05 compile -@@ -155,12 +168,12 @@ +@@ -174,12 +187,12 @@ org.ow2.asm asm diff --git a/patches/api/0002-Yatopia-Config-Redirect-Config.patch b/patches/api/0002-Yatopia-Config-Redirect-Config.patch index 999258c1..b61363fc 100644 --- a/patches/api/0002-Yatopia-Config-Redirect-Config.patch +++ b/patches/api/0002-Yatopia-Config-Redirect-Config.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Yatopia Config & Redirect Config diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 0a3acc1aa156900aa2a6a5682ffb8c3dc25e7534..199d42622c2e891631c696a92df00abc6e6c3219 100644 +index 0f66655541dbb0dbb05a13a3612bb46cfb2b538a..a69bf7aae1e9d6b658b079431d23ca0f28c871d1 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1618,6 +1618,22 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/api/0003-Add-GameProfileLookupEvent.patch b/patches/api/0003-Add-GameProfileLookupEvent.patch index 89bd2c7a..7c123cd1 100644 --- a/patches/api/0003-Add-GameProfileLookupEvent.patch +++ b/patches/api/0003-Add-GameProfileLookupEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add GameProfileLookupEvent diff --git a/pom.xml b/pom.xml -index 0f456204857fc9dea93a7dd47189bb059d1712fc..57ab779204e6e98d52d4b21e6aad82c33ccc8958 100644 +index 57f8d001e6a83ea6ada0fb820a4e5b25866c0edb..f0ef93cb0c1d369265b2a6fc56c80f79d61d4ebc 100644 --- a/pom.xml +++ b/pom.xml @@ -43,6 +43,10 @@ diff --git a/patches/api/0004-Add-last-tick-time-API.patch b/patches/api/0004-Add-last-tick-time-API.patch index 8d3e43ed..94c196a4 100644 --- a/patches/api/0004-Add-last-tick-time-API.patch +++ b/patches/api/0004-Add-last-tick-time-API.patch @@ -7,10 +7,10 @@ Original patch by: Co-authored-by: tr7zw diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index d754200879bda29d582998433e1a304a6988bbbb..d2d554492ec8fb2d253dd4855c31850bc380b218 100644 +index 8036c66af0bc6b11ffd0f716138901bcfea007e1..5c11d5203491d120356098c14c0069874b2eaadf 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java -@@ -1963,4 +1963,14 @@ public final class Bukkit { +@@ -1971,4 +1971,14 @@ public final class Bukkit { return server.isLagging(); } // Purpur end @@ -26,10 +26,10 @@ index d754200879bda29d582998433e1a304a6988bbbb..d2d554492ec8fb2d253dd4855c31850b + // Yatopia end } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 199d42622c2e891631c696a92df00abc6e6c3219..be7e1d46c52f8c94a56e31096d4fad81b70f4d61 100644 +index a69bf7aae1e9d6b658b079431d23ca0f28c871d1..423e94f44cd62eaa270ac44b1e3f49acc5fcce9d 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java -@@ -1754,4 +1754,24 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi +@@ -1760,4 +1760,24 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi */ boolean isLagging(); // Purpur end diff --git a/patches/api/0005-Add-NBT-API-as-a-first-class-lib.patch b/patches/api/0005-Add-NBT-API-as-a-first-class-lib.patch index dc0183b6..c0bdb307 100644 --- a/patches/api/0005-Add-NBT-API-as-a-first-class-lib.patch +++ b/patches/api/0005-Add-NBT-API-as-a-first-class-lib.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add NBT API as a first-class lib diff --git a/pom.xml b/pom.xml -index 57ab779204e6e98d52d4b21e6aad82c33ccc8958..cc3149a51f5780b73c11492e13dbe7eb86d83e6c 100644 +index f0ef93cb0c1d369265b2a6fc56c80f79d61d4ebc..a6a2fd50e685f64afecac5da6aaaad6227a3731e 100644 --- a/pom.xml +++ b/pom.xml @@ -47,6 +47,11 @@ @@ -20,7 +20,7 @@ index 57ab779204e6e98d52d4b21e6aad82c33ccc8958..cc3149a51f5780b73c11492e13dbe7eb -@@ -186,6 +191,11 @@ +@@ -205,6 +210,11 @@ asm-commons 9.1 @@ -32,7 +32,7 @@ index 57ab779204e6e98d52d4b21e6aad82c33ccc8958..cc3149a51f5780b73c11492e13dbe7eb -@@ -260,6 +270,12 @@ +@@ -279,6 +289,12 @@ ${project.build.directory}/dependency-reduced-pom.xml true @@ -129,10 +129,10 @@ index 7fa5242bd44c9b19648d79fa8fecbb7ee125288e..592c65017e601534dad56e988d096992 + // Yatopia end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 8c6d6399b8562631f391a5a18cbde7ae5ef4a46b..a95b3c5174bb1c48e9461568629ce83a0af008d3 100644 +index fceba6780a15c274c4689eccbeb6dfb2eee25ed9..1ba63c21245c4d4b9326b89ac83add9481fec243 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -1487,4 +1487,42 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor +@@ -1548,4 +1548,42 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor return random.nextInt(unbreaking + 1) > 0; } // Purpur end diff --git a/patches/api/0008-Suspected-plugins-report.patch b/patches/api/0008-Suspected-plugins-report.patch index e694b67b..668e29d7 100644 --- a/patches/api/0008-Suspected-plugins-report.patch +++ b/patches/api/0008-Suspected-plugins-report.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Suspected plugins report Added "Suspected Plugins" to Watchdog, crash reports and exception messages diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -index 26685f59b235ea5b4c4fb7ae21acb5149edaa2b3..02c20a33161094b08dc2ae9353c0504561b0b452 100644 +index d1c35e4cf778070f8d18bbe0af8d423334c6dfbf..d87c8e97a4a73f8df1f5badc7bdfea18a54e406b 100644 --- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java -@@ -560,7 +560,11 @@ public final class SimplePluginManager implements PluginManager { +@@ -577,7 +577,11 @@ public final class SimplePluginManager implements PluginManager { // Paper start private void handlePluginException(String msg, Throwable ex, Plugin plugin) { @@ -22,7 +22,7 @@ index 26685f59b235ea5b4c4fb7ae21acb5149edaa2b3..02c20a33161094b08dc2ae9353c05045 callEvent(new ServerExceptionEvent(new ServerPluginEnableDisableException(msg, ex, plugin))); } // Paper end -@@ -621,7 +625,11 @@ public final class SimplePluginManager implements PluginManager { +@@ -638,7 +642,11 @@ public final class SimplePluginManager implements PluginManager { } catch (Throwable ex) { // Paper start - error reporting String msg = "Could not pass event " + event.getEventName() + " to " + registration.getPlugin().getDescription().getFullName(); @@ -35,7 +35,7 @@ index 26685f59b235ea5b4c4fb7ae21acb5149edaa2b3..02c20a33161094b08dc2ae9353c05045 if (!(event instanceof ServerExceptionEvent)) { // We don't want to cause an endless event loop callEvent(new ServerExceptionEvent(new ServerEventException(msg, ex, registration.getPlugin(), registration.getListener(), event))); } -@@ -905,4 +913,10 @@ public final class SimplePluginManager implements PluginManager { +@@ -922,4 +930,10 @@ public final class SimplePluginManager implements PluginManager { } // Paper end @@ -60,10 +60,10 @@ index 04fa3991f6ce4e9dad804f28fc6c947695857089..cb11eab6e13ed1c395b8f7db033c9a28 } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 384edf9890dfbd1cddfdcac4db1ebe9a4d761f78..7c0c63c3f5734d59aa8b57fe3eb3c1fe0e137f12 100644 +index b622cedeeee017f042bcf92485d81832030a8030..f1d3042e7f224059547ac840524cae5dd80ecd8b 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -@@ -379,7 +379,11 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -369,7 +369,11 @@ public final class JavaPluginLoader implements PluginLoader { try { jPlugin.setEnabled(true); } catch (Throwable ex) { @@ -76,7 +76,7 @@ index 384edf9890dfbd1cddfdcac4db1ebe9a4d761f78..7c0c63c3f5734d59aa8b57fe3eb3c1fe // Paper start - Disable plugins that fail to load server.getPluginManager().disablePlugin(jPlugin, true); // Paper - close Classloader on disable - She's dead jim return; -@@ -414,7 +418,11 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -404,7 +408,11 @@ public final class JavaPluginLoader implements PluginLoader { try { jPlugin.setEnabled(false); } catch (Throwable ex) { @@ -89,7 +89,7 @@ index 384edf9890dfbd1cddfdcac4db1ebe9a4d761f78..7c0c63c3f5734d59aa8b57fe3eb3c1fe } if (cloader instanceof PluginClassLoader) { -@@ -432,11 +440,20 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -428,11 +436,20 @@ public final class JavaPluginLoader implements PluginLoader { loader.close(); } } catch (IOException e) { @@ -111,10 +111,10 @@ index 384edf9890dfbd1cddfdcac4db1ebe9a4d761f78..7c0c63c3f5734d59aa8b57fe3eb3c1fe + // Yatopia end } diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -index 79d839034d38c941745c6b91f973f908d6cdb8ee..676e2311d6f75e690c0b814c253d91a9d00e4da7 100644 +index 6ced06643cd9740e2c62bc8f10d150a2f9a92e31..161263242860fbae7b05766f006a7a83df82fc03 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java -@@ -233,4 +233,13 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot +@@ -250,4 +250,13 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot '}'; } // Paper end diff --git a/patches/api/0009-java-11.patch b/patches/api/0009-java-11.patch index a1831efe..9c4dd00c 100644 --- a/patches/api/0009-java-11.patch +++ b/patches/api/0009-java-11.patch @@ -5,7 +5,7 @@ Subject: [PATCH] java 11 diff --git a/pom.xml b/pom.xml -index cc3149a51f5780b73c11492e13dbe7eb86d83e6c..6143478e7e4bfb12208b290b64eee0f95a84f445 100644 +index a6a2fd50e685f64afecac5da6aaaad6227a3731e..57ca52e776df7429497f25c90cf6550fa0c8ef9b 100644 --- a/pom.xml +++ b/pom.xml @@ -19,8 +19,8 @@ diff --git a/patches/server/0001-Modify-POM.patch b/patches/server/0001-Modify-POM.patch index ada8f241..6e4814f0 100644 --- a/patches/server/0001-Modify-POM.patch +++ b/patches/server/0001-Modify-POM.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Modify POM diff --git a/pom.xml b/pom.xml -index 6fe8dad8df109531f2b38fbfcb58b6807dbb8cf0..48c53278ab9a02c614219e87fbe0a52f2c322e96 100644 +index 5136762f8e95cb1ea2564b6801703fb6f019fbe1..d39821039daafb19f0efc7346011fdfcc1063236 100644 --- a/pom.xml +++ b/pom.xml @@ -1,11 +1,11 @@ @@ -76,7 +76,7 @@ index 6fe8dad8df109531f2b38fbfcb58b6807dbb8cf0..48c53278ab9a02c614219e87fbe0a52f runtime -@@ -182,6 +191,12 @@ +@@ -209,6 +218,12 @@ master-SNAPSHOT compile @@ -106,7 +106,7 @@ index 6fe8dad8df109531f2b38fbfcb58b6807dbb8cf0..48c53278ab9a02c614219e87fbe0a52f -@@ -190,19 +205,32 @@ +@@ -217,19 +232,32 @@ purpur-snapshots https://repo.pl3x.net/ diff --git a/patches/server/0002-Brandings.patch b/patches/server/0002-Brandings.patch index 249de365..e4d130fe 100644 --- a/patches/server/0002-Brandings.patch +++ b/patches/server/0002-Brandings.patch @@ -40,10 +40,10 @@ index e56ebeaaa12494817d31099eed54ef2c50b98b9e..eb0509386feb156ae9c8ca0eb25c0120 .completer(new ConsoleCommandCompleter(this.server)) .option(LineReader.Option.COMPLETE_IN_WORD, true); diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java -index 7e8654e4df61527f33d4fce2afdb14e29b90a4c2..a20f8edb8efe6ac3cc6aea1dc791145348bfce8a 100644 +index 5a228c14a6e6335399f3436419deb51420082ad2..629da7bf9d929fc50a57457c45fb2ce9e74e4f73 100644 --- a/src/main/java/net/pl3x/purpur/PurpurConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurConfig.java -@@ -185,7 +185,7 @@ public class PurpurConfig { +@@ -187,7 +187,7 @@ public class PurpurConfig { if (!TimingsManager.hiddenConfigs.contains("settings.seed.end-spike")) TimingsManager.hiddenConfigs.add("settings.seed.end-spike"); } @@ -53,10 +53,10 @@ index 7e8654e4df61527f33d4fce2afdb14e29b90a4c2..a20f8edb8efe6ac3cc6aea1dc7911453 serverModName = getString("settings.server-mod-name", serverModName); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index da33704efcce38a6c335adec0564cf7f826aa701..411a8d2ded345fd544b26d3ae86e871edcf7d891 100644 +index 560020bf1372f68186f78b53502e3d2c145ab098..3bf0e295f7e9a3593789f513863dabaf35f17281 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -232,7 +232,7 @@ import javax.annotation.Nullable; // Paper +@@ -230,7 +230,7 @@ import javax.annotation.Nullable; // Paper import javax.annotation.Nonnull; // Paper public final class CraftServer implements Server { @@ -66,10 +66,10 @@ index da33704efcce38a6c335adec0564cf7f826aa701..411a8d2ded345fd544b26d3ae86e871e private final String bukkitVersion = Versioning.getBukkitVersion(); private final Logger logger = Logger.getLogger("Minecraft"); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 17d0d0ec4e22ed8b344a2208925a2e9cba5dd58c..73d2287cc4b45b440612b863cea0ca5067e99ed9 100644 +index 8b344d69b9076e1bf2a5ba310ecf3f8ddd375fdc..05f6fe3db3fd6637e21066b174baef462557804a 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -276,7 +276,7 @@ public class Main { +@@ -288,7 +288,7 @@ public class Main { if (buildDate.before(deadline.getTime())) { // Paper start - This is some stupid bullshit System.err.println("*** Warning, you've not updated in a while! ***"); @@ -79,7 +79,7 @@ index 17d0d0ec4e22ed8b344a2208925a2e9cba5dd58c..73d2287cc4b45b440612b863cea0ca50 //Thread.sleep(TimeUnit.SECONDS.toMillis(20)); // Paper End diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index b05b6e911026b8b8ad2e12b7a6705364ec90769d..b6fadc977dfccd60c2e260afa1ae692f809594f0 100644 +index bfe4f7ed53620510b52d4f01c5ea2a3f726942d8..5e4f0a216919dc9e622ff2c4b9dd829cd2c71e46 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -397,7 +397,7 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/server/0003-Utilities.patch b/patches/server/0003-Utilities.patch index 823dbf43..1594246c 100644 --- a/patches/server/0003-Utilities.patch +++ b/patches/server/0003-Utilities.patch @@ -9,10 +9,10 @@ Co-authored-by: Mykyta Komarnytskyy Co-authored-by: Ivan Pekov diff --git a/pom.xml b/pom.xml -index 48c53278ab9a02c614219e87fbe0a52f2c322e96..3a05118d764a6a934b4f834c3080e4ed20c227e9 100644 +index d39821039daafb19f0efc7346011fdfcc1063236..9e078cfce61a4462cafdb69c1915b2555a4b4f27 100644 --- a/pom.xml +++ b/pom.xml -@@ -197,6 +197,12 @@ +@@ -224,6 +224,12 @@ commons-math3 3.6.1 diff --git a/patches/server/0005-Add-last-tick-time-API.patch b/patches/server/0005-Add-last-tick-time-API.patch index 7ac446da..83d77531 100644 --- a/patches/server/0005-Add-last-tick-time-API.patch +++ b/patches/server/0005-Add-last-tick-time-API.patch @@ -7,10 +7,10 @@ Original patch by: Co-authored-by: tr7zw diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7bba8508c22233ac524d782d159d97f6609748af..854dd6b63bdffa0d79befb36aa55bad408302283 100644 +index dd2f3d79693710ddb3c1d34dffdc7925260e5de5..779b59e6a2ca6bb6d4320c9181e13ed8508ae7ad 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1064,6 +1064,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java -index e72be36d860630afb879b40bf028c5e456169634..d2a9455c0e97a51dcf1513322c23e41d8253fbc2 100644 +index 9a008acd3e6dd5522d163dfbe09c611f6f717d4e..a088b8f84f01ce3863ae949f4cd3d7ae9589c27c 100644 --- a/src/main/java/de/minebench/origami/OrigamiConfig.java +++ b/src/main/java/de/minebench/origami/OrigamiConfig.java -@@ -127,6 +127,39 @@ public final class OrigamiConfig { +@@ -121,6 +121,39 @@ public final class OrigamiConfig { private void pigmenDontTargetUnlessHit() { pigmenDontTargetUnlessHit = getBoolean("pigmen.dont-target-unless-hit", pigmenDontTargetUnlessHit); } @@ -59,10 +59,10 @@ index e72be36d860630afb879b40bf028c5e456169634..d2a9455c0e97a51dcf1513322c23e41d } \ No newline at end of file diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 82af1ac4743e96f8934796359d30f8ee9426e8de..61b39dca71580ea07da32943efc6e1024067b1ee 100644 +index 53f43352a133ccb35216c4d5d85a4e16db170bc2..af2bd5fe40cb3c180a1f0c1c1d38eee820176ac7 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -3069,7 +3069,7 @@ public abstract class EntityLiving extends Entity { +@@ -3081,7 +3081,7 @@ public abstract class EntityLiving extends Entity { // Paper - end don't run getEntities if we're not going to use its result // Tuinity start - reduce memory allocation from collideNearby List list = com.tuinity.tuinity.util.CachedLists.getTempGetEntitiesList(); diff --git a/patches/server/0008-Add-NBT-API-as-a-first-class-lib.patch b/patches/server/0008-Add-NBT-API-as-a-first-class-lib.patch index f222fc9a..391fb510 100644 --- a/patches/server/0008-Add-NBT-API-as-a-first-class-lib.patch +++ b/patches/server/0008-Add-NBT-API-as-a-first-class-lib.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add NBT API as a first-class lib diff --git a/pom.xml b/pom.xml -index 3a05118d764a6a934b4f834c3080e4ed20c227e9..d0259f18488e1ecf0276865e0ff7958726a40033 100644 +index 9e078cfce61a4462cafdb69c1915b2555a4b4f27..3cfc312c3f4f5d30421e15977ef2dfeac0c3c841 100644 --- a/pom.xml +++ b/pom.xml -@@ -374,6 +374,10 @@ +@@ -427,6 +427,10 @@ net/minecraft/server/v${minecraft_version}/$2 true diff --git a/patches/server/0012-lithium-enum_values.patch b/patches/server/0012-lithium-enum_values.patch index 7b71cab2..df3517cd 100644 --- a/patches/server/0012-lithium-enum_values.patch +++ b/patches/server/0012-lithium-enum_values.patch @@ -65,10 +65,10 @@ index 8078e4f5b79eaada03508265ba6b81db636e822a..b2d26289a6f501b093ec229394f75864 }; diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 61b39dca71580ea07da32943efc6e1024067b1ee..1f477ee415c87131658fe03245b5eac737ffa612 100644 +index af2bd5fe40cb3c180a1f0c1c1d38eee820176ac7..56a5dce9d5a511e300232620e97c514e49399499 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java -@@ -2749,10 +2749,12 @@ public abstract class EntityLiving extends Entity { +@@ -2761,10 +2761,12 @@ public abstract class EntityLiving extends Entity { } diff --git a/patches/server/0014-lithium-HashedList.patch b/patches/server/0013-lithium-HashedList.patch similarity index 100% rename from patches/server/0014-lithium-HashedList.patch rename to patches/server/0013-lithium-HashedList.patch diff --git a/patches/server/0013-lithium-MixinGoalSelector.patch b/patches/server/0013-lithium-MixinGoalSelector.patch deleted file mode 100644 index f63cccc9..00000000 --- a/patches/server/0013-lithium-MixinGoalSelector.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: JellySquid -Date: Mon, 11 May 2020 22:07:17 +0200 -Subject: [PATCH] lithium MixinGoalSelector - -Only replaces the set type, might want to also port the logic rewrite in the future - -Original code by JellySquid, licensed under GNU Lesser General Public License v3.0 -you can find the original code on https://github.com/CaffeineMC/lithium-fabric/ (Yarn mappings) - -diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java -index 02e8288473138dcea008d6157318758e8d7ee3be..10611b8c72b0c0c3202e9ae5b956974ec1a37aa3 100644 ---- a/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java -+++ b/src/main/java/net/minecraft/world/entity/ai/goal/PathfinderGoalSelector.java -@@ -12,6 +12,7 @@ import java.util.stream.Stream; - import net.minecraft.util.profiling.GameProfilerFiller; - import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; -+import it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet; // Yatopia - - public class PathfinderGoalSelector { - -@@ -28,7 +29,7 @@ public class PathfinderGoalSelector { - } - }; - private final Map c = new EnumMap(PathfinderGoal.Type.class); -- private final Set d = Sets.newLinkedHashSet(); public final Set getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public -+ private final Set d = new ObjectLinkedOpenHashSet<>();/* Yatopia better set */ public final Set getTasks() { return d; }// Paper - OBFHELPER // Paper - private -> public - private final Supplier e; - private final EnumSet f = EnumSet.noneOf(PathfinderGoal.Type.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be. - private final OptimizedSmallEnumSet goalTypes = new OptimizedSmallEnumSet<>(PathfinderGoal.Type.class); // Paper - remove streams from pathfindergoalselector diff --git a/patches/server/0015-Item-stuck-sleep-config.patch b/patches/server/0014-Item-stuck-sleep-config.patch similarity index 94% rename from patches/server/0015-Item-stuck-sleep-config.patch rename to patches/server/0014-Item-stuck-sleep-config.patch index 133cdbb4..491114bc 100644 --- a/patches/server/0015-Item-stuck-sleep-config.patch +++ b/patches/server/0014-Item-stuck-sleep-config.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Item stuck sleep config diff --git a/src/main/java/net/minecraft/world/entity/item/EntityItem.java b/src/main/java/net/minecraft/world/entity/item/EntityItem.java -index e4525a934cc1b189f80fc7eb8aad5b6d326e05fd..42231c9d9fabc68a36d0c81def2ee436a457903c 100644 +index 51663e58def93cc38157a99069db86603faf4c0a..e5d84a285e143cf278b33b579b6874b2bb5f3517 100644 --- a/src/main/java/net/minecraft/world/entity/item/EntityItem.java +++ b/src/main/java/net/minecraft/world/entity/item/EntityItem.java @@ -115,7 +115,7 @@ public class EntityItem extends Entity { diff --git a/patches/server/0016-Option-for-simpler-Villagers.patch b/patches/server/0015-Option-for-simpler-Villagers.patch similarity index 100% rename from patches/server/0016-Option-for-simpler-Villagers.patch rename to patches/server/0015-Option-for-simpler-Villagers.patch diff --git a/patches/server/0017-Heavily-optimize-furnance-fuel-and-recipe-lookups.patch b/patches/server/0016-Heavily-optimize-furnance-fuel-and-recipe-lookups.patch similarity index 100% rename from patches/server/0017-Heavily-optimize-furnance-fuel-and-recipe-lookups.patch rename to patches/server/0016-Heavily-optimize-furnance-fuel-and-recipe-lookups.patch diff --git a/patches/server/0018-Optimize-TileEntity-load-unload.patch b/patches/server/0017-Optimize-TileEntity-load-unload.patch similarity index 90% rename from patches/server/0018-Optimize-TileEntity-load-unload.patch rename to patches/server/0017-Optimize-TileEntity-load-unload.patch index af3c3b71..293e6e86 100644 --- a/patches/server/0018-Optimize-TileEntity-load-unload.patch +++ b/patches/server/0017-Optimize-TileEntity-load-unload.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize TileEntity load/unload diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index e6daeb25aecc1759b505a2ad74a6e32d89597fd8..886c6321cfa13bc514c8cd80111326dfbe4c0b70 100644 +index b38ae7942cb1c99ed3d0046a7b813da428d0867c..c3ae27ed4b1cc7ffb36560112459b0746095befd 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -105,8 +105,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { +@@ -106,8 +106,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable { public static final ResourceKey THE_END = ResourceKey.a(IRegistry.L, new MinecraftKey("the_end")); private static final EnumDirection[] a = EnumDirection.values(); //public final List tileEntityList = Lists.newArrayList(); // Paper - remove unused list diff --git a/patches/server/0019-Global-Eula-file.patch b/patches/server/0018-Global-Eula-file.patch similarity index 100% rename from patches/server/0019-Global-Eula-file.patch rename to patches/server/0018-Global-Eula-file.patch diff --git a/patches/server/0020-Redirect-Configs.patch b/patches/server/0019-Redirect-Configs.patch similarity index 91% rename from patches/server/0020-Redirect-Configs.patch rename to patches/server/0019-Redirect-Configs.patch index 77b686df..7745b0a0 100644 --- a/patches/server/0020-Redirect-Configs.patch +++ b/patches/server/0019-Redirect-Configs.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Redirect Configs diff --git a/src/main/java/de/minebench/origami/OrigamiConfig.java b/src/main/java/de/minebench/origami/OrigamiConfig.java -index d2a9455c0e97a51dcf1513322c23e41d8253fbc2..0a78932219f8b45e55fbdd1d3d1c3cb7ece6dd82 100644 +index a088b8f84f01ce3863ae949f4cd3d7ae9589c27c..4ff5d3d45c1055af148e34d6bfe645a6c3809b89 100644 --- a/src/main/java/de/minebench/origami/OrigamiConfig.java +++ b/src/main/java/de/minebench/origami/OrigamiConfig.java @@ -20,6 +20,8 @@ public final class OrigamiConfig { @@ -39,7 +39,7 @@ index d2a9455c0e97a51dcf1513322c23e41d8253fbc2..0a78932219f8b45e55fbdd1d3d1c3cb7 for (final Method method : clazz.getDeclaredMethods()) { if (method.getReturnType() != void.class || method.getParameterCount() != 0 || diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 1bbedddf940bd3be281ab2572256b3d1de9b266d..bb8022ace764bbfcc434c193c7fa97c5e1da4000 100644 +index 2d41e3b6e4b6e14470a2d22a482e345f882b6bcd..e57efc3900530899d81b3a42a7d38e7ac601f29f 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -236,7 +236,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer @@ -52,10 +52,10 @@ index 1bbedddf940bd3be281ab2572256b3d1de9b266d..bb8022ace764bbfcc434c193c7fa97c5 this.setAllowFlight(dedicatedserverproperties.allowFlight); this.setResourcePack(dedicatedserverproperties.resourcePack, this.ba()); diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java -index 86912aeec22feb7c519ede370651f292ec5a01da..b7b8c48b47552555553deeaae2d873c80c4255dd 100644 +index 8a08cd35c4645ef83aa26cbfde1c583b123e2c6a..18a5c114bdcde9ab2e66d024d4f0365c2d480ab3 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java -@@ -304,7 +304,7 @@ public class Main { +@@ -316,7 +316,7 @@ public class Main { } // Paper end System.setProperty( "library.jansi.version", "Paper" ); // Paper - set meaningless jansi version to prevent git builds from crashing on Windows diff --git a/patches/server/0021-lithium-DataTrackerMixin.patch b/patches/server/0020-lithium-DataTrackerMixin.patch similarity index 100% rename from patches/server/0021-lithium-DataTrackerMixin.patch rename to patches/server/0020-lithium-DataTrackerMixin.patch diff --git a/patches/server/0022-Fix-lead-fall-dmg-config.patch b/patches/server/0021-Fix-lead-fall-dmg-config.patch similarity index 90% rename from patches/server/0022-Fix-lead-fall-dmg-config.patch rename to patches/server/0021-Fix-lead-fall-dmg-config.patch index 4229833e..ad33ef93 100644 --- a/patches/server/0022-Fix-lead-fall-dmg-config.patch +++ b/patches/server/0021-Fix-lead-fall-dmg-config.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix lead fall dmg config diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index eb04ed1d97deb075cc4dee22101d80755cba2c04..1f10c6c99d614ad4b18b6098955ec66d4a12a475 100644 +index 9ad284fd9d8df3dc3302eae0161c483f6a5f594b..314c9aadc70a10556e60ee921112f67cd1929968 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1427,6 +1427,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -1426,6 +1426,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne this.fallDistance = 0.0F; } else if (d0 < 0.0D) { this.fallDistance = (float) ((double) this.fallDistance - d0); diff --git a/patches/server/0023-Optimize-some-stuff-in-WorldServer-ticking.patch b/patches/server/0022-Optimize-some-stuff-in-WorldServer-ticking.patch similarity index 90% rename from patches/server/0023-Optimize-some-stuff-in-WorldServer-ticking.patch rename to patches/server/0022-Optimize-some-stuff-in-WorldServer-ticking.patch index 827c0bf1..8b2a2f31 100644 --- a/patches/server/0023-Optimize-some-stuff-in-WorldServer-ticking.patch +++ b/patches/server/0022-Optimize-some-stuff-in-WorldServer-ticking.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize some stuff in WorldServer ticking Replaced some streams and some array lists with glue lists diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index a76559900487772b564018ac88d7204842e85ca1..36681f5860bbafff24ca72ddecb832605c5dd940 100644 +index 7955f847dccf100488f348a1afad4e3ad6be9733..7d2d2790979ef6f31a75e9cf29cc402c4d50a3ef 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java -@@ -1007,12 +1007,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1024,12 +1024,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.i, this.thunderLevel)); } // */ @@ -34,7 +34,7 @@ index a76559900487772b564018ac88d7204842e85ca1..36681f5860bbafff24ca72ddecb83260 if (flag != this.isRaining()) { // Only send weather packets to those affected for (int idx = 0; idx < this.players.size(); ++idx) { -@@ -1027,11 +1036,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1044,11 +1053,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } // CraftBukkit end @@ -48,7 +48,7 @@ index a76559900487772b564018ac88d7204842e85ca1..36681f5860bbafff24ca72ddecb83260 long l = this.worldData.getDayTime() + 24000L; TimeSkipEvent event = new TimeSkipEvent(this.getWorld(), TimeSkipEvent.SkipReason.NIGHT_SKIP, (l - l % 24000L) - this.getDayTime()); if (this.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE)) { -@@ -1236,9 +1243,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1253,9 +1260,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { } private void wakeupPlayers() { @@ -60,7 +60,7 @@ index a76559900487772b564018ac88d7204842e85ca1..36681f5860bbafff24ca72ddecb83260 } // Paper start - optimise random block ticking -@@ -2066,8 +2073,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -2083,8 +2090,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { // Spigot start if ( entity instanceof EntityHuman ) { @@ -71,7 +71,7 @@ index a76559900487772b564018ac88d7204842e85ca1..36681f5860bbafff24ca72ddecb83260 for (Object o : worldData.data.values() ) { if ( o instanceof WorldMap ) -@@ -2084,7 +2092,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -2101,7 +2109,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } } diff --git a/patches/server/0024-Optimize-BehaviorController.patch b/patches/server/0023-Optimize-BehaviorController.patch similarity index 100% rename from patches/server/0024-Optimize-BehaviorController.patch rename to patches/server/0023-Optimize-BehaviorController.patch diff --git a/patches/server/0025-Add-timings-for-Pathfinder.patch b/patches/server/0024-Add-timings-for-Pathfinder.patch similarity index 100% rename from patches/server/0025-Add-timings-for-Pathfinder.patch rename to patches/server/0024-Add-timings-for-Pathfinder.patch diff --git a/patches/server/0026-Highly-optimize-VillagePlace-filtering.patch b/patches/server/0025-Highly-optimize-VillagePlace-filtering.patch similarity index 98% rename from patches/server/0026-Highly-optimize-VillagePlace-filtering.patch rename to patches/server/0025-Highly-optimize-VillagePlace-filtering.patch index 3e374ea8..8aa0dcd3 100644 --- a/patches/server/0026-Highly-optimize-VillagePlace-filtering.patch +++ b/patches/server/0025-Highly-optimize-VillagePlace-filtering.patch @@ -67,7 +67,7 @@ index 0000000000000000000000000000000000000000..e647624f4c9afe8bc603792ad88c807e + } +} diff --git a/src/main/java/net/minecraft/core/BlockPosition.java b/src/main/java/net/minecraft/core/BlockPosition.java -index 9a446a77dd9dbf5fa6f6fe763c4586cc377980d6..21ed288b5d0e7416fb6c5ec7d3112281ab805c0b 100644 +index 17d63cd4ca152adc66ffe9ffd3227a0770738a29..963c1c56732d8c44d9abc1a04cf9fd6f1cc1224d 100644 --- a/src/main/java/net/minecraft/core/BlockPosition.java +++ b/src/main/java/net/minecraft/core/BlockPosition.java @@ -347,6 +347,16 @@ public class BlockPosition extends BaseBlockPosition { @@ -297,10 +297,10 @@ index 41ffad7cbb6c77713736f37b3728b201d315f6d4..866e9a434423702d2edaf9b52fa0e621 return true; } diff --git a/src/main/java/net/minecraft/world/entity/animal/EntityBee.java b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java -index c39a7a6d7f391debd632a199eeec8ded6189ad76..052960fde2318495e68dd3ea97b987e01e8c5547 100644 +index e425e093c233a21e5ef457e3a94defe8b74261d2..56189617dd49e62a57bf3f9050711dc0dea46b2a 100644 --- a/src/main/java/net/minecraft/world/entity/animal/EntityBee.java +++ b/src/main/java/net/minecraft/world/entity/animal/EntityBee.java -@@ -857,15 +857,19 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB +@@ -856,15 +856,19 @@ public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityB private List j() { BlockPosition blockposition = EntityBee.this.getChunkCoordinates(); VillagePlace villageplace = ((WorldServer) EntityBee.this.world).y(); diff --git a/patches/server/0027-Nuke-streams-off-BlockPosition.patch b/patches/server/0026-Nuke-streams-off-BlockPosition.patch similarity index 90% rename from patches/server/0027-Nuke-streams-off-BlockPosition.patch rename to patches/server/0026-Nuke-streams-off-BlockPosition.patch index 0b88c7ba..0040413d 100644 --- a/patches/server/0027-Nuke-streams-off-BlockPosition.patch +++ b/patches/server/0026-Nuke-streams-off-BlockPosition.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Nuke streams off BlockPosition diff --git a/src/main/java/net/minecraft/core/BlockPosition.java b/src/main/java/net/minecraft/core/BlockPosition.java -index 21ed288b5d0e7416fb6c5ec7d3112281ab805c0b..04d8ef920afd473c8218e2065d3fe9cc57543d37 100644 +index 963c1c56732d8c44d9abc1a04cf9fd6f1cc1224d..092de56e31257c1817a04cc9fc2f9c300bbfa058 100644 --- a/src/main/java/net/minecraft/core/BlockPosition.java +++ b/src/main/java/net/minecraft/core/BlockPosition.java @@ -324,7 +324,15 @@ public class BlockPosition extends BaseBlockPosition { @@ -26,7 +26,7 @@ index 21ed288b5d0e7416fb6c5ec7d3112281ab805c0b..04d8ef920afd473c8218e2065d3fe9cc public static Stream b(BlockPosition blockposition, int i, int j, int k) { diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java -index 760370c3920b89469a6c79f062777c42726cd59e..b3f0111247e1629377052aebf7e621e6fe59d197 100644 +index d894e7f16d232596ec308f3de3ea5da410588cbe..81cf123cf445716ecaa8496b56b763cb4ae02d68 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBase.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBase.java @@ -735,6 +735,7 @@ public abstract class BlockBase { diff --git a/patches/server/0028-Nuke-streams-off-SectionPosition.patch b/patches/server/0027-Nuke-streams-off-SectionPosition.patch similarity index 100% rename from patches/server/0028-Nuke-streams-off-SectionPosition.patch rename to patches/server/0027-Nuke-streams-off-SectionPosition.patch diff --git a/patches/server/0029-Stop-wasting-resources-on-JsonList-get.patch b/patches/server/0028-Stop-wasting-resources-on-JsonList-get.patch similarity index 97% rename from patches/server/0029-Stop-wasting-resources-on-JsonList-get.patch rename to patches/server/0028-Stop-wasting-resources-on-JsonList-get.patch index b7a4c98f..d10055d0 100644 --- a/patches/server/0029-Stop-wasting-resources-on-JsonList-get.patch +++ b/patches/server/0028-Stop-wasting-resources-on-JsonList-get.patch @@ -55,7 +55,7 @@ index c960852dc60d0598012c5eef0d139fe38bde63fb..96fbb1a3d216302aa937e07bf88fdb19 Throwable throwable = null; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 5764a8ff2b63c59ae07b86c3e4f9a2a9b9129089..38e5d8fbe422c31058779a57c41447bd5ef0ad4b 100644 +index 4aa61fe614d3bb830570af8e6702686f89aa79c3..8fc60257b14657b7e27023801581fc64749175d4 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -740,6 +740,7 @@ public abstract class PlayerList { diff --git a/patches/server/0030-Fix-LightEngineThreaded-memory-leak.patch b/patches/server/0029-Fix-LightEngineThreaded-memory-leak.patch similarity index 90% rename from patches/server/0030-Fix-LightEngineThreaded-memory-leak.patch rename to patches/server/0029-Fix-LightEngineThreaded-memory-leak.patch index 2b067aad..caacdfa5 100644 --- a/patches/server/0030-Fix-LightEngineThreaded-memory-leak.patch +++ b/patches/server/0029-Fix-LightEngineThreaded-memory-leak.patch @@ -18,10 +18,10 @@ index 76ac408021c5124fd634682cba97dc63392642f5..b8f8fe2ed501efdccc0398fdf9923191 return this.size == 0 && this.pendingTasks.isEmpty(); } diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 36681f5860bbafff24ca72ddecb832605c5dd940..de1afd9b68fb6781f907bcfdbeeef2af470990ed 100644 +index 7d2d2790979ef6f31a75e9cf29cc402c4d50a3ef..aacf99c418b692fa9e29c00ad449b0c8c8c9ef71 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java -@@ -2052,6 +2052,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -2069,6 +2069,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } // Paper end diff --git a/patches/server/0031-Shutdown-Bootstrap-thread-pool.patch b/patches/server/0030-Shutdown-Bootstrap-thread-pool.patch similarity index 100% rename from patches/server/0031-Shutdown-Bootstrap-thread-pool.patch rename to patches/server/0030-Shutdown-Bootstrap-thread-pool.patch diff --git a/patches/server/0032-Optimize-Villagers.patch b/patches/server/0031-Optimize-Villagers.patch similarity index 100% rename from patches/server/0032-Optimize-Villagers.patch rename to patches/server/0031-Optimize-Villagers.patch diff --git a/patches/server/0033-Optimize-whitelist-command-for-multiple-additions-re.patch b/patches/server/0032-Optimize-whitelist-command-for-multiple-additions-re.patch similarity index 96% rename from patches/server/0033-Optimize-whitelist-command-for-multiple-additions-re.patch rename to patches/server/0032-Optimize-whitelist-command-for-multiple-additions-re.patch index 7b1ca1fd..69985794 100644 --- a/patches/server/0033-Optimize-whitelist-command-for-multiple-additions-re.patch +++ b/patches/server/0032-Optimize-whitelist-command-for-multiple-additions-re.patch @@ -10,10 +10,10 @@ added. These changes aim to reduce that load whenever you are using the /whitelist command. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 854dd6b63bdffa0d79befb36aa55bad408302283..fb8c99ba46fe883a67598de313767be0cb2ca12b 100644 +index 779b59e6a2ca6bb6d4320c9181e13ed8508ae7ad..3d0bdea2cd8e22736f2e640433a2360259847e8a 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -2117,6 +2117,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Co-authored-by: ishland diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 26fff0540e3d8863e83b0a60df2205422d50f1e1..dbfa9584c11296bf78afef52c2d0c5e682961761 100644 +index 677f866dfaab653b05c693663adaeb2465117a55..51b9288856f7415cb854ca3fe32905d0c2886266 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java @@ -640,6 +640,7 @@ public final class ItemStack { diff --git a/patches/server/0041-Optimize-advancement-loading.patch b/patches/server/0040-Optimize-advancement-loading.patch similarity index 89% rename from patches/server/0041-Optimize-advancement-loading.patch rename to patches/server/0040-Optimize-advancement-loading.patch index 9796a603..5bc35fc5 100644 --- a/patches/server/0041-Optimize-advancement-loading.patch +++ b/patches/server/0040-Optimize-advancement-loading.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimize advancement loading Removed some object allocations and reduced loops diff --git a/src/main/java/net/minecraft/advancements/Advancement.java b/src/main/java/net/minecraft/advancements/Advancement.java -index 97479cacc2a3f7850df8647f78d7dbb5710ae27b..59cbb085bad5ab4d98d2a196c9b15dc58ce6d9df 100644 +index 23567430901284ab9d4d4873e53a1c8a06da6862..33771338bbf7e409da7210dc096c63b74a2d215f 100644 --- a/src/main/java/net/minecraft/advancements/Advancement.java +++ b/src/main/java/net/minecraft/advancements/Advancement.java -@@ -81,6 +81,7 @@ public class Advancement { +@@ -82,6 +82,7 @@ public class Advancement { return this.display; } @@ -18,10 +18,10 @@ index 97479cacc2a3f7850df8647f78d7dbb5710ae27b..59cbb085bad5ab4d98d2a196c9b15dc5 return this.rewards; } diff --git a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -index b81a0e1c3ff3d749b6bbd9efdbc7823d1c631b8e..3185d89d97823e85d2c3eb5236eb85f4e40b6067 100644 +index 4720644ae82f76f835f14c0b3a00e7b7874fb1e2..9d1879e2fd502c939b9f5caeab8a47ed9ced90d8 100644 --- a/src/main/java/net/minecraft/server/AdvancementDataPlayer.java +++ b/src/main/java/net/minecraft/server/AdvancementDataPlayer.java -@@ -179,11 +179,16 @@ public class AdvancementDataPlayer { +@@ -180,11 +180,16 @@ public class AdvancementDataPlayer { throw new JsonParseException("Found null for advancements"); } @@ -38,7 +38,7 @@ index b81a0e1c3ff3d749b6bbd9efdbc7823d1c631b8e..3185d89d97823e85d2c3eb5236eb85f4 Advancement advancement = advancementdataworld.a((MinecraftKey) entry.getKey()); if (advancement == null) { -@@ -221,11 +226,37 @@ public class AdvancementDataPlayer { +@@ -222,11 +227,37 @@ public class AdvancementDataPlayer { } } @@ -76,7 +76,7 @@ index b81a0e1c3ff3d749b6bbd9efdbc7823d1c631b8e..3185d89d97823e85d2c3eb5236eb85f4 public void b() { if (org.spigotmc.SpigotConfig.disableAdvancementSaving) return; // Spigot Map map = Maps.newHashMap(); -@@ -357,6 +388,11 @@ public class AdvancementDataPlayer { +@@ -365,6 +396,11 @@ public class AdvancementDataPlayer { AdvancementProgress advancementprogress = this.getProgress(advancement); if (!advancementprogress.isDone()) { @@ -88,7 +88,7 @@ index b81a0e1c3ff3d749b6bbd9efdbc7823d1c631b8e..3185d89d97823e85d2c3eb5236eb85f4 Iterator iterator = advancement.getCriteria().entrySet().iterator(); while (iterator.hasNext()) { -@@ -376,7 +412,7 @@ public class AdvancementDataPlayer { +@@ -384,7 +420,7 @@ public class AdvancementDataPlayer { } } @@ -97,7 +97,7 @@ index b81a0e1c3ff3d749b6bbd9efdbc7823d1c631b8e..3185d89d97823e85d2c3eb5236eb85f4 } private void d(Advancement advancement) { -@@ -471,6 +507,7 @@ public class AdvancementDataPlayer { +@@ -479,6 +515,7 @@ public class AdvancementDataPlayer { this.data.put(advancement, advancementprogress); } diff --git a/patches/server/0042-lithium-PerlinNoiseSamplerMixin.patch b/patches/server/0041-lithium-PerlinNoiseSamplerMixin.patch similarity index 100% rename from patches/server/0042-lithium-PerlinNoiseSamplerMixin.patch rename to patches/server/0041-lithium-PerlinNoiseSamplerMixin.patch diff --git a/patches/server/0043-lithium-VoronoiBiomeAccessTypeMixin.patch b/patches/server/0042-lithium-VoronoiBiomeAccessTypeMixin.patch similarity index 100% rename from patches/server/0043-lithium-VoronoiBiomeAccessTypeMixin.patch rename to patches/server/0042-lithium-VoronoiBiomeAccessTypeMixin.patch diff --git a/patches/server/0044-lithium-NoiseChunkGeneratorMixin.patch b/patches/server/0043-lithium-NoiseChunkGeneratorMixin.patch similarity index 100% rename from patches/server/0044-lithium-NoiseChunkGeneratorMixin.patch rename to patches/server/0043-lithium-NoiseChunkGeneratorMixin.patch diff --git a/patches/server/0045-lithium-reduce-allocations.patch b/patches/server/0044-lithium-reduce-allocations.patch similarity index 88% rename from patches/server/0045-lithium-reduce-allocations.patch rename to patches/server/0044-lithium-reduce-allocations.patch index 47371aba..15a6d131 100644 --- a/patches/server/0045-lithium-reduce-allocations.patch +++ b/patches/server/0044-lithium-reduce-allocations.patch @@ -11,10 +11,10 @@ Portions of this patch that were sourced from Lithium were remapped from Yarn ma Co-authored-by: Mykyta Komarnytskyy diff --git a/src/main/java/net/minecraft/world/level/block/BlockComposter.java b/src/main/java/net/minecraft/world/level/block/BlockComposter.java -index 802139cf4e15191be0e4afddda12a01079e9ce35..56fdcac84fe36e8770d2e1f04425abe151012644 100644 +index c0b235d5edf3cd14021696d1b4f76ce3de41f5d5..0b58efe27878f1a07579f2e02d3939edefb47933 100644 --- a/src/main/java/net/minecraft/world/level/block/BlockComposter.java +++ b/src/main/java/net/minecraft/world/level/block/BlockComposter.java -@@ -358,7 +358,7 @@ public class BlockComposter extends Block implements IInventoryHolder { +@@ -356,7 +356,7 @@ public class BlockComposter extends Block implements IInventoryHolder { @Override public int[] getSlotsForFace(EnumDirection enumdirection) { @@ -23,7 +23,7 @@ index 802139cf4e15191be0e4afddda12a01079e9ce35..56fdcac84fe36e8770d2e1f04425abe1 } @Override -@@ -408,7 +408,7 @@ public class BlockComposter extends Block implements IInventoryHolder { +@@ -406,7 +406,7 @@ public class BlockComposter extends Block implements IInventoryHolder { @Override public int[] getSlotsForFace(EnumDirection enumdirection) { @@ -32,7 +32,7 @@ index 802139cf4e15191be0e4afddda12a01079e9ce35..56fdcac84fe36e8770d2e1f04425abe1 } @Override -@@ -444,7 +444,7 @@ public class BlockComposter extends Block implements IInventoryHolder { +@@ -442,7 +442,7 @@ public class BlockComposter extends Block implements IInventoryHolder { @Override public int[] getSlotsForFace(EnumDirection enumdirection) { diff --git a/patches/server/0046-Smarter-statistics-ticking.patch b/patches/server/0045-Smarter-statistics-ticking.patch similarity index 94% rename from patches/server/0046-Smarter-statistics-ticking.patch rename to patches/server/0045-Smarter-statistics-ticking.patch index 04f894ad..14ba2353 100644 --- a/patches/server/0046-Smarter-statistics-ticking.patch +++ b/patches/server/0045-Smarter-statistics-ticking.patch @@ -8,10 +8,10 @@ In vanilla, statistics that count time spent for an action (i.e. time played or With an interval of 20, this patch saves roughly 3ms per tick on a server w/ 80 players online. diff --git a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -index 88f8bf070487e7e30d78240884cf1c065e932905..b1d21952cf41d9d8b93d92c4f12faaded41190bd 100644 +index 61feb098b0786d316f9d99eba305ca9244e299e5..40d56f2da4dd1dd387594ad0ce8cb5a4d8b6a033 100644 --- a/src/main/java/net/minecraft/world/entity/player/EntityHuman.java +++ b/src/main/java/net/minecraft/world/entity/player/EntityHuman.java -@@ -280,18 +280,23 @@ public abstract class EntityHuman extends EntityLiving { +@@ -279,18 +279,23 @@ public abstract class EntityHuman extends EntityLiving { this.p(); if (!this.world.isClientSide) { this.foodData.a(this); diff --git a/patches/server/0047-Configurable-criterion-triggers.patch b/patches/server/0046-Configurable-criterion-triggers.patch similarity index 91% rename from patches/server/0047-Configurable-criterion-triggers.patch rename to patches/server/0046-Configurable-criterion-triggers.patch index c58fe3fc..35bb820a 100644 --- a/patches/server/0047-Configurable-criterion-triggers.patch +++ b/patches/server/0046-Configurable-criterion-triggers.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Configurable criterion triggers This patch adds toggles for three criterion triggers that are called every tick. These can be very unnecessary, and especially in the case of CriterionTriggerEnterBlock, quite heavy. diff --git a/src/main/java/net/minecraft/server/level/EntityPlayer.java b/src/main/java/net/minecraft/server/level/EntityPlayer.java -index 4ec18d28c0022614b0ef6900774ddd4bda814308..f4b0bcf4e5fdfd4381e1410a929ed3a166ce4d00 100644 +index 96520df171fadbc90c130555bd0c7139579f73d8..313517288e6ab7888310462a69fb8771f6d9b17e 100644 --- a/src/main/java/net/minecraft/server/level/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/level/EntityPlayer.java -@@ -569,6 +569,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -577,6 +577,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @Override protected void a(IBlockData iblockdata) { @@ -17,7 +17,7 @@ index 4ec18d28c0022614b0ef6900774ddd4bda814308..f4b0bcf4e5fdfd4381e1410a929ed3a1 CriterionTriggers.d.a(this, iblockdata); } -@@ -899,7 +900,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { +@@ -907,7 +908,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.playerConnection.sendPacket(new PacketPlayOutExperience(this.exp, this.expTotal, this.expLevel)); } diff --git a/patches/server/0048-Configurable-BlockPhysicsEvent.patch b/patches/server/0047-Configurable-BlockPhysicsEvent.patch similarity index 94% rename from patches/server/0048-Configurable-BlockPhysicsEvent.patch rename to patches/server/0047-Configurable-BlockPhysicsEvent.patch index ea3b516f..acc9b539 100644 --- a/patches/server/0048-Configurable-BlockPhysicsEvent.patch +++ b/patches/server/0047-Configurable-BlockPhysicsEvent.patch @@ -8,10 +8,10 @@ Paper does alleviate this quite well by only firing if plugins are listening, bu This patch implements a hard toggle for the event. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index fb8c99ba46fe883a67598de313767be0cb2ca12b..a0298d1a6d08b915ea5a9d85f3e33f33d6e682fd 100644 +index 3d0bdea2cd8e22736f2e640433a2360259847e8a..3ee9bbe0dff3dd85abb69bd296dac779b2e548dc 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1546,7 +1546,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 13f9af375011fe6a7e96605105d147445d58d26f..c1fd0149e1c04f33911bef77afa5d1c7938a6048 100644 +index 1b5f387e5b62e341abd9ef17a72a836137b88c76..05989f600f06d940752bb1e4408f985550778d0f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -951,7 +951,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant> { @@ -75,10 +75,10 @@ index 71a000edfab27c9965d1929af78582821d5af97a..5c5ac70b4dae5d51303ab974261055aa LOGGER.error("Error whilst processing packet {} for {}[{}]", packet, networkmanager.getPlayer().getName(), networkmanager.getSocketAddress(), e); } else { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c1fd0149e1c04f33911bef77afa5d1c7938a6048..61d7004e51fcfb5568750665065261295cacd2f7 100644 +index 05989f600f06d940752bb1e4408f985550778d0f..c9a3a042a2cbe45e583f37814f0126617e0e69e1 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1168,7 +1168,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant { // CraftBukkit end @@ -226,7 +226,7 @@ index 1f10c6c99d614ad4b18b6098955ec66d4a12a475..5885704cba653d9e08291ee06ca3874a }); vec3d = this.a(enumdirection_enumaxis, blockutil_rectangle1); -@@ -3448,6 +3461,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -3447,6 +3460,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne } public boolean cl() { @@ -234,7 +234,7 @@ index 1f10c6c99d614ad4b18b6098955ec66d4a12a475..5885704cba653d9e08291ee06ca3874a boolean flag = this.au; this.au = false; -@@ -3651,7 +3665,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -3650,7 +3664,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne for (int i2 = k; i2 < l; ++i2) { for (int j2 = i1; j2 < j1; ++j2) { blockposition_mutableblockposition.d(l1, i2, j2); @@ -244,7 +244,7 @@ index 1f10c6c99d614ad4b18b6098955ec66d4a12a475..5885704cba653d9e08291ee06ca3874a if (fluid.a(tag)) { double d2 = (double) ((float) i2 + fluid.getHeight(this.world, blockposition_mutableblockposition)); diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54eb2f71df9 100644 +index 56a5dce9d5a511e300232620e97c514e49399499..0a6e6830a2cdaa5979d920c5c61a5d1eae8e6cc2 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -140,6 +140,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -282,7 +282,7 @@ index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54e int i = EnchantmentManager.a(Enchantments.FROST_WALKER, this); if (i > 0) { -@@ -1580,7 +1583,7 @@ public abstract class EntityLiving extends Entity { +@@ -1592,7 +1595,7 @@ public abstract class EntityLiving extends Entity { BlockPosition blockposition = this.getChunkCoordinates(); IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData(); @@ -291,7 +291,7 @@ index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54e this.world.setTypeAndData(blockposition, iblockdata, 3); flag = true; } -@@ -1785,12 +1788,12 @@ public abstract class EntityLiving extends Entity { +@@ -1797,12 +1800,12 @@ public abstract class EntityLiving extends Entity { // Airplane end public IBlockData ds() { @@ -306,7 +306,7 @@ index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54e if (iblockdata1.a(Blocks.LADDER) && iblockdata1.get(BlockLadder.FACING) == iblockdata.get(BlockTrapdoor.FACING)) { return true; -@@ -1837,7 +1840,7 @@ public abstract class EntityLiving extends Entity { +@@ -1849,7 +1852,7 @@ public abstract class EntityLiving extends Entity { int i = MathHelper.floor(this.locX()); int j = MathHelper.floor(this.locY() - 0.20000000298023224D); int k = MathHelper.floor(this.locZ()); @@ -315,7 +315,7 @@ index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54e if (!iblockdata.isAir()) { SoundEffectType soundeffecttype = iblockdata.getStepSound(); -@@ -2328,7 +2331,7 @@ public abstract class EntityLiving extends Entity { +@@ -2340,7 +2343,7 @@ public abstract class EntityLiving extends Entity { private void a(Entity entity) { Vec3D vec3d; @@ -324,7 +324,7 @@ index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54e vec3d = entity.b(this); } else { vec3d = new Vec3D(entity.locX(), entity.locY() + (double) entity.getHeight(), entity.locZ()); -@@ -2382,7 +2385,7 @@ public abstract class EntityLiving extends Entity { +@@ -2394,7 +2397,7 @@ public abstract class EntityLiving extends Entity { this.fallDistance = 0.0F; } @@ -333,7 +333,7 @@ index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54e double d1; float f; -@@ -2498,7 +2501,7 @@ public abstract class EntityLiving extends Entity { +@@ -2510,7 +2513,7 @@ public abstract class EntityLiving extends Entity { } } else { BlockPosition blockposition = this.as(); @@ -342,7 +342,7 @@ index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54e f = this.onGround ? f5 * 0.91F : 0.91F; Vec3D vec3d6 = this.a(vec3d, f5); -@@ -3563,7 +3566,7 @@ public abstract class EntityLiving extends Entity { +@@ -3581,7 +3584,7 @@ public abstract class EntityLiving extends Entity { while (!flag2 && blockposition.getY() > 0) { BlockPosition blockposition1 = blockposition.down(); @@ -351,7 +351,7 @@ index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54e if (iblockdata.getMaterial().isSolid()) { flag2 = true; -@@ -3658,7 +3661,7 @@ public abstract class EntityLiving extends Entity { +@@ -3693,7 +3696,7 @@ public abstract class EntityLiving extends Entity { this.stopRiding(); } @@ -360,7 +360,7 @@ index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54e if (iblockdata.getBlock() instanceof BlockBed) { this.world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockBed.OCCUPIED, true), 3); -@@ -3677,7 +3680,7 @@ public abstract class EntityLiving extends Entity { +@@ -3712,7 +3715,7 @@ public abstract class EntityLiving extends Entity { private boolean x() { return (Boolean) this.getBedPosition().map((blockposition) -> { @@ -369,7 +369,7 @@ index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54e }).orElse(false); } -@@ -3687,7 +3690,7 @@ public abstract class EntityLiving extends Entity { +@@ -3722,7 +3725,7 @@ public abstract class EntityLiving extends Entity { this.world.getClass(); optional.filter(world::isLoaded).ifPresent((blockposition) -> { @@ -379,10 +379,10 @@ index 1f477ee415c87131658fe03245b5eac737ffa612..cd4c380bec0eac231ca0f07420d4a54e if (iblockdata.getBlock() instanceof BlockBed) { this.world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockBed.OCCUPIED, false), 3); diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index a15e6a25a796b03fbd080ffb9abe13de2833c5d6..183c9fb583cbd5392cb2c0f708e2b47dae4f12ff 100644 +index eb6c4e3a98783a0a2f0d4e988efd6e326defc29b..b058c1fa8637b947e8e4a5009258cbee75f536c3 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -96,7 +96,9 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; +@@ -97,7 +97,9 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData; import org.bukkit.event.block.BlockPhysicsEvent; // CraftBukkit end diff --git a/patches/server/0062-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch b/patches/server/0061-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch similarity index 98% rename from patches/server/0062-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch rename to patches/server/0061-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch index c29df5d6..59807181 100644 --- a/patches/server/0062-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch +++ b/patches/server/0061-lithium-optimize-BlockPos.iterateOutwards-by-caching.patch @@ -140,7 +140,7 @@ index 0000000000000000000000000000000000000000..e2e4f7968a399b4641df07b2931fff6d +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/core/BlockPosition.java b/src/main/java/net/minecraft/core/BlockPosition.java -index 04d8ef920afd473c8218e2065d3fe9cc57543d37..83857b56935b69be371c8481e670ccb8942b394a 100644 +index 092de56e31257c1817a04cc9fc2f9c300bbfa058..bf2b1b19b7fa348c5fee61dd0e58144e2c06072f 100644 --- a/src/main/java/net/minecraft/core/BlockPosition.java +++ b/src/main/java/net/minecraft/core/BlockPosition.java @@ -18,10 +18,16 @@ import net.minecraft.world.phys.Vec3D; diff --git a/patches/server/0063-lithium-block.patch b/patches/server/0062-lithium-block.patch similarity index 100% rename from patches/server/0063-lithium-block.patch rename to patches/server/0062-lithium-block.patch diff --git a/patches/server/0064-lithium-entity.patch b/patches/server/0063-lithium-entity.patch similarity index 93% rename from patches/server/0064-lithium-entity.patch rename to patches/server/0063-lithium-entity.patch index af028d55..8d82ad24 100644 --- a/patches/server/0064-lithium-entity.patch +++ b/patches/server/0063-lithium-entity.patch @@ -6,7 +6,7 @@ Subject: [PATCH] lithium entity Co-authored-by: Hugo Planque diff --git a/src/main/java/net/minecraft/world/entity/EntityLiving.java b/src/main/java/net/minecraft/world/entity/EntityLiving.java -index cd4c380bec0eac231ca0f07420d4a54eb2f71df9..20991dcb5d715e63a7a981c8aa2b3b57a6e2138e 100644 +index 0a6e6830a2cdaa5979d920c5c61a5d1eae8e6cc2..8c29f1693de2e5019d931654e984110276211923 100644 --- a/src/main/java/net/minecraft/world/entity/EntityLiving.java +++ b/src/main/java/net/minecraft/world/entity/EntityLiving.java @@ -279,6 +279,9 @@ public abstract class EntityLiving extends Entity { @@ -30,7 +30,7 @@ index cd4c380bec0eac231ca0f07420d4a54eb2f71df9..20991dcb5d715e63a7a981c8aa2b3b57 this.ar = this.as; if (this.justCreated) { this.getBedPosition().ifPresent(this::a); -@@ -1788,7 +1795,24 @@ public abstract class EntityLiving extends Entity { +@@ -1800,7 +1807,24 @@ public abstract class EntityLiving extends Entity { // Airplane end public IBlockData ds() { diff --git a/patches/server/0065-lithium-shape.patch b/patches/server/0064-lithium-shape.patch similarity index 98% rename from patches/server/0065-lithium-shape.patch rename to patches/server/0064-lithium-shape.patch index fcbc025c..82a35a5a 100644 --- a/patches/server/0065-lithium-shape.patch +++ b/patches/server/0064-lithium-shape.patch @@ -270,10 +270,10 @@ index b95115aca72ba0cf6451096ddbd8b50a8f3bb5c6..0afb8c643cb3e5938e12183c6132797d int j = i - 1; diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 5885704cba653d9e08291ee06ca3874a875020d8..5e739c45c60df415e723beb901369ffa3f9528d7 100644 +index d7a046c793c90ba6bb73ed5f6359ed1ca79cfe13..aad482c4676282517ec1dcf9a81d2cfad5972a9c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2677,6 +2677,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne +@@ -2676,6 +2676,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne return this.isSneaking(); } @@ -282,7 +282,7 @@ index 5885704cba653d9e08291ee06ca3874a875020d8..5e739c45c60df415e723beb901369ffa return this.isSneaking(); } diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java -index 1a8e0850d318626b946bdc9f2366d279bff29324..2d49fdc8db8da93f9615473b9466b90bb09b8b35 100644 +index a835285d230ea0dffa1b28c2a7a006041f2e6b2a..ccb35c1ddbf83a7e644f88ed17b8881ff305685a 100644 --- a/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java @@ -54,6 +54,7 @@ import net.minecraft.world.phys.shapes.VoxelShape; diff --git a/patches/server/0066-lithium-skip-ticking-block-entities-that-are-doing-n.patch b/patches/server/0065-lithium-skip-ticking-block-entities-that-are-doing-n.patch similarity index 98% rename from patches/server/0066-lithium-skip-ticking-block-entities-that-are-doing-n.patch rename to patches/server/0065-lithium-skip-ticking-block-entities-that-are-doing-n.patch index 6ce57ad0..ebe45be9 100644 --- a/patches/server/0066-lithium-skip-ticking-block-entities-that-are-doing-n.patch +++ b/patches/server/0065-lithium-skip-ticking-block-entities-that-are-doing-n.patch @@ -621,10 +621,10 @@ index 0000000000000000000000000000000000000000..4e765ab19ffb300b6c810333b2dc7976 +} \ No newline at end of file diff --git a/src/main/java/net/minecraft/world/level/World.java b/src/main/java/net/minecraft/world/level/World.java -index 183c9fb583cbd5392cb2c0f708e2b47dae4f12ff..45b52e197961eab3d2f3cd704a79d1aabda58452 100644 +index b058c1fa8637b947e8e4a5009258cbee75f536c3..6dce1577a42585a415ea137336c7aa9be6e6a7ed 100644 --- a/src/main/java/net/minecraft/world/level/World.java +++ b/src/main/java/net/minecraft/world/level/World.java -@@ -97,8 +97,11 @@ import org.bukkit.event.block.BlockPhysicsEvent; +@@ -98,8 +98,11 @@ import org.bukkit.event.block.BlockPhysicsEvent; // CraftBukkit end import net.gegy1000.tictacs.NonBlockingWorldAccess; // Yatopia @@ -637,7 +637,7 @@ index 183c9fb583cbd5392cb2c0f708e2b47dae4f12ff..45b52e197961eab3d2f3cd704a79d1aa protected static final Logger LOGGER = LogManager.getLogger(); public static final Codec> f = MinecraftKey.a.xmap(ResourceKey.b(IRegistry.L), ResourceKey::a); -@@ -107,9 +110,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki +@@ -108,9 +111,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki public static final ResourceKey THE_END = ResourceKey.a(IRegistry.L, new MinecraftKey("the_end")); private static final EnumDirection[] a = EnumDirection.values(); //public final List tileEntityList = Lists.newArrayList(); // Paper - remove unused list @@ -656,7 +656,7 @@ index 183c9fb583cbd5392cb2c0f708e2b47dae4f12ff..45b52e197961eab3d2f3cd704a79d1aa public final Thread serverThread; private final boolean debugWorld; private int d; -@@ -368,6 +379,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki +@@ -378,6 +389,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime); this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); @@ -665,7 +665,7 @@ index 183c9fb583cbd5392cb2c0f708e2b47dae4f12ff..45b52e197961eab3d2f3cd704a79d1aa } // Paper start -@@ -1032,6 +1045,15 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki +@@ -1042,6 +1055,15 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki } @@ -681,7 +681,7 @@ index 183c9fb583cbd5392cb2c0f708e2b47dae4f12ff..45b52e197961eab3d2f3cd704a79d1aa public void tickBlockEntities() { GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); -@@ -1054,11 +1076,19 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki +@@ -1064,11 +1086,19 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki this.tickingTileEntities = true; // Spigot start @@ -701,7 +701,7 @@ index 183c9fb583cbd5392cb2c0f708e2b47dae4f12ff..45b52e197961eab3d2f3cd704a79d1aa // Spigot start if (tileentity == null) { getServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash"); -@@ -1096,8 +1126,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki +@@ -1106,8 +1136,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki throwable.printStackTrace(); getServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable))); // Paper end @@ -711,7 +711,7 @@ index 183c9fb583cbd5392cb2c0f708e2b47dae4f12ff..45b52e197961eab3d2f3cd704a79d1aa continue; // Paper end // Spigot start -@@ -1110,8 +1139,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki +@@ -1120,8 +1149,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable, NonBlocki if (tileentity.isRemoved()) { // Spigot start @@ -1000,7 +1000,7 @@ index 08759f461ec947c0d5655557f49d8717afee6f00..cdff01d4da417ef1be6238d3faaf464e ContainerUtil.b(nbttagcompound, this.items); int[] aint; diff --git a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java -index 111f62d0e5b40e945793b8f504f2c035c0884a6a..130ffed3827d3716430414976a0e4f591598586c 100644 +index cfabc9047cd3e972af84700725355d0fe149b221..4f5f050a947cd708ab375565192fde03ba79d7c4 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TileEntityChest.java @@ -33,14 +33,27 @@ import net.minecraft.world.level.block.Blocks; @@ -1011,7 +1011,7 @@ index 111f62d0e5b40e945793b8f504f2c035c0884a6a..130ffed3827d3716430414976a0e4f59 public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITickable - private NonNullList items; + private gg.airplane.structs.ItemListWithBitset items; // Airplane protected float a; + private float getAnimationAngle() { return a; } // Yatopia - OBFHELPER protected float b; @@ -1031,7 +1031,7 @@ index 111f62d0e5b40e945793b8f504f2c035c0884a6a..130ffed3827d3716430414976a0e4f59 // CraftBukkit start - add fields and methods public List transaction = new java.util.ArrayList(); -@@ -113,11 +126,27 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic +@@ -135,11 +148,27 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic } public void tick() { @@ -1059,7 +1059,7 @@ index 111f62d0e5b40e945793b8f504f2c035c0884a6a..130ffed3827d3716430414976a0e4f59 } public void doOpenLogic() { -@@ -223,6 +252,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic +@@ -245,6 +274,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic @Override public boolean setProperty(int i, int j) { @@ -1067,7 +1067,7 @@ index 111f62d0e5b40e945793b8f504f2c035c0884a6a..130ffed3827d3716430414976a0e4f59 if (i == 1) { this.viewingCount = j; return true; -@@ -254,7 +284,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic +@@ -276,7 +306,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic // CraftBukkit end this.onOpen(); } @@ -1076,7 +1076,7 @@ index 111f62d0e5b40e945793b8f504f2c035c0884a6a..130ffed3827d3716430414976a0e4f59 } @Override -@@ -275,6 +305,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic +@@ -297,6 +327,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic // CraftBukkit end this.onOpen(); } diff --git a/patches/server/0067-Fix-Log4j-Warning.patch b/patches/server/0066-Fix-Log4j-Warning.patch similarity index 100% rename from patches/server/0067-Fix-Log4j-Warning.patch rename to patches/server/0066-Fix-Log4j-Warning.patch diff --git a/patches/server/0068-C2ME-Port.patch b/patches/server/0067-C2ME-Port.patch similarity index 99% rename from patches/server/0068-C2ME-Port.patch rename to patches/server/0067-C2ME-Port.patch index a47b2877..343a8ed1 100644 --- a/patches/server/0068-C2ME-Port.patch +++ b/patches/server/0067-C2ME-Port.patch @@ -8,10 +8,10 @@ Port of https://github.com/YatopiaMC/C2ME-fabric Co-authored-by: Simon Gardling diff --git a/pom.xml b/pom.xml -index d0259f18488e1ecf0276865e0ff7958726a40033..f0a73238612327d71cf78801df816823d80893a0 100644 +index 3cfc312c3f4f5d30421e15977ef2dfeac0c3c841..e8884c5f79f0550dd479074f1b69e8b9f7b68784 100644 --- a/pom.xml +++ b/pom.xml -@@ -203,6 +203,12 @@ +@@ -230,6 +230,12 @@ commons-rng-core 1.3 @@ -37,7 +37,7 @@ index 06157bb07cce3ba24087ceaca7138b5609b37b5b..47f0604a891d46f688abd5daa6fb4de8 public IChunkAccess f() { for (int i = PlayerChunk.CHUNK_STATUSES.size() - 1; i >= 0; --i) { diff --git a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java -index e25476f6a9477447cc06f24ed05679326e83cd95..b77793771e8e264e90e09399e10246308ba1cb52 100644 +index 3c5e4abd104aa016e5cb8e248c4d6a5eff08a42e..9e0c082d276d1a13577bbf7183065cce3b837c66 100644 --- a/src/main/java/net/minecraft/server/level/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/level/PlayerChunkMap.java @@ -154,8 +154,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -84,7 +84,7 @@ index e25476f6a9477447cc06f24ed05679326e83cd95..b77793771e8e264e90e09399e1024630 return CompletableFuture.completedFuture(either); }, this.mainInvokingExecutor); diff --git a/src/main/java/net/minecraft/server/level/WorldServer.java b/src/main/java/net/minecraft/server/level/WorldServer.java -index 3068b307b7ad64f5add188e956d59a52126f332a..8892b54c85db83e3f5ad1ae26d3f23de754564f2 100644 +index 537c05601492306e7b37b11594f193c7c668e11b..46355a0956be3eb3fd5cf312caf079fbf5464d79 100644 --- a/src/main/java/net/minecraft/server/level/WorldServer.java +++ b/src/main/java/net/minecraft/server/level/WorldServer.java @@ -178,7 +178,17 @@ import org.bukkit.event.world.TimeSkipEvent; diff --git a/patches/server/0069-Multi-threaded-World-Upgrade.patch b/patches/server/0068-Multi-threaded-World-Upgrade.patch similarity index 94% rename from patches/server/0069-Multi-threaded-World-Upgrade.patch rename to patches/server/0068-Multi-threaded-World-Upgrade.patch index 13ad1080..0064b5fb 100644 --- a/patches/server/0069-Multi-threaded-World-Upgrade.patch +++ b/patches/server/0068-Multi-threaded-World-Upgrade.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Multi-threaded World Upgrade diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 6818f8496ab76ee6ffc747bd6848b43830ec8914..1fe2610ed0ddab1e203e273914c9325aec74e7c2 100644 +index 15b972b4a93b8fe3655acec47bc84b0f2c4620a6..67fdde82b7bff1b4973542acc4fe0d72f706d87e 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java -@@ -281,6 +281,8 @@ public class Main { +@@ -292,6 +292,8 @@ public class Main { WorldUpgrader worldupgrader = new WorldUpgrader(convertable_conversionsession, datafixer, immutableset, flag); IChatBaseComponent ichatbasecomponent = null; @@ -17,7 +17,7 @@ index 6818f8496ab76ee6ffc747bd6848b43830ec8914..1fe2610ed0ddab1e203e273914c9325a while (!worldupgrader.b()) { IChatBaseComponent ichatbasecomponent1 = worldupgrader.h(); -@@ -289,13 +291,16 @@ public class Main { +@@ -300,13 +302,16 @@ public class Main { Main.LOGGER.info(worldupgrader.h().getString()); } @@ -42,7 +42,7 @@ index 6818f8496ab76ee6ffc747bd6848b43830ec8914..1fe2610ed0ddab1e203e273914c9325a if (!booleansupplier.getAsBoolean()) { worldupgrader.a(); diff --git a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java -index 6725b31a5183d5af7f8f7566ed21eb61797ef4c9..f13e16aca89f5013ef316e7dbf3d4c67885e6f3e 100644 +index cb394ec310712cc97d65afe068284b277d7f0483..12370f64b3590faabeef6e03db09a57bc87bc2ef 100644 --- a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java +++ b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java @@ -33,6 +33,13 @@ import net.minecraft.world.level.storage.Convertable; @@ -71,7 +71,7 @@ index 6725b31a5183d5af7f8f7566ed21eb61797ef4c9..f13e16aca89f5013ef316e7dbf3d4c67 + private volatile long m; // Yatopia - int -> long private final Object2FloatMap> n = Object2FloatMaps.synchronize(new Object2FloatOpenCustomHashMap(SystemUtils.k())); // CraftBukkit private volatile IChatBaseComponent o = new ChatMessage("optimizeWorld.stage.counting"); - private static final Pattern p = Pattern.compile("^r\\.(-?[0-9]+)\\.(-?[0-9]+)\\.mca$"); + private static final Pattern p = Pattern.compile("^r\\.(-?[0-9]+)\\.(-?[0-9]+)\\.mca$"); public static final Pattern getRegionfileRegex() { return p; } // Paper - OBFHELPER @@ -117,6 +124,11 @@ public class WorldUpgrader { this.o = new ChatMessage("optimizeWorld.stage.upgrading"); diff --git a/patches/server/0070-lithium-MultiNoiseBiomeSourceMixin.patch b/patches/server/0069-lithium-MultiNoiseBiomeSourceMixin.patch similarity index 100% rename from patches/server/0070-lithium-MultiNoiseBiomeSourceMixin.patch rename to patches/server/0069-lithium-MultiNoiseBiomeSourceMixin.patch diff --git a/patches/server/0071-Force-world-save.patch b/patches/server/0070-Force-world-save.patch similarity index 100% rename from patches/server/0071-Force-world-save.patch rename to patches/server/0070-Force-world-save.patch diff --git a/patches/server/0071-java-11.patch b/patches/server/0071-java-11.patch new file mode 100644 index 00000000..214c1ecb --- /dev/null +++ b/patches/server/0071-java-11.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Simon Gardling +Date: Fri, 23 Apr 2021 11:11:20 -0400 +Subject: [PATCH] java 11 + + +diff --git a/pom.xml b/pom.xml +index e8884c5f79f0550dd479074f1b69e8b9f7b68784..dbabe103fecd075df7134619ff05e603b02e99ce 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -14,8 +14,8 @@ + git + 1.16.5 + 1_16_R3 +- 1.8 +- 1.8 ++ 11 ++ 11 + + + diff --git a/patches/server/0072-java-11.patch b/patches/server/0072-java-11.patch deleted file mode 100644 index 5e488cbd..00000000 --- a/patches/server/0072-java-11.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Simon Gardling -Date: Fri, 23 Apr 2021 11:11:20 -0400 -Subject: [PATCH] java 11 - - -diff --git a/pom.xml b/pom.xml -index f0a73238612327d71cf78801df816823d80893a0..57a87372c039fb410c97eaa00227b429b90da2b1 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -14,8 +14,8 @@ - git - 1.16.5 - 1_16_R3 -- 1.8 -- 1.8 -+ 11 -+ 11 - - - -diff --git a/src/main/java/io/papermc/paper/util/PaperJvmChecker.java b/src/main/java/io/papermc/paper/util/PaperJvmChecker.java -index c6ea429819c07e7f4bc257cad73463a030767825..3fdca3afeefdb7f850934f9b1b5312f8979b50f3 100644 ---- a/src/main/java/io/papermc/paper/util/PaperJvmChecker.java -+++ b/src/main/java/io/papermc/paper/util/PaperJvmChecker.java -@@ -28,21 +28,17 @@ public class PaperJvmChecker { - public static void checkJvm() { - if (getJvmVersion() < 11) { - final Logger logger = LogManager.getLogger(); -- logger.warn("************************************************************"); -- logger.warn("* WARNING - YOU ARE RUNNING AN OUTDATED VERSION OF JAVA."); -- logger.warn("* PAPER WILL STOP BEING COMPATIBLE WITH THIS VERSION OF"); -- logger.warn("* JAVA WHEN MINECRAFT 1.17 IS RELEASED."); -- logger.warn("*"); -- logger.warn("* Please update the version of Java you use to run Paper"); -- logger.warn("* to at least Java 11. When Paper for Minecraft 1.17 is"); -- logger.warn("* released support for versions of Java before 11 will"); -- logger.warn("* be dropped."); -- logger.warn("*"); -- logger.warn("* Current Java version: {}", System.getProperty("java.version")); -- logger.warn("*"); -- logger.warn("* Check this forum post for more information: "); -- logger.warn("* https://papermc.io/java11"); -- logger.warn("************************************************************"); -+ // Yatopia start - require java 11+ -+ // Note - no clue how someone would run a jar built for java 11 on a java version lower than 11, but doesn't hurt to update this warning I guess. -+ logger.fatal("************************************************************"); -+ logger.fatal("* ERROR - YOU ARE RUNNING AN OUTDATED VERSION OF JAVA."); -+ logger.fatal("* YOU NEED TO BE RUNNING JAVA 11 OR HIGHER"); -+ logger.fatal("* In order to achieve Yatopia's high performance,"); -+ logger.fatal("* Yatopia uses features only found in Java 11 or higher."); -+ logger.fatal("* If you do not know how to install Java 11 or have any other questions,"); -+ logger.fatal("* Join our discord server (https://discord.io/YatopiaMC) and ask for support in #yatopia-help"); -+ logger.fatal("************************************************************"); -+ // Yatopia end - } - } - } diff --git a/upstream/Airplane b/upstream/Airplane index fad74c21..636dbff0 160000 --- a/upstream/Airplane +++ b/upstream/Airplane @@ -1 +1 @@ -Subproject commit fad74c215f2c46b1a70ff67bbb1fa62b52a2fbed +Subproject commit 636dbff0fb95c8023821e658e0ab01a74cf5d9d0 diff --git a/upstream/Empirecraft b/upstream/Empirecraft index 87ceb204..9e2881e6 160000 --- a/upstream/Empirecraft +++ b/upstream/Empirecraft @@ -1 +1 @@ -Subproject commit 87ceb204670b2165a6c2aa89e3826a071c2c2d8e +Subproject commit 9e2881e606eacda8ec2b8527abd7d72d92f3e008 diff --git a/upstream/Origami b/upstream/Origami index 73ecdf19..4c0616dd 160000 --- a/upstream/Origami +++ b/upstream/Origami @@ -1 +1 @@ -Subproject commit 73ecdf191085c48db17fb9b1eddb59b7be12c446 +Subproject commit 4c0616dd1392083034f6dbd0213f53bc8e732897 diff --git a/upstream/Purpur b/upstream/Purpur index adfe5d35..adb0cafe 160000 --- a/upstream/Purpur +++ b/upstream/Purpur @@ -1 +1 @@ -Subproject commit adfe5d355fd5dc09cd6445eb0c239bebeadb2e2d +Subproject commit adb0cafe6448d82b79db8b7dc478df71e34c7bd8 diff --git a/upstream/Tuinity b/upstream/Tuinity index 13824732..f0e91a4a 160000 --- a/upstream/Tuinity +++ b/upstream/Tuinity @@ -1 +1 @@ -Subproject commit 13824732415ea2f97053f4b531fa602fb090df5e +Subproject commit f0e91a4ae9c511c116c859105d10b02dddbe4f71 diff --git a/upstreamCommits/Airplane b/upstreamCommits/Airplane index 7678cdde..5595a56b 100644 --- a/upstreamCommits/Airplane +++ b/upstreamCommits/Airplane @@ -1 +1 @@ -fad74c215f2c46b1a70ff67bbb1fa62b52a2fbed \ No newline at end of file +636dbff0fb95c8023821e658e0ab01a74cf5d9d0 \ No newline at end of file diff --git a/upstreamCommits/Empirecraft b/upstreamCommits/Empirecraft index 607bc96d..52da607f 100644 --- a/upstreamCommits/Empirecraft +++ b/upstreamCommits/Empirecraft @@ -1 +1 @@ -87ceb204670b2165a6c2aa89e3826a071c2c2d8e \ No newline at end of file +9e2881e606eacda8ec2b8527abd7d72d92f3e008 \ No newline at end of file diff --git a/upstreamCommits/Origami b/upstreamCommits/Origami index 23815e84..44267539 100644 --- a/upstreamCommits/Origami +++ b/upstreamCommits/Origami @@ -1 +1 @@ -73ecdf191085c48db17fb9b1eddb59b7be12c446 \ No newline at end of file +4c0616dd1392083034f6dbd0213f53bc8e732897 \ No newline at end of file diff --git a/upstreamCommits/Purpur b/upstreamCommits/Purpur index 84285f23..c78948fa 100644 --- a/upstreamCommits/Purpur +++ b/upstreamCommits/Purpur @@ -1 +1 @@ -adfe5d355fd5dc09cd6445eb0c239bebeadb2e2d \ No newline at end of file +adb0cafe6448d82b79db8b7dc478df71e34c7bd8 \ No newline at end of file diff --git a/upstreamCommits/Tuinity b/upstreamCommits/Tuinity index 8c6f293f..4ffd94ae 100644 --- a/upstreamCommits/Tuinity +++ b/upstreamCommits/Tuinity @@ -1 +1 @@ -13824732415ea2f97053f4b531fa602fb090df5e \ No newline at end of file +f0e91a4ae9c511c116c859105d10b02dddbe4f71 \ No newline at end of file diff --git a/upstreamConfig/0001-Tuinity.properties b/upstreamConfig/0001-Tuinity.properties index d7f4aaea..47616dc0 100755 --- a/upstreamConfig/0001-Tuinity.properties +++ b/upstreamConfig/0001-Tuinity.properties @@ -1,4 +1,4 @@ name=Tuinity useBlackList=True -list=server/Properly-handle-cancellation-of-projectile-hit-event.patch +list=server/Properly-handle-cancellation-of-projectile-hit-event.patch,server/Improved-oversized-chunk-data-packet-handling.patch branch=origin/master diff --git a/upstreamConfig/0003-Purpur.properties b/upstreamConfig/0003-Purpur.properties index 62c08061..b8d4dee5 100755 --- a/upstreamConfig/0003-Purpur.properties +++ b/upstreamConfig/0003-Purpur.properties @@ -1,4 +1,4 @@ name=Purpur useBlackList=True -list=api/Tuinity-API-Changes.patch,api/Airplane-API-Changes.patch,server/Tuinity-Server-Changes.patch,server/Airplane-Server-Changes.patch,server/Re-enable-timings-by-default.patch +list=api/Tuinity-API-Changes.patch,api/Airplane-API-Changes.patch,server/Tuinity-Server-Changes.patch,server/Airplane-Server-Changes.patch,server/Re-enable-timings-by-default.patch,server/Extend-Halloween-Optimization.patch branch=origin/ver/1.16.5 diff --git a/upstreamConfig/0005-Empirecraft.properties b/upstreamConfig/0005-Empirecraft.properties index 1ed11fcb..8e4c697b 100644 --- a/upstreamConfig/0005-Empirecraft.properties +++ b/upstreamConfig/0005-Empirecraft.properties @@ -1,4 +1,4 @@ name=Empirecraft useBlackList=false -list=api/Add-ChatColor.getById.patch,server/Don-t-trigger-Lootable-Refresh-for-non-player-intera.patch,server/Fix-Bukkit.createInventory-with-type-LECTERN.patch,server/dont-load-chunks-for-physics.patch +list=server/Don-t-trigger-Lootable-Refresh-for-non-player-intera.patch,server/Fix-Bukkit.createInventory-with-type-LECTERN.patch,server/dont-load-chunks-for-physics.patch branch=origin/master diff --git a/upstreamConfig/0006-Origami.properties b/upstreamConfig/0006-Origami.properties index caaa1d6f..6954b1fb 100644 --- a/upstreamConfig/0006-Origami.properties +++ b/upstreamConfig/0006-Origami.properties @@ -1,4 +1,4 @@ name=Origami useBlackList=false -list=server/Origami-Server-Config.patch,server/Optimize-inventory-API-item-handling.patch,server/Remove-some-streams-and-object-allocations.patch,server/Hopper-Optimizations.patch,server/Add-option-to-disable-observer-clocks.patch,server/Add-timings-for-Behavior.patch,server/Don-t-wake-up-entities-when-damage-event-is-cancelle.patch,server/Fix-exp-drop-of-zombie-pigmen-MC-56653.patch +list=server/Origami-Server-Config.patch,server/Optimize-inventory-API-item-handling.patch,server/Remove-some-streams-and-object-allocations.patch,server/Add-option-to-disable-observer-clocks.patch,server/Add-timings-for-Behavior.patch,server/Don-t-wake-up-entities-when-damage-event-is-cancelle.patch,server/Fix-exp-drop-of-zombie-pigmen-MC-56653.patch branch=origin/1.16