diff --git a/Spigot-Server-Patches/0004-MC-Utils.patch b/Spigot-Server-Patches/0004-MC-Utils.patch index 234c63b2f..324265216 100644 --- a/Spigot-Server-Patches/0004-MC-Utils.patch +++ b/Spigot-Server-Patches/0004-MC-Utils.patch @@ -2329,10 +2329,10 @@ index 0000000000000000000000000000000000000000..9df0006c1a283f77c4d01d9fce9062fc + } +} diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java -index 4f60b931a143ebf70a8469913ec445ff13da4d8d..f427953a83c4712dc490bd76e07aaaa0381ff17c 100644 +index 4f60b931a143ebf70a8469913ec445ff13da4d8d..3e90b57b6fd5dcb6cb1325861306e2ff84d0cccb 100644 --- a/src/main/java/net/minecraft/server/AxisAlignedBB.java +++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java -@@ -186,6 +186,7 @@ public class AxisAlignedBB { +@@ -186,10 +186,12 @@ public class AxisAlignedBB { return this.d(vec3d.x, vec3d.y, vec3d.z); } @@ -2340,6 +2340,19 @@ index 4f60b931a143ebf70a8469913ec445ff13da4d8d..f427953a83c4712dc490bd76e07aaaa0 public boolean c(AxisAlignedBB axisalignedbb) { return this.a(axisalignedbb.minX, axisalignedbb.minY, axisalignedbb.minZ, axisalignedbb.maxX, axisalignedbb.maxY, axisalignedbb.maxZ); } + ++ public final boolean intersects(double d0, double d1, double d2, double d3, double d4, double d5) { return a(d0, d1, d2, d3, d4, d5); } // Paper - OBFHELPER + public boolean a(double d0, double d1, double d2, double d3, double d4, double d5) { + return this.minX < d3 && this.maxX > d0 && this.minY < d4 && this.maxY > d1 && this.minZ < d5 && this.maxZ > d2; + } +@@ -202,6 +204,7 @@ public class AxisAlignedBB { + return d0 >= this.minX && d0 < this.maxX && d1 >= this.minY && d1 < this.maxY && d2 >= this.minZ && d2 < this.maxZ; + } + ++ public final double getAverageSideLength(){return a();} // Paper - OBFHELPER + public double a() { + double d0 = this.b(); + double d1 = this.c(); diff --git a/src/main/java/net/minecraft/server/BlockAccessAir.java b/src/main/java/net/minecraft/server/BlockAccessAir.java index eff6ebcd30b538cbaedaa031a46a59ea956253ba..30cbfc8eac20910aa55951e3dce63862f5a43c37 100644 --- a/src/main/java/net/minecraft/server/BlockAccessAir.java @@ -3061,6 +3074,26 @@ index 774a8f543424853be5fc8c0367d734ddf196d7f9..d5f5a51872dfabdbb828b6c20d61893a public void b(PacketDataSerializer packetdataserializer) { this.a(); packetdataserializer.writeByte(this.i); +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index f4863852b04c5fa55b79acabe40ce59909b9bbbd..7e01f6a1807f9885a7f4b163ce6bb626d8786a9a 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -1033,6 +1033,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { + + } + ++ public final AxisAlignedBB getCollisionBox(){return au();} //Paper - OBFHELPER + @Nullable + public AxisAlignedBB au() { + return null; +@@ -1842,6 +1843,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { + return false; + } + ++ public final AxisAlignedBB getHardCollisionBox(Entity entity){ return j(entity);}//Paper - OBFHELPER + @Nullable + public AxisAlignedBB j(Entity entity) { + return null; diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java index fe69161e5b9e69c75696a3434a681d0489f3863e..b40c8d2f83a80bcb8925632a1e7d6bb4cc0caebf 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java @@ -3204,6 +3237,18 @@ index 3b08770801ca072c853ca422212e40c5db35b2d2..0dff023529ba9e44a7406ad6388cad35 default int h(BlockPosition blockposition) { return this.getType(blockposition).h(); } +diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java +index 3a1ad2346b4cae833de90dafb716c56e6e2f606d..181661fc8fe9d46cb36cfffac38c58f0d5003192 100644 +--- a/src/main/java/net/minecraft/server/IBlockData.java ++++ b/src/main/java/net/minecraft/server/IBlockData.java +@@ -58,6 +58,7 @@ public class IBlockData extends BlockDataAbstract implements + return this.c != null && this.c.f != null ? this.c.f[enumdirection.ordinal()] : VoxelShapes.a(this.j(iblockaccess, blockposition), enumdirection); + } + ++ public final boolean exceedsCube(){ return f();} // Paper - OBFHELPER + public boolean f() { + return this.c == null || this.c.h; + } diff --git a/src/main/java/net/minecraft/server/IOWorker.java b/src/main/java/net/minecraft/server/IOWorker.java index c5658c0779b0e0d51fd4921456b6fef0711d7be3..b90baef0f54bdb8f5ee51cdde149f64e39887ef5 100644 --- a/src/main/java/net/minecraft/server/IOWorker.java @@ -4222,6 +4267,23 @@ index f82db93f88223ffddc55deec8f21efc5b774d900..75ab9f185b3231113dfa387c956a707b public static TicketType a(String s, Comparator comparator) { return new TicketType<>(s, comparator, 0L); +diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java +index 143be566c683ae035997f9a4058381a109f3de23..0e30d8c9933dc6595b9715ef6dc99cc8910892cb 100644 +--- a/src/main/java/net/minecraft/server/VoxelShapes.java ++++ b/src/main/java/net/minecraft/server/VoxelShapes.java +@@ -21,10 +21,12 @@ public final class VoxelShapes { + public static final VoxelShape a = create(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY); + private static final VoxelShape c = new VoxelShapeArray(new VoxelShapeBitSet(0, 0, 0), new DoubleArrayList(new double[]{0.0D}), new DoubleArrayList(new double[]{0.0D}), new DoubleArrayList(new double[]{0.0D})); + ++ public static final VoxelShape empty() {return a();} // Paper - OBFHELPER + public static VoxelShape a() { + return VoxelShapes.c; + } + ++ public static final VoxelShape fullCube() {return b();} // Paper - OBFHELPER + public static VoxelShape b() { + return VoxelShapes.b; + } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 2e1eabba14a3757d03fd90741651001e78c6322f..2a4fa455ff3065f9b1ad9bcf8d236bbb6f830bc9 100644 --- a/src/main/java/net/minecraft/server/World.java @@ -4286,6 +4348,19 @@ index 2e1eabba14a3757d03fd90741651001e78c6322f..2a4fa455ff3065f9b1ad9bcf8d236bbb Fluid fluid = this.getFluid(blockposition); return this.setTypeAndData(blockposition, fluid.getBlockData(), 3 | (flag ? 64 : 0)); +diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java +index 020e5c171a44f8886395849d718efd6f90659bab..3db276f176301ebf15d5a2ba44d0edb5c7ec6097 100644 +--- a/src/main/java/net/minecraft/server/WorldBorder.java ++++ b/src/main/java/net/minecraft/server/WorldBorder.java +@@ -35,6 +35,8 @@ public class WorldBorder { + return this.b(entity.locX(), entity.locZ()); + } + ++ public final VoxelShape asVoxelShape(){ return a();} // Paper - OBFHELPER ++ + public VoxelShape a() { + return this.i.m(); + } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index e181df6f4d08b88835db7342f97e0b848bcf01ef..4a9132c7016b076ab35b5d66ce81bbd247e1a3ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java diff --git a/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch index 07f72a90e..cb079c224 100644 --- a/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch +++ b/Spigot-Server-Patches/0006-Add-MinecraftKey-Information-to-Objects.patch @@ -19,7 +19,7 @@ index 41c79650b169b87fbc70cf502438a5453a04f23d..b839769ceae8932bb121a0b96fde1e7d MutablePair> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap())); ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ()); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index f4863852b04c5fa55b79acabe40ce59909b9bbbd..38227d85f482b4b4869e17cd7117eb1a476e462f 100644 +index 7e01f6a1807f9885a7f4b163ce6bb626d8786a9a..6c7816fdc1ef476969cb70c8ea697b60746d6ab4 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerTeleportEvent; @@ -31,7 +31,7 @@ index f4863852b04c5fa55b79acabe40ce59909b9bbbd..38227d85f482b4b4869e17cd7117eb1a // CraftBukkit start private static final int CURRENT_LEVEL = 2; -@@ -1707,12 +1707,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { +@@ -1708,12 +1708,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener { return true; } diff --git a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch index 08764d269..a977119cd 100644 --- a/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch +++ b/Spigot-Server-Patches/0007-Store-reference-to-current-Chunk-for-Entity-and-Bloc.patch @@ -89,7 +89,7 @@ index b39ce329aa0b2e8da679a7b658f707f1da1f1a99..4d7dc714748a82470d00e787eeb3dc7c } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 38227d85f482b4b4869e17cd7117eb1a476e462f..fc878e28c96bb4a9d4cd84001141935736d23e1f 100644 +index 6c7816fdc1ef476969cb70c8ea697b60746d6ab4..0d8262b1d2722e716f95db4c9a8a132c54b613cf 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -134,7 +134,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -110,7 +110,7 @@ index 38227d85f482b4b4869e17cd7117eb1a476e462f..fc878e28c96bb4a9d4cd840011419357 } // CraftBukkit end -@@ -1708,6 +1708,43 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1709,6 +1709,43 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // Paper start diff --git a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch index 271c82d78..b5c52ae76 100644 --- a/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch +++ b/Spigot-Server-Patches/0013-Allow-nerfed-mobs-to-jump-and-take-water-damage.patch @@ -31,10 +31,10 @@ index 2e869004c8c6b8bfbb002fb4eda04519d50390c8..8a6856e0fd7b9b515d98f45aaabefbc3 this.b.setJumping(this.a); this.a = false; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index c75b74d5581e3517d39079eea827a24c471eaa6c..23497aa93444ddabbd0ae89b277ed250e896b266 100644 +index 19d68aa4585ccfc156e9db6024b7a99bbeca4de4..2a449ec40a725b01a7bf572ae119c2197944ecbc 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1103,6 +1103,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1104,6 +1104,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.isInWater() || this.isInRain(); } diff --git a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch index 229ff24a8..c505513f0 100644 --- a/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch +++ b/Spigot-Server-Patches/0016-Drop-falling-block-and-tnt-entities-at-the-specified.patch @@ -24,10 +24,10 @@ index 8ee2b9bb1bce698fce50ac1b3fc477fcafd0542c..d59b82b7bb1f6d1b231f4e394e0a67a3 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 23497aa93444ddabbd0ae89b277ed250e896b266..9647d7850c2abe9fa7c313f994b834a70cfcac2e 100644 +index 2a449ec40a725b01a7bf572ae119c2197944ecbc..0d617c8e09cf0adf0d7aa8c95fc69c641f91b795 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1818,6 +1818,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1819,6 +1819,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.a(itemstack, 0.0F); } diff --git a/Spigot-Server-Patches/0025-Entity-Origin-API.patch b/Spigot-Server-Patches/0025-Entity-Origin-API.patch index 79367d5b3..595aa3a5a 100644 --- a/Spigot-Server-Patches/0025-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0025-Entity-Origin-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9647d7850c2abe9fa7c313f994b834a70cfcac2e..cf4901ccaecff800285cfa63cbf05ab130a8b0b5 100644 +index 0d617c8e09cf0adf0d7aa8c95fc69c641f91b795..7e400f4c281a02f038834ac984df4ce35a6a7ec3 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -167,6 +167,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -16,7 +16,7 @@ index 9647d7850c2abe9fa7c313f994b834a70cfcac2e..cf4901ccaecff800285cfa63cbf05ab1 // Spigot start public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final boolean defaultActivationState; -@@ -1580,6 +1581,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1581,6 +1582,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.bukkitEntity.storeBukkitValues(nbttagcompound); } // CraftBukkit end @@ -28,7 +28,7 @@ index 9647d7850c2abe9fa7c313f994b834a70cfcac2e..cf4901ccaecff800285cfa63cbf05ab1 return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT"); -@@ -1694,6 +1700,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1695,6 +1701,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.getBukkitEntity().readBukkitValues(nbttagcompound); // CraftBukkit end @@ -42,7 +42,7 @@ index 9647d7850c2abe9fa7c313f994b834a70cfcac2e..cf4901ccaecff800285cfa63cbf05ab1 } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded"); -@@ -1775,6 +1788,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1776,6 +1789,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke protected abstract void b(NBTTagCompound nbttagcompound); diff --git a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch b/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch index 16ee91cf7..cf0740eee 100644 --- a/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch +++ b/Spigot-Server-Patches/0051-Add-configurable-portal-search-radius.patch @@ -21,10 +21,10 @@ index 62e793b71b313146b86b466421e7a5f894bef9df..cd47a4ca069df26969de3051c2aac805 + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 5e3959901bf54178c8042036e00e1d42cc8fc99d..5892d344ad9eb25af78aa45727beee216fd4e1ea 100644 +index 94b74e0c0eb9495f9b2cb066c86bdedbe247a0cd..65a421ee6f704af88ba2170930d17b46a9531c28 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2580,7 +2580,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2582,7 +2582,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke blockposition = new BlockPosition(d0, this.locY(), d1); // CraftBukkit start diff --git a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch index 0949322f4..631beb2a4 100644 --- a/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch +++ b/Spigot-Server-Patches/0056-Disable-Scoreboards-for-non-players-by-default.patch @@ -25,10 +25,10 @@ index abbf59bb91021821876a8960e8f77fac24457ec4..04430aae52205ee167662004e45c145b + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 5892d344ad9eb25af78aa45727beee216fd4e1ea..10855cec1e0bee6af0878bad0d0b05c5a637fad2 100644 +index 65a421ee6f704af88ba2170930d17b46a9531c28..383805926e60f9f2f77e258e9d51ed079549713a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2269,6 +2269,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2271,6 +2271,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @Nullable public ScoreboardTeamBase getScoreboardTeam() { diff --git a/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch b/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch index 150c0065b..be859d9db 100644 --- a/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch +++ b/Spigot-Server-Patches/0102-Optional-TNT-doesn-t-move-in-water.patch @@ -32,10 +32,10 @@ index 6db1312035807c04b98408100fb0a5c04c07aff4..8cf3076f4e0d8d7e81158881c763f89e + } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 7b295f467315b50a62e177526354d1a87d96b375..1aade318ef9b2ecd867a0301c79fb082a78d45c7 100644 +index f90627a7f4c399f0515690b2709eaf8c7e884313..3f1dbca881ce19a633fc7c20d26d1a25b550edf7 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2719,6 +2719,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2721,6 +2721,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean bM() { diff --git a/Spigot-Server-Patches/0138-Don-t-allow-entities-to-ride-themselves-572.patch b/Spigot-Server-Patches/0138-Don-t-allow-entities-to-ride-themselves-572.patch index f92d4296f..9ce22e7cd 100644 --- a/Spigot-Server-Patches/0138-Don-t-allow-entities-to-ride-themselves-572.patch +++ b/Spigot-Server-Patches/0138-Don-t-allow-entities-to-ride-themselves-572.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572 diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3b948d0805c86e2fbaf58b06736144c87cadf179..3b02a65ba2df5c01515c9cbf03b39b3c518451dc 100644 +index 8a2093ac5a6d47c795523a1aab87e46f10b1699e..63649936525efd33f50c602f6d723085edb2896e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2029,6 +2029,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2031,6 +2031,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } protected boolean addPassenger(Entity entity) { // CraftBukkit diff --git a/Spigot-Server-Patches/0158-Entity-fromMobSpawner.patch b/Spigot-Server-Patches/0158-Entity-fromMobSpawner.patch index 69851f8a2..0b7272820 100644 --- a/Spigot-Server-Patches/0158-Entity-fromMobSpawner.patch +++ b/Spigot-Server-Patches/0158-Entity-fromMobSpawner.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Entity#fromMobSpawner() diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 0d7dcc1463efa395458e95f1236a20241ff66abe..153bfd07fafec177e3772c9d9531cbea188ea3f7 100644 +index 0b971ad8addd65850162e46707c15fbc1ba9b8b9..7c6bf0b91cdf59f6dcf155ee8abfbab61938cc8b 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -188,6 +188,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -16,7 +16,7 @@ index 0d7dcc1463efa395458e95f1236a20241ff66abe..153bfd07fafec177e3772c9d9531cbea protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end -@@ -1621,6 +1622,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1622,6 +1623,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (this.origin != null) { nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ())); } @@ -27,7 +27,7 @@ index 0d7dcc1463efa395458e95f1236a20241ff66abe..153bfd07fafec177e3772c9d9531cbea // Paper end return nbttagcompound; } catch (Throwable throwable) { -@@ -1741,6 +1746,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1742,6 +1747,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (!originTag.isEmpty()) { origin = new Location(world.getWorld(), originTag.getDoubleAt(0), originTag.getDoubleAt(1), originTag.getDoubleAt(2)); } diff --git a/Spigot-Server-Patches/0247-add-more-information-to-Entity.toString.patch b/Spigot-Server-Patches/0247-add-more-information-to-Entity.toString.patch index 63d88b3b2..9a10692fc 100644 --- a/Spigot-Server-Patches/0247-add-more-information-to-Entity.toString.patch +++ b/Spigot-Server-Patches/0247-add-more-information-to-Entity.toString.patch @@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString() UUID, ticks lived, valid, dead diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 153bfd07fafec177e3772c9d9531cbea188ea3f7..2ac396dd17e9b91d37685959f4a8e4473682e00f 100644 +index 7c6bf0b91cdf59f6dcf155ee8abfbab61938cc8b..fe730cd301e6bae46320355ee8cb67d406a72a9f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2503,7 +2503,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2505,7 +2505,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public String toString() { diff --git a/Spigot-Server-Patches/0254-Vanished-players-don-t-have-rights.patch b/Spigot-Server-Patches/0254-Vanished-players-don-t-have-rights.patch index f994d811e..560ab67cb 100644 --- a/Spigot-Server-Patches/0254-Vanished-players-don-t-have-rights.patch +++ b/Spigot-Server-Patches/0254-Vanished-players-don-t-have-rights.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3043b87cf74cd5e27b978464ed3032c68af8a7c0..a0379c6a779a5507993827a1402f2acb02eca658 100644 +index 5fd57a3d30972d86c62025d63cd57b56a147cc94..653e6d9a1640bedf08aaa5b436ac93e4cb1cb5b7 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -98,7 +98,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -39,10 +39,10 @@ index 278ef79d8962cc5d337e34891c7ea3a606336cbb..5c3731f68a31b73b886b872eba69de48 }, RayTrace.BlockCollisionOption.COLLIDER, true); diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index 3a1ad2346b4cae833de90dafb716c56e6e2f606d..9ab57be8500bf5106e32671b8d5fb11d8e9b1c60 100644 +index 181661fc8fe9d46cb36cfffac38c58f0d5003192..c5fddef030489bff0de9e0efb4f11c83bcfee628 100644 --- a/src/main/java/net/minecraft/server/IBlockData.java +++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -146,6 +146,7 @@ public class IBlockData extends BlockDataAbstract implements +@@ -147,6 +147,7 @@ public class IBlockData extends BlockDataAbstract implements return this.c != null ? this.c.g : this.b(iblockaccess, blockposition, VoxelShapeCollision.a()); } @@ -77,10 +77,10 @@ index 0f64a3c0569a778cd5b8c60f253c77681a83308d..0f95bcbccb96f9d525583f6bb6c0c0ed return (VoxelShape) (this.isEmpty() ? VoxelShapes.a() : new VoxelShapeArray(this.a, new DoubleListOffset(this.a(EnumDirection.EnumAxis.X), d0), new DoubleListOffset(this.a(EnumDirection.EnumAxis.Y), d1), new DoubleListOffset(this.a(EnumDirection.EnumAxis.Z), d2))); } diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java -index 143be566c683ae035997f9a4058381a109f3de23..08c83c62dfe875600162a46a0ca4b835b0bfe199 100644 +index 0e30d8c9933dc6595b9715ef6dc99cc8910892cb..335142ec0dfad822cfe40877e99dec0f307e1a58 100644 --- a/src/main/java/net/minecraft/server/VoxelShapes.java +++ b/src/main/java/net/minecraft/server/VoxelShapes.java -@@ -33,6 +33,7 @@ public final class VoxelShapes { +@@ -35,6 +35,7 @@ public final class VoxelShapes { return a(new AxisAlignedBB(d0, d1, d2, d3, d4, d5)); } @@ -88,7 +88,7 @@ index 143be566c683ae035997f9a4058381a109f3de23..08c83c62dfe875600162a46a0ca4b835 public static VoxelShape a(AxisAlignedBB axisalignedbb) { int i = a(axisalignedbb.minX, axisalignedbb.maxX); int j = a(axisalignedbb.minY, axisalignedbb.maxY); -@@ -127,6 +128,7 @@ public final class VoxelShapes { +@@ -129,6 +130,7 @@ public final class VoxelShapes { } } diff --git a/Spigot-Server-Patches/0268-Fix-client-rendering-skulls-from-same-user.patch b/Spigot-Server-Patches/0268-Fix-client-rendering-skulls-from-same-user.patch index 03e46ec6a..d26dddde1 100644 --- a/Spigot-Server-Patches/0268-Fix-client-rendering-skulls-from-same-user.patch +++ b/Spigot-Server-Patches/0268-Fix-client-rendering-skulls-from-same-user.patch @@ -25,11 +25,15 @@ index 641a52b968ef04a142b32703b61c8b75643b36a6..0b0c3c681c07cf8506df1b91b1feaf13 private EntityItemFrame i; private ShapeDetectorBlock j; diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java -index d9574a9ace96d8c5666e62a5aed96a67021b91d8..93ae6dcd78e9b786b64fadcb9cd016559fb98535 100644 +index d9574a9ace96d8c5666e62a5aed96a67021b91d8..e810da87977b441cc329066e3cb158ef3bc62a66 100644 --- a/src/main/java/net/minecraft/server/PacketDataSerializer.java +++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java -@@ -253,6 +253,15 @@ public class PacketDataSerializer extends ByteBuf { - CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); +@@ -250,9 +250,18 @@ public class PacketDataSerializer extends ByteBuf { + if (item.usesDurability() || item.o()) { + // Spigot start - filter + itemstack = itemstack.cloneItemStack(); +- CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); ++ //CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); // Paper - This is no longer needed due to NBT being supported // Spigot end nbttagcompound = itemstack.getTag(); + // Paper start @@ -44,10 +48,11 @@ index d9574a9ace96d8c5666e62a5aed96a67021b91d8..93ae6dcd78e9b786b64fadcb9cd01655 } this.a(nbttagcompound); -@@ -272,6 +281,16 @@ public class PacketDataSerializer extends ByteBuf { +@@ -272,7 +281,17 @@ public class PacketDataSerializer extends ByteBuf { itemstack.setTag(this.l()); // CraftBukkit start if (itemstack.getTag() != null) { +- CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); + // Paper start - Fix skulls of same owner - restore orig ID since we changed it on send to client + if (itemstack.tag.hasKey("SkullOwnerOrig")) { + NBTTagCompound owner = itemstack.tag.getCompound("SkullOwner"); @@ -58,9 +63,10 @@ index d9574a9ace96d8c5666e62a5aed96a67021b91d8..93ae6dcd78e9b786b64fadcb9cd01655 + itemstack.tag.remove("SkullOwnerOrig"); + } + // Paper end - CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); ++ // CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack)); // Paper - This is no longer needed due to NBT being supported } // CraftBukkit end + return itemstack; diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java index 3a1d0deb0dec880d73185690e2a7c769a2731479..1fcbbd698a7e1b9ae3e8b5fa0328b85c43019bea 100644 --- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java diff --git a/Spigot-Server-Patches/0289-Improve-death-events.patch b/Spigot-Server-Patches/0289-Improve-death-events.patch index 4d1d24fde..47a42eba3 100644 --- a/Spigot-Server-Patches/0289-Improve-death-events.patch +++ b/Spigot-Server-Patches/0289-Improve-death-events.patch @@ -27,10 +27,10 @@ index 6daa400d277bdaa441bf5719a273eacbe64feff9..38fe29f8a290550d1e5fa5451aadaf0f int i = this.f ? 300 : 100; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 35d22ec027952ba90dd27ed61708801b6903c393..09bb8676c3b0b737f7ff483a54ec2f4713ba174c 100644 +index 6e87ff52df30f4de8cfb11d1dbfb71211d656831..0f74ec89b3e85c918c95f9d8fef6d68403ed1107 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1503,6 +1503,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1504,6 +1504,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return false; } @@ -38,7 +38,7 @@ index 35d22ec027952ba90dd27ed61708801b6903c393..09bb8676c3b0b737f7ff483a54ec2f47 public void a(Entity entity, int i, DamageSource damagesource) { if (entity instanceof EntityPlayer) { CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource); -@@ -2417,6 +2418,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2419,6 +2420,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.fallDistance = 0.0F; } diff --git a/Spigot-Server-Patches/0301-Catch-JsonParseException-in-Entity-and-TE-names.patch b/Spigot-Server-Patches/0301-Catch-JsonParseException-in-Entity-and-TE-names.patch index e1eb26aee..962b7ceee 100644 --- a/Spigot-Server-Patches/0301-Catch-JsonParseException-in-Entity-and-TE-names.patch +++ b/Spigot-Server-Patches/0301-Catch-JsonParseException-in-Entity-and-TE-names.patch @@ -26,10 +26,10 @@ index 786712297435fed5247abd577efd092bcb9c44cb..ef2a496eda45ae5ee8fe52ef09e77c29 if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 09bb8676c3b0b737f7ff483a54ec2f4713ba174c..8d3140871fd750bbb5d7c7f920917ae356890aeb 100644 +index 0f74ec89b3e85c918c95f9d8fef6d68403ed1107..4609e402b419ed21e17ad34d02dca55b47c1c95e 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1679,7 +1679,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1680,7 +1680,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.Z(); this.setYawPitch(this.yaw, this.pitch); if (nbttagcompound.hasKeyOfType("CustomName", 8)) { diff --git a/Spigot-Server-Patches/0318-Reset-players-airTicks-on-respawn.patch b/Spigot-Server-Patches/0318-Reset-players-airTicks-on-respawn.patch index 546f8f0d9..b1357bb05 100644 --- a/Spigot-Server-Patches/0318-Reset-players-airTicks-on-respawn.patch +++ b/Spigot-Server-Patches/0318-Reset-players-airTicks-on-respawn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 8d3140871fd750bbb5d7c7f920917ae356890aeb..1488616f3968ac41cbab6348be7bbfb13573d35d 100644 +index 4609e402b419ed21e17ad34d02dca55b47c1c95e..ce0eadbae95a9f6b4e5a46a9d0ee1ccf69c6779a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2330,6 +2330,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2332,6 +2332,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } diff --git a/Spigot-Server-Patches/0327-force-entity-dismount-during-teleportation.patch b/Spigot-Server-Patches/0327-force-entity-dismount-during-teleportation.patch index 1af6b2be7..ca2cb28dc 100644 --- a/Spigot-Server-Patches/0327-force-entity-dismount-during-teleportation.patch +++ b/Spigot-Server-Patches/0327-force-entity-dismount-during-teleportation.patch @@ -20,10 +20,10 @@ this is going to be the best soultion all around. Improvements/suggestions welcome! diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 1488616f3968ac41cbab6348be7bbfb13573d35d..3fc3b76436cd2aba64f5b5881e23e9de4900f59c 100644 +index ce0eadbae95a9f6b4e5a46a9d0ee1ccf69c6779a..3d44188e68df31d188f25820000e2c39aa5b6ce0 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2031,12 +2031,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2033,12 +2033,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } @@ -41,7 +41,7 @@ index 1488616f3968ac41cbab6348be7bbfb13573d35d..3fc3b76436cd2aba64f5b5881e23e9de } } -@@ -2087,7 +2090,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2089,7 +2092,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return true; // CraftBukkit } @@ -53,7 +53,7 @@ index 1488616f3968ac41cbab6348be7bbfb13573d35d..3fc3b76436cd2aba64f5b5881e23e9de if (entity.getVehicle() == this) { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); } else { -@@ -2097,7 +2103,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2099,7 +2105,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { VehicleExitEvent event = new VehicleExitEvent( (Vehicle) getBukkitEntity(), @@ -62,7 +62,7 @@ index 1488616f3968ac41cbab6348be7bbfb13573d35d..3fc3b76436cd2aba64f5b5881e23e9de ); Bukkit.getPluginManager().callEvent(event); CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle(); -@@ -2108,7 +2114,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2110,7 +2116,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } // CraftBukkit end // Spigot start diff --git a/Spigot-Server-Patches/0352-Add-LivingEntity-getTargetEntity.patch b/Spigot-Server-Patches/0352-Add-LivingEntity-getTargetEntity.patch index 88500154d..7da86a6e2 100644 --- a/Spigot-Server-Patches/0352-Add-LivingEntity-getTargetEntity.patch +++ b/Spigot-Server-Patches/0352-Add-LivingEntity-getTargetEntity.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/net/minecraft/server/AxisAlignedBB.java b/src/main/java/net/minecraft/server/AxisAlignedBB.java -index f427953a83c4712dc490bd76e07aaaa0381ff17c..3fdb52007a2cf53b3319e4decf84d99876e830d0 100644 +index 3e90b57b6fd5dcb6cb1325861306e2ff84d0cccb..1a466e92956e1eee5c0a7d30f89177e4b189fcb8 100644 --- a/src/main/java/net/minecraft/server/AxisAlignedBB.java +++ b/src/main/java/net/minecraft/server/AxisAlignedBB.java @@ -108,6 +108,7 @@ public class AxisAlignedBB { @@ -29,7 +29,7 @@ index f427953a83c4712dc490bd76e07aaaa0381ff17c..3fdb52007a2cf53b3319e4decf84d998 public AxisAlignedBB grow(double d0, double d1, double d2) { double d3 = this.minX - d0; double d4 = this.minY - d1; -@@ -195,6 +202,7 @@ public class AxisAlignedBB { +@@ -196,6 +203,7 @@ public class AxisAlignedBB { return this.minX < d3 && this.maxX > d0 && this.minY < d4 && this.maxY > d1 && this.minZ < d5 && this.maxZ > d2; } @@ -37,7 +37,7 @@ index f427953a83c4712dc490bd76e07aaaa0381ff17c..3fdb52007a2cf53b3319e4decf84d998 public boolean c(Vec3D vec3d) { return this.e(vec3d.x, vec3d.y, vec3d.z); } -@@ -227,6 +235,7 @@ public class AxisAlignedBB { +@@ -229,6 +237,7 @@ public class AxisAlignedBB { return this.g(-d0); } @@ -46,10 +46,10 @@ index f427953a83c4712dc490bd76e07aaaa0381ff17c..3fdb52007a2cf53b3319e4decf84d998 double[] adouble = new double[]{1.0D}; double d0 = vec3d1.x - vec3d.x; diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3fc3b76436cd2aba64f5b5881e23e9de4900f59c..3a1d97c290c08d9cc5fcc0c902795e135fcdfaa1 100644 +index 3d44188e68df31d188f25820000e2c39aa5b6ce0..9368c4afa7bbb336894d73069b3c0858231d1e81 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1475,6 +1475,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1476,6 +1476,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.c(f - 90.0F, f1); } @@ -57,7 +57,7 @@ index 3fc3b76436cd2aba64f5b5881e23e9de4900f59c..3a1d97c290c08d9cc5fcc0c902795e13 public final Vec3D j(float f) { if (f == 1.0F) { return new Vec3D(this.locX(), this.getHeadY(), this.locZ()); -@@ -2130,6 +2131,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2132,6 +2133,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.getPassengers().size() < 1; } diff --git a/Spigot-Server-Patches/0354-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0354-Entity-getEntitySpawnReason.patch index 02bf801e5..028b049d8 100644 --- a/Spigot-Server-Patches/0354-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0354-Entity-getEntitySpawnReason.patch @@ -10,7 +10,7 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 3a1d97c290c08d9cc5fcc0c902795e135fcdfaa1..030c9992ebeb0a341cb8ae609b2e49658c59dbad 100644 +index 9368c4afa7bbb336894d73069b3c0858231d1e81..ae0f5e5a71502c432a4dcaa42a3fc9eeffe28e72 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -72,6 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -21,7 +21,7 @@ index 3a1d97c290c08d9cc5fcc0c902795e135fcdfaa1..030c9992ebeb0a341cb8ae609b2e4965 // Paper end public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper -@@ -1628,6 +1629,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1629,6 +1630,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (this.origin != null) { nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ())); } @@ -31,7 +31,7 @@ index 3a1d97c290c08d9cc5fcc0c902795e135fcdfaa1..030c9992ebeb0a341cb8ae609b2e4965 // Save entity's from mob spawner status if (spawnedViaMobSpawner) { nbttagcompound.setBoolean("Paper.FromMobSpawner", true); -@@ -1754,6 +1758,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1755,6 +1759,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status diff --git a/Spigot-Server-Patches/0370-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0370-Duplicate-UUID-Resolve-Option.patch index dffd1d6dd..91f627465 100644 --- a/Spigot-Server-Patches/0370-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0370-Duplicate-UUID-Resolve-Option.patch @@ -93,10 +93,10 @@ index 8e9ddca049f837ed1c5fc4aa9fd6a6858dbc36be..165cb994e84bbcbdeb5ec14b56143325 int k = MathHelper.floor(entity.locY() / 16.0D); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 030c9992ebeb0a341cb8ae609b2e49658c59dbad..fd6dad8437b6a73439b1b4bae34902e1c71c9bd3 100644 +index ae0f5e5a71502c432a4dcaa42a3fc9eeffe28e72..fbec89c6d827463ea28036617acaa573c8e11d02 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2749,6 +2749,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2751,6 +2751,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke }); } diff --git a/Spigot-Server-Patches/0376-Implement-CraftBlockSoundGroup.patch b/Spigot-Server-Patches/0376-Implement-CraftBlockSoundGroup.patch index b11752d22..662126174 100644 --- a/Spigot-Server-Patches/0376-Implement-CraftBlockSoundGroup.patch +++ b/Spigot-Server-Patches/0376-Implement-CraftBlockSoundGroup.patch @@ -49,10 +49,10 @@ index 0000000000000000000000000000000000000000..99f99330d01fc61ce8ede9f225b0c42b + } +} diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index c1ff62aa52595decd7ed8278eb63e7c6e46feefe..de43881653ff37e38dc42c7f953dc96126a30c61 100644 +index cca2bf1045c1305a9defa5241909b50711b85d4c..321eae23c575528788b1b575f17593580d6ba737 100644 --- a/src/main/java/net/minecraft/server/IBlockData.java +++ b/src/main/java/net/minecraft/server/IBlockData.java -@@ -275,6 +275,7 @@ public class IBlockData extends BlockDataAbstract implements +@@ -276,6 +276,7 @@ public class IBlockData extends BlockDataAbstract implements return this.getBlock().isTicking(this); } diff --git a/Spigot-Server-Patches/0424-Entity-Activation-Range-2.0.patch b/Spigot-Server-Patches/0424-Entity-Activation-Range-2.0.patch index a7d42b11b..0a6d15107 100644 --- a/Spigot-Server-Patches/0424-Entity-Activation-Range-2.0.patch +++ b/Spigot-Server-Patches/0424-Entity-Activation-Range-2.0.patch @@ -26,7 +26,7 @@ index a1883eba63e0da420a3cf57b8da6ebdb2afbad80..7c6e687707cdf32638eee41e549818a4 return this.g.contains(activity); } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index fd6dad8437b6a73439b1b4bae34902e1c71c9bd3..067420f19559f66860a2859a33e7d11786273315 100644 +index fbec89c6d827463ea28036617acaa573c8e11d02..a1245c1f551cbce84b0f3dd3a7349e8585631a82 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -192,6 +192,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -59,7 +59,7 @@ index fd6dad8437b6a73439b1b4bae34902e1c71c9bd3..067420f19559f66860a2859a33e7d117 vec3d = this.a(vec3d, enummovetype); Vec3D vec3d1 = this.e(vec3d); -@@ -2767,6 +2776,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2769,6 +2778,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke return this.am; } diff --git a/Spigot-Server-Patches/0428-Fix-items-vanishing-through-end-portal.patch b/Spigot-Server-Patches/0428-Fix-items-vanishing-through-end-portal.patch index 314ab758b..467cd1e04 100644 --- a/Spigot-Server-Patches/0428-Fix-items-vanishing-through-end-portal.patch +++ b/Spigot-Server-Patches/0428-Fix-items-vanishing-through-end-portal.patch @@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the heightmap resolves the issue without having to load all spawn chunks. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 067420f19559f66860a2859a33e7d11786273315..599bcabd14a7f234d2cf7f2755d76413e7d0ceac 100644 +index a1245c1f551cbce84b0f3dd3a7349e8585631a82..83e0af493c0f4037ff3e625ee93b9422863f335f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -2611,6 +2611,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2613,6 +2613,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (blockposition == null) { // CraftBukkit if (dimensionmanager1.getType() == DimensionManager.THE_END && dimensionmanager == DimensionManager.OVERWORLD) { // CraftBukkit diff --git a/Spigot-Server-Patches/0435-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0435-Optimise-random-block-ticking.patch index 057d35ab3..cb5d2171d 100644 --- a/Spigot-Server-Patches/0435-Optimise-random-block-ticking.patch +++ b/Spigot-Server-Patches/0435-Optimise-random-block-ticking.patch @@ -285,7 +285,7 @@ index dd02cb3485021c3afd23c2985a71e93c6b0ab07d..b24a5100b452f69f771b724ca96d3461 public final BlockPosition getHome() { return this.es(); } // Paper - OBFHELPER diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java -index de43881653ff37e38dc42c7f953dc96126a30c61..e821c236b45993cf4fb670cafbc979ead7d207a1 100644 +index 321eae23c575528788b1b575f17593580d6ba737..b19bbbbc81376177751396a2de9452ce1f84c06b 100644 --- a/src/main/java/net/minecraft/server/IBlockData.java +++ b/src/main/java/net/minecraft/server/IBlockData.java @@ -22,11 +22,15 @@ public class IBlockData extends BlockDataAbstract implements @@ -304,7 +304,7 @@ index de43881653ff37e38dc42c7f953dc96126a30c61..e821c236b45993cf4fb670cafbc979ea } public void c() { -@@ -81,8 +85,8 @@ public class IBlockData extends BlockDataAbstract implements +@@ -82,8 +86,8 @@ public class IBlockData extends BlockDataAbstract implements return this.d; } @@ -315,7 +315,7 @@ index de43881653ff37e38dc42c7f953dc96126a30c61..e821c236b45993cf4fb670cafbc979ea } public MaterialMapColor c(IBlockAccess iblockaccess, BlockPosition blockposition) { -@@ -267,12 +271,19 @@ public class IBlockData extends BlockDataAbstract implements +@@ -268,12 +272,19 @@ public class IBlockData extends BlockDataAbstract implements return this.getBlock().a(tag); } diff --git a/Spigot-Server-Patches/0437-Add-option-to-nerf-pigmen-from-nether-portals.patch b/Spigot-Server-Patches/0437-Add-option-to-nerf-pigmen-from-nether-portals.patch index 474f67c4c..408d89ebc 100644 --- a/Spigot-Server-Patches/0437-Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/Spigot-Server-Patches/0437-Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -32,7 +32,7 @@ index 2dc3ab4cfa3fb9335d271e91c89f0b22f21eeb39..09c7c131833ded951e49a7a1a2eb2e1f } } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 599bcabd14a7f234d2cf7f2755d76413e7d0ceac..00df89d65099cbdd96c77ac26c892f05a2c37d79 100644 +index 83e0af493c0f4037ff3e625ee93b9422863f335f..7bdd3f19b2bc51c4f995d42fcd47e0e315310bff 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -194,6 +194,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -43,7 +43,7 @@ index 599bcabd14a7f234d2cf7f2755d76413e7d0ceac..00df89d65099cbdd96c77ac26c892f05 protected int numCollisions = 0; // Paper public void inactiveTick() { } // Spigot end -@@ -1645,6 +1646,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1646,6 +1647,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke if (spawnedViaMobSpawner) { nbttagcompound.setBoolean("Paper.FromMobSpawner", true); } @@ -53,7 +53,7 @@ index 599bcabd14a7f234d2cf7f2755d76413e7d0ceac..00df89d65099cbdd96c77ac26c892f05 // Paper end return nbttagcompound; } catch (Throwable throwable) { -@@ -1767,6 +1771,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1768,6 +1772,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status diff --git a/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch b/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch index 1d8a05ae4..1b9a9618b 100644 --- a/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch +++ b/Spigot-Server-Patches/0453-Optimize-Collision-to-not-load-chunks.patch @@ -57,10 +57,10 @@ index f851ed11df14fd9aa8017f44d82fb6cfc3bde345..d9aeb27a3d6cc2fef2030eafd01d92ef if ((j2 != 1 || iblockdata.f()) && (j2 != 2 || iblockdata.getBlock() == Blocks.MOVING_PISTON)) { VoxelShape voxelshape2 = iblockdata.b((IBlockAccess) ICollisionAccess.this, blockposition_mutableblockposition, voxelshapecollision); diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java -index 08c83c62dfe875600162a46a0ca4b835b0bfe199..240aa3ea19ca30cf3a21f47611e8a5d2be0683c8 100644 +index 335142ec0dfad822cfe40877e99dec0f307e1a58..e641d4b8d8b4ac5d539e6d9c0eaf345601e0b499 100644 --- a/src/main/java/net/minecraft/server/VoxelShapes.java +++ b/src/main/java/net/minecraft/server/VoxelShapes.java -@@ -237,7 +237,8 @@ public final class VoxelShapes { +@@ -239,7 +239,8 @@ public final class VoxelShapes { if (k2 < 3) { blockposition_mutableblockposition.a(enumaxiscycle1, i2, j2, l1); diff --git a/Spigot-Server-Patches/0485-Load-Chunks-for-Login-Asynchronously.patch b/Spigot-Server-Patches/0485-Load-Chunks-for-Login-Asynchronously.patch index c24a9f492..304592863 100644 --- a/Spigot-Server-Patches/0485-Load-Chunks-for-Login-Asynchronously.patch +++ b/Spigot-Server-Patches/0485-Load-Chunks-for-Login-Asynchronously.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Load Chunks for Login Asynchronously diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 324fd07bcee9fed7bdb5b2b47ef01ce341282c93..01330045c0f3e0993af66c5a34c2a0246003758b 100644 +index 1a97e7aeb9b9dcf0611139ddc69e90354194708f..7df66f0399d3ce346ba205f941f9e0bdc65f3781 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1382,7 +1382,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1383,7 +1383,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke this.pitch = MathHelper.a(f1, -90.0F, 90.0F) % 360.0F; this.lastYaw = this.yaw; this.lastPitch = this.pitch; diff --git a/Spigot-Server-Patches/0486-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/Spigot-Server-Patches/0486-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch index 0801d978c..cab0160c8 100644 --- a/Spigot-Server-Patches/0486-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch +++ b/Spigot-Server-Patches/0486-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch @@ -7,10 +7,10 @@ The code following this has better support for null worlds to move them back to the world spawn. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 01330045c0f3e0993af66c5a34c2a0246003758b..9bb5a4bcf1e76f271368dc4c65a061b531e9aaf0 100644 +index 7df66f0399d3ce346ba205f941f9e0bdc65f3781..c4f56fc4ba0e6da5e24ab3c1ac4e4a15235442bc 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1790,9 +1790,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1791,9 +1791,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke bworld = server.getWorld(worldName); } diff --git a/Spigot-Server-Patches/0492-Fix-numerous-item-duplication-issues-and-teleport-is.patch b/Spigot-Server-Patches/0492-Fix-numerous-item-duplication-issues-and-teleport-is.patch index 9bef1f165..1635277aa 100644 --- a/Spigot-Server-Patches/0492-Fix-numerous-item-duplication-issues-and-teleport-is.patch +++ b/Spigot-Server-Patches/0492-Fix-numerous-item-duplication-issues-and-teleport-is.patch @@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the same item twice because the source was destroyed. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 9bb5a4bcf1e76f271368dc4c65a061b531e9aaf0..14ba037c1dc042f81123b3f31ad5c3485e59b773 100644 +index c4f56fc4ba0e6da5e24ab3c1ac4e4a15235442bc..08895dfa7ad856f66c8577834dc875d115896216 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java -@@ -1966,11 +1966,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -1967,11 +1967,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } else { // CraftBukkit start - Capture drops for death event if (this instanceof EntityLiving && !((EntityLiving) this).forceDrops) { @@ -34,7 +34,7 @@ index 9bb5a4bcf1e76f271368dc4c65a061b531e9aaf0..14ba037c1dc042f81123b3f31ad5c348 entityitem.defaultPickupDelay(); // CraftBukkit start -@@ -2632,6 +2633,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2634,6 +2635,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @Nullable public Entity teleportTo(DimensionManager dimensionmanager, BlockPosition location) { // CraftBukkit end @@ -47,7 +47,7 @@ index 9bb5a4bcf1e76f271368dc4c65a061b531e9aaf0..14ba037c1dc042f81123b3f31ad5c348 if (!this.world.isClientSide && !this.dead) { this.world.getMethodProfiler().enter("changeDimension"); MinecraftServer minecraftserver = this.getMinecraftServer(); -@@ -2757,7 +2764,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +@@ -2759,7 +2766,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke } public boolean canPortal() { diff --git a/Spigot-Server-Patches/0498-Optimize-Voxel-Shape-Merging.patch b/Spigot-Server-Patches/0498-Optimize-Voxel-Shape-Merging.patch index 1e80cdd8b..dfe8d29d4 100644 --- a/Spigot-Server-Patches/0498-Optimize-Voxel-Shape-Merging.patch +++ b/Spigot-Server-Patches/0498-Optimize-Voxel-Shape-Merging.patch @@ -75,10 +75,10 @@ index 71d2ae2a9c5a05351241b5a313e66ca15b0624ef..232b0023773008c19f19ad4658eb40fc this.b = new IntArrayList(i1); this.c = new IntArrayList(i1); diff --git a/src/main/java/net/minecraft/server/VoxelShapes.java b/src/main/java/net/minecraft/server/VoxelShapes.java -index 240aa3ea19ca30cf3a21f47611e8a5d2be0683c8..8fde6f081655e9762c76ef9ed5475ca0d519a2ef 100644 +index e641d4b8d8b4ac5d539e6d9c0eaf345601e0b499..4b3e632a8944828189bc8a5dada32913c1929286 100644 --- a/src/main/java/net/minecraft/server/VoxelShapes.java +++ b/src/main/java/net/minecraft/server/VoxelShapes.java -@@ -317,9 +317,21 @@ public final class VoxelShapes { +@@ -319,9 +319,21 @@ public final class VoxelShapes { } @VisibleForTesting @@ -101,7 +101,7 @@ index 240aa3ea19ca30cf3a21f47611e8a5d2be0683c8..8fde6f081655e9762c76ef9ed5475ca0 if (doublelist instanceof VoxelShapeCubePoint && doublelist1 instanceof VoxelShapeCubePoint) { long l = a(j, k); -@@ -329,7 +341,22 @@ public final class VoxelShapes { +@@ -331,7 +343,22 @@ public final class VoxelShapes { } } diff --git a/Spigot-Server-Patches/0512-Implement-JellySquid-s-Entity-Collision-optimisation.patch b/Spigot-Server-Patches/0512-Implement-JellySquid-s-Entity-Collision-optimisation.patch new file mode 100644 index 000000000..d39a91f18 --- /dev/null +++ b/Spigot-Server-Patches/0512-Implement-JellySquid-s-Entity-Collision-optimisation.patch @@ -0,0 +1,101 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: JellySquid +Date: Sat, 9 May 2020 16:25:21 -0400 +Subject: [PATCH] Implement JellySquid's Entity Collision optimisations patch + +Optimizes Full Block voxel collisions, and removes streams from Entity collisions + +Original code by JellySquid, licensed under GNU Lesser General Public License v3.0 +you can find the original code on https://github.com/jellysquid3/lithium-fabric/tree/1.15.x/fabric (Yarn mappings) + +diff --git a/src/main/java/net/minecraft/server/ICollisionAccess.java b/src/main/java/net/minecraft/server/ICollisionAccess.java +index d9aeb27a3d6cc2fef2030eafd01d92ef7758111c..67c3f0fc718089bb1f57bbb45fda5677bd628cbd 100644 +--- a/src/main/java/net/minecraft/server/ICollisionAccess.java ++++ b/src/main/java/net/minecraft/server/ICollisionAccess.java +@@ -108,11 +108,24 @@ public interface ICollisionAccess extends IBlockAccess { + + if ((j2 != 1 || iblockdata.f()) && (j2 != 2 || iblockdata.getBlock() == Blocks.MOVING_PISTON)) { + VoxelShape voxelshape2 = iblockdata.b((IBlockAccess) ICollisionAccess.this, blockposition_mutableblockposition, voxelshapecollision); +- VoxelShape voxelshape3 = voxelshape2.a((double) k1, (double) l1, (double) i2); + +- if (VoxelShapes.c(voxelshape, voxelshape3, OperatorBoolean.AND)) { +- consumer.accept(voxelshape3); +- return true; ++ // Paper start - Lithium Collision Optimizations ++ if (voxelshape2 == VoxelShapes.empty()) { ++ continue; ++ } ++ ++ if (voxelshape2 == VoxelShapes.fullCube()) { ++ if (axisalignedbb.intersects(x, y, z, x + 1.0D, y + 1.0D, z + 1.0D)) { ++ consumer.accept(voxelshape2.offset(x, y, z)); ++ return true; ++ } ++ } else { ++ VoxelShape shape = voxelshape2.offset(x, y, z); ++ if (VoxelShapes.applyOperation(shape, voxelshape, OperatorBoolean.AND)) { ++ consumer.accept(shape); ++ return true; ++ } ++ // Paper end + } + } + } +diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java +index 5135308fb6137a34ed6fd061f0a210de6de4e81c..d434aaaaf0ab6a18ab0fe5ad0bf8ed4662f49120 100644 +--- a/src/main/java/net/minecraft/server/IEntityAccess.java ++++ b/src/main/java/net/minecraft/server/IEntityAccess.java +@@ -52,20 +52,41 @@ public interface IEntityAccess { + // Paper end - optimise hard collision + + default Stream b(@Nullable Entity entity, AxisAlignedBB axisalignedbb, Set set) { +- if (axisalignedbb.a() < 1.0E-7D) { ++ // Paper start - remove streams from entity collision ++ if (axisalignedbb.getAverageSideLength() < 1.0E-7D) { + return Stream.empty(); +- } else { +- AxisAlignedBB axisalignedbb1 = axisalignedbb.g(1.0E-7D); +- Stream stream = ((entity != null && entity.hardCollides()) ? this.getEntities(entity, axisalignedbb) : this.getHardCollidingEntities(entity, axisalignedbb1)).stream().filter((entity1) -> { // Paper - decompile fix // Paper - optimise hard collision +- return !set.contains(entity1); +- }).filter((entity1) -> { +- return entity == null || !entity.isSameVehicle(entity1); +- }).flatMap((entity1) -> { +- return Stream.of(entity1.au(), entity == null ? null : entity.j(entity1)); // Paper - optimise hard collision - diff on change, these are the methods that only hard colliding entities override +- }).filter(Objects::nonNull); +- +- return stream.filter(axisalignedbb1::c).map(VoxelShapes::a); ++ + } ++ AxisAlignedBB selection = axisalignedbb.grow(1.0E-7D); ++ List entities = entity != null && entity.hardCollides() ? getEntities(entity, selection) : getHardCollidingEntities(entity, selection); ++ List shapes = new java.util.ArrayList<>(); ++ ++ for (Entity otherEntity : entities) { ++ if (!set.isEmpty() && set.contains(otherEntity)) { ++ continue; ++ } ++ ++ if (entity != null && entity.isSameVehicle(otherEntity)) { ++ continue; ++ } ++ ++ AxisAlignedBB otherEntityBox = otherEntity.getCollisionBox(); ++ ++ if (otherEntityBox != null && selection.intersects(otherEntityBox)) { ++ shapes.add(VoxelShapes.of(otherEntityBox)); ++ } ++ ++ if (entity != null) { ++ AxisAlignedBB otherEntityHardBox = entity.getHardCollisionBox(otherEntity); ++ ++ if (otherEntityHardBox != null && selection.intersects(otherEntityHardBox)) { ++ shapes.add(VoxelShapes.of(otherEntityHardBox)); ++ } ++ } ++ } ++ ++ return shapes.stream(); ++ // Paper end + } + + @Nullable