diff --git a/patches/server/0017-Merge-Cannon-Entities.patch b/patches/server/0017-Merge-Cannon-Entities.patch index 2c61722..81c7538 100644 --- a/patches/server/0017-Merge-Cannon-Entities.patch +++ b/patches/server/0017-Merge-Cannon-Entities.patch @@ -458,7 +458,7 @@ index 1fa332238999fd45b20bc2be2d6284329da909b6..d044262b2e1363151b8d076a9e3855db if (!(this instanceof ServerPlayer) && entity_removalreason != RemovalReason.CHANGED_DIMENSION && !alreadyRemoved) { // Players need to be special cased, because they are regularly removed from the world diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 0458d965ca266606f922bf1b03b729810a3948a4..172f82631e2ce3bfe791d7e8f2e841cca5a51667 100644 +index 0458d965ca266606f922bf1b03b729810a3948a4..b873f6fce87afb048128d642f7588c18fcc6f7f5 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -57,7 +57,7 @@ import org.bukkit.craftbukkit.event.CraftEventFactory; @@ -470,7 +470,7 @@ index 0458d965ca266606f922bf1b03b729810a3948a4..172f82631e2ce3bfe791d7e8f2e841cc private static final Logger LOGGER = LogUtils.getLogger(); public BlockState blockState; -@@ -73,6 +73,57 @@ public class FallingBlockEntity extends Entity { +@@ -73,6 +73,58 @@ public class FallingBlockEntity extends Entity { protected static final EntityDataAccessor DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS); public boolean autoExpire = true; // Paper - Expand FallingBlock API @@ -497,6 +497,7 @@ index 0458d965ca266606f922bf1b03b729810a3948a4..172f82631e2ce3bfe791d7e8f2e841cc + + // Try to stack the falling block + this.entityState().apply(fallingBlock); ++ fallingBlock.blockState = this.blockState; + fallingBlock.spawnReason = this.spawnReason; + fallingBlock.time = this.time - 1; + fallingBlock.tick(); @@ -528,7 +529,7 @@ index 0458d965ca266606f922bf1b03b729810a3948a4..172f82631e2ce3bfe791d7e8f2e841cc public FallingBlockEntity(EntityType type, Level world) { super(type, world); this.blockState = Blocks.SAND.defaultBlockState(); -@@ -80,6 +131,7 @@ public class FallingBlockEntity extends Entity { +@@ -80,6 +132,7 @@ public class FallingBlockEntity extends Entity { this.fallDamageMax = 40; this.isFallingBlock = true; // Sakura this.loadChunks = world.sakuraConfig().cannons.loadChunks; // Sakura - load chunks on movement @@ -536,7 +537,7 @@ index 0458d965ca266606f922bf1b03b729810a3948a4..172f82631e2ce3bfe791d7e8f2e841cc } public FallingBlockEntity(Level world, double x, double y, double z, BlockState block) { -@@ -207,6 +259,7 @@ public class FallingBlockEntity extends Entity { +@@ -207,6 +260,7 @@ public class FallingBlockEntity extends Entity { return; } // CraftBukkit end @@ -544,7 +545,7 @@ index 0458d965ca266606f922bf1b03b729810a3948a4..172f82631e2ce3bfe791d7e8f2e841cc if (this.level().setBlock(blockposition, this.blockState, 3)) { ((ServerLevel) this.level()).getChunkSource().chunkMap.broadcast(this, new ClientboundBlockUpdatePacket(blockposition, this.level().getBlockState(blockposition))); this.discard(EntityRemoveEvent.Cause.DESPAWN); -@@ -326,6 +379,7 @@ public class FallingBlockEntity extends Entity { +@@ -326,6 +380,7 @@ public class FallingBlockEntity extends Entity { nbt.putBoolean("CancelDrop", this.cancelDrop); if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - Expand FallingBlock API @@ -552,7 +553,7 @@ index 0458d965ca266606f922bf1b03b729810a3948a4..172f82631e2ce3bfe791d7e8f2e841cc } @Override -@@ -358,6 +412,11 @@ public class FallingBlockEntity extends Entity { +@@ -358,6 +413,11 @@ public class FallingBlockEntity extends Entity { this.autoExpire = nbt.getBoolean("Paper.AutoExpire"); } // Paper end - Expand FallingBlock API diff --git a/patches/server/0021-Optimise-cannon-entity-movement.patch b/patches/server/0021-Optimise-cannon-entity-movement.patch index e1f0615..f39b5a1 100644 --- a/patches/server/0021-Optimise-cannon-entity-movement.patch +++ b/patches/server/0021-Optimise-cannon-entity-movement.patch @@ -200,10 +200,10 @@ index d044262b2e1363151b8d076a9e3855db2a27254c..387217247431bf971dd612f428315523 // Paper start - optimise collisions final boolean xZero = movement.x == 0.0; diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 172f82631e2ce3bfe791d7e8f2e841cca5a51667..c2f56308492d1e5d56993e32db8daaba8e081274 100644 +index b873f6fce87afb048128d642f7588c18fcc6f7f5..7dd6f7df5927c55bcfdf3a4708155d49d207b5d4 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -203,7 +203,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -204,7 +204,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti ++this.time; this.applyGravity(); diff --git a/patches/server/0023-Cannon-Mechanics.patch b/patches/server/0023-Cannon-Mechanics.patch index 470c1a3..01645d0 100644 --- a/patches/server/0023-Cannon-Mechanics.patch +++ b/patches/server/0023-Cannon-Mechanics.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cannon Mechanics diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index c2f56308492d1e5d56993e32db8daaba8e081274..00c17b86c69b73d751ca93b65a54c74b6ed8fa6f 100644 +index 7dd6f7df5927c55bcfdf3a4708155d49d207b5d4..388b1985ee9e1d17f41aea7488efa99257f38076 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -72,6 +72,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti @@ -16,7 +16,7 @@ index c2f56308492d1e5d56993e32db8daaba8e081274..00c17b86c69b73d751ca93b65a54c74b // Sakura start - merge cannon entities private final me.samsuik.sakura.entity.merge.MergeEntityData mergeData = new me.samsuik.sakura.entity.merge.MergeEntityData(this); -@@ -132,6 +133,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -133,6 +134,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti this.isFallingBlock = true; // Sakura this.loadChunks = world.sakuraConfig().cannons.loadChunks; // Sakura - load chunks on movement this.mergeData.setMergeLevel(world.sakuraConfig().cannons.mergeLevel); // Sakura - merge cannon entities @@ -24,7 +24,7 @@ index c2f56308492d1e5d56993e32db8daaba8e081274..00c17b86c69b73d751ca93b65a54c74b } public FallingBlockEntity(Level world, double x, double y, double z, BlockState block) { -@@ -189,6 +191,13 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -190,6 +192,13 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti return !this.isRemoved(); } diff --git a/patches/server/0028-Despawn-falling-blocks-inside-moving-pistons.patch b/patches/server/0028-Despawn-falling-blocks-inside-moving-pistons.patch index a9d355b..3a1eec5 100644 --- a/patches/server/0028-Despawn-falling-blocks-inside-moving-pistons.patch +++ b/patches/server/0028-Despawn-falling-blocks-inside-moving-pistons.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Despawn falling blocks inside moving pistons diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 00c17b86c69b73d751ca93b65a54c74b6ed8fa6f..448f4ce99a06b6683c9cf324444dee491a11f9e9 100644 +index 388b1985ee9e1d17f41aea7488efa99257f38076..cde44444f88ab5feb481acca1f830d8131f80c2e 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -239,7 +239,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -240,7 +240,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti } } diff --git a/patches/server/0033-Falling-Block-Stacking-Restrictions.patch b/patches/server/0033-Falling-Block-Stacking-Restrictions.patch index 3482e3e..43ca9c9 100644 --- a/patches/server/0033-Falling-Block-Stacking-Restrictions.patch +++ b/patches/server/0033-Falling-Block-Stacking-Restrictions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Falling Block Stacking Restrictions diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 448f4ce99a06b6683c9cf324444dee491a11f9e9..672d5cf4c8a9ae759c591a590e6205afe5f81d36 100644 +index cde44444f88ab5feb481acca1f830d8131f80c2e..f4c84e47b673066ee9ddc7a33c5fabdca7b9c563 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -257,7 +257,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -258,7 +258,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti boolean flag3 = FallingBlock.isFree(this.level().getBlockState(blockposition.below())) && (!flag || !flag1); boolean flag4 = this.blockState.canSurvive(this.level(), blockposition) && !flag3; diff --git a/patches/server/0039-Configure-cannon-physics-by-version.patch b/patches/server/0039-Configure-cannon-physics-by-version.patch index a25a710..ff3cb97 100644 --- a/patches/server/0039-Configure-cannon-physics-by-version.patch +++ b/patches/server/0039-Configure-cannon-physics-by-version.patch @@ -252,10 +252,10 @@ index 4ff172a89cbbaba96e5c1056f9d9356a4da13499..59635ea26387d3ea4c6bb5a64f32b7c5 if (this.level().hasChunksAt(blockposition, blockposition1)) { BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos(); diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 672d5cf4c8a9ae759c591a590e6205afe5f81d36..d886a5c514266cf8d46ce163e33dec35941d56aa 100644 +index f4c84e47b673066ee9ddc7a33c5fabdca7b9c563..42481aae8b4eb6a3a25fa96f1187774493009e46 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -146,6 +146,8 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -147,6 +147,8 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti this.yo = y; this.zo = z; this.setStartPos(this.blockPosition()); @@ -264,7 +264,7 @@ index 672d5cf4c8a9ae759c591a590e6205afe5f81d36..d886a5c514266cf8d46ce163e33dec35 } public static FallingBlockEntity fall(Level world, BlockPos pos, BlockState state) { -@@ -158,7 +160,11 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -159,7 +161,11 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti FallingBlockEntity entityfallingblock = new FallingBlockEntity(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, iblockdata.hasProperty(BlockStateProperties.WATERLOGGED) ? (BlockState) iblockdata.setValue(BlockStateProperties.WATERLOGGED, false) : iblockdata); if (!CraftEventFactory.callEntityChangeBlockEvent(entityfallingblock, blockposition, iblockdata.getFluidState().createLegacyBlock())) return entityfallingblock; // CraftBukkit @@ -277,7 +277,7 @@ index 672d5cf4c8a9ae759c591a590e6205afe5f81d36..d886a5c514266cf8d46ce163e33dec35 world.addFreshEntity(entityfallingblock, spawnReason); // CraftBukkit return entityfallingblock; } -@@ -197,10 +203,47 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -198,10 +204,47 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti return this.heightParity ? this.getY() : super.getEyeY(); } // Sakura end - configure cannon mechanics @@ -326,7 +326,7 @@ index 672d5cf4c8a9ae759c591a590e6205afe5f81d36..d886a5c514266cf8d46ce163e33dec35 } @Override -@@ -210,6 +253,11 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -211,6 +254,11 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti } else { Block block = this.blockState.getBlock(); @@ -338,7 +338,7 @@ index 672d5cf4c8a9ae759c591a590e6205afe5f81d36..d886a5c514266cf8d46ce163e33dec35 ++this.time; this.applyGravity(); this.moveBasic(MoverType.SELF, this.getDeltaMovement()); // Sakura - optimise cannon entity movement -@@ -224,8 +272,15 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -225,8 +273,15 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti } // Paper end - Configurable falling blocks height nerf this.handlePortal(); @@ -355,7 +355,7 @@ index 672d5cf4c8a9ae759c591a590e6205afe5f81d36..d886a5c514266cf8d46ce163e33dec35 boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock; boolean flag1 = flag && this.level().getFluidState(blockposition).is(FluidTags.WATER); double d0 = this.getDeltaMovement().lengthSqr(); -@@ -250,8 +305,11 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -251,8 +306,11 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti } else { BlockState iblockdata = this.level().getBlockState(blockposition); @@ -369,7 +369,7 @@ index 672d5cf4c8a9ae759c591a590e6205afe5f81d36..d886a5c514266cf8d46ce163e33dec35 if (!this.cancelDrop) { boolean flag2 = iblockdata.canBeReplaced((BlockPlaceContext) (new DirectionalPlaceContext(this.level(), blockposition, Direction.DOWN, ItemStack.EMPTY, Direction.UP))); boolean flag3 = FallingBlock.isFree(this.level().getBlockState(blockposition.below())) && (!flag || !flag1); -@@ -318,7 +376,12 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -319,7 +377,12 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti } } diff --git a/patches/server/0041-Configure-concrete-solidifying-in-water.patch b/patches/server/0041-Configure-concrete-solidifying-in-water.patch index 6fa7e8b..e1da42e 100644 --- a/patches/server/0041-Configure-concrete-solidifying-in-water.patch +++ b/patches/server/0041-Configure-concrete-solidifying-in-water.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configure concrete solidifying in water diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index d886a5c514266cf8d46ce163e33dec35941d56aa..e86ac1779cf382b70f6dabd281260c3e78e9376b 100644 +index 42481aae8b4eb6a3a25fa96f1187774493009e46..7a130dbd04b24b2905fbc2a6f9303aae7fd61fd9 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -281,7 +281,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -282,7 +282,7 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti // However, it makes sense for legacy versions pre-1.17 before the world height change. BlockPos blockposition = this.physics.before(1_17_0) ? this.patchedBlockPosition() : this.blockPosition(); // Sakura end - physics version api diff --git a/patches/server/0059-Fix-doEntityDrops-gamerule-preventing-falling-blocks.patch b/patches/server/0059-Fix-doEntityDrops-gamerule-preventing-falling-blocks.patch index b0c7a55..2ae666d 100644 --- a/patches/server/0059-Fix-doEntityDrops-gamerule-preventing-falling-blocks.patch +++ b/patches/server/0059-Fix-doEntityDrops-gamerule-preventing-falling-blocks.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix doEntityDrops gamerule preventing falling blocks from diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index e86ac1779cf382b70f6dabd281260c3e78e9376b..d52993f1f2e8395c480fdcc639dadc32ecaa23bc 100644 +index 7a130dbd04b24b2905fbc2a6f9303aae7fd61fd9..ad554a9361d6b27cc9f67f72cb7473622a53be1a 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -356,10 +356,14 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti +@@ -357,10 +357,14 @@ public class FallingBlockEntity extends Entity implements me.samsuik.sakura.enti tileentity.setChanged(); } }