diff --git a/patches/server/0101-Spider-jockeys-drop-gapples.patch b/patches/server/0095-Spider-jockeys-drop-gapples.patch similarity index 66% rename from patches/server/0101-Spider-jockeys-drop-gapples.patch rename to patches/server/0095-Spider-jockeys-drop-gapples.patch index fa5be2fe..76ccec2e 100644 --- a/patches/server/0101-Spider-jockeys-drop-gapples.patch +++ b/patches/server/0095-Spider-jockeys-drop-gapples.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Spider jockeys drop gapples diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java -index e675f1e3e5b6f9e1aa0d928ebb9abe76458edb38..902119c7501e98b2a4a67504216ad2cded138f87 100644 +index 91e521414c3ea5722aac7506b7589fbb399e9636..c38aa7d17c8a3e8cfa6a738588b6592eb6f13dd1 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Spider.java +++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java @@ -145,6 +145,18 @@ public class Spider extends Monster { @@ -14,11 +14,11 @@ index e675f1e3e5b6f9e1aa0d928ebb9abe76458edb38..902119c7501e98b2a4a67504216ad2cd + // Leaves start - spider jockeys drop gapples + @Override -+ protected void dropFromLootTable(DamageSource damageSource, boolean causedByPlayer) { -+ super.dropFromLootTable(damageSource, causedByPlayer); ++ protected void dropFromLootTable(net.minecraft.server.level.ServerLevel wolrd, DamageSource damageSource, boolean causedByPlayer) { ++ super.dropFromLootTable(wolrd, damageSource, causedByPlayer); + if (org.leavesmc.leaves.LeavesConfig.spiderJockeysDropGapples > 0.0D) { + if (this.hasPassenger(entity -> entity.getType() == EntityType.SKELETON) && this.random.nextDouble() < org.leavesmc.leaves.LeavesConfig.spiderJockeysDropGapples) { -+ this.spawnAtLocation(new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ENCHANTED_GOLDEN_APPLE)); ++ this.spawnAtLocation(wolrd, new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ENCHANTED_GOLDEN_APPLE)); + } + } + } @@ -26,4 +26,4 @@ index e675f1e3e5b6f9e1aa0d928ebb9abe76458edb38..902119c7501e98b2a4a67504216ad2cd + @Nullable @Override - public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, MobSpawnType spawnReason, @Nullable SpawnGroupData entityData) { + public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, EntitySpawnReason spawnReason, @Nullable SpawnGroupData entityData) { diff --git a/patches/server/0102-Force-Void-Trade.patch b/patches/server/0096-Force-Void-Trade.patch similarity index 88% rename from patches/server/0102-Force-Void-Trade.patch rename to patches/server/0096-Force-Void-Trade.patch index c3e0eb21..36f5140c 100644 --- a/patches/server/0102-Force-Void-Trade.patch +++ b/patches/server/0096-Force-Void-Trade.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Force Void Trade diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java -index ebdb1546fb057bf4881d53538f8e44c14fe88b74..c3c70493e418e70c4cb6ef3cb67caf2a2cf23896 100644 +index c7f0a3e36959843b557615f55d32e6f1b3e9f456..8ebc52da0f6914e5641e2f5a220a0e94d461b488 100644 --- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java @@ -64,6 +64,7 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa @@ -74,7 +74,7 @@ index ebdb1546fb057bf4881d53538f8e44c14fe88b74..c3c70493e418e70c4cb6ef3cb67caf2a + // Leaves end - force void trade } diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 18642b4e43d0725690be44b53bbddb6d4486e5f1..8a21e03c012b047eef3948e10bdb23766194b670 100644 +index a98f9c22f8485ff3a9812cce19d47a0b08f2c054..5f1b12bc2294d7c2e21c9bea212e29dbb93c7e02 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java @@ -348,6 +348,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -85,7 +85,7 @@ index 18642b4e43d0725690be44b53bbddb6d4486e5f1..8a21e03c012b047eef3948e10bdb2376 this.updateSpecialPrices(customer); this.setTradingPlayer(customer); this.openTradingScreen(customer, this.getDisplayName(), this.getVillagerData().getLevel()); -@@ -645,8 +646,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -639,8 +640,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler protected void rewardTradeXp(MerchantOffer offer) { int i = 3 + this.random.nextInt(4); @@ -101,10 +101,10 @@ index 18642b4e43d0725690be44b53bbddb6d4486e5f1..8a21e03c012b047eef3948e10bdb2376 this.updateMerchantTimer = 40; this.increaseProfessionLevelOnUpdate = true; diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -index 0af34e0f9c9696fbcb11b12fb27472ef17ad532a..422d537014520383503f06e834ef6fb31813beb8 100644 +index 1e77cce428d9e53142aaa2cf780b7f862d536eca..2bac91f7f6943c7e1b5f63ea7dfeb3c3e390bcb7 100644 --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java -@@ -122,9 +122,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill +@@ -123,9 +123,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill return InteractionResult.CONSUME; } @@ -116,10 +116,10 @@ index 0af34e0f9c9696fbcb11b12fb27472ef17ad532a..422d537014520383503f06e834ef6fb3 + this.openTradingScreen(player, this.getDisplayName(), 1); + } - return InteractionResult.sidedSuccess(this.level().isClientSide); + return InteractionResult.SUCCESS; } else { diff --git a/src/main/java/net/minecraft/world/inventory/MerchantMenu.java b/src/main/java/net/minecraft/world/inventory/MerchantMenu.java -index 5de2030452b96a4df7ce0be82f07e002db595dee..7c2b12fcc8028fc029af17e3bae2901843b47b62 100644 +index 6a529b5e289c416c0ebdc0260086ec039777aa40..f41e9303c6e118a426e779d4bbca450011ed7246 100644 --- a/src/main/java/net/minecraft/world/inventory/MerchantMenu.java +++ b/src/main/java/net/minecraft/world/inventory/MerchantMenu.java @@ -27,7 +27,7 @@ public class MerchantMenu extends AbstractContainerMenu { @@ -178,10 +178,10 @@ index 0efc8d997b34302c3e0a5d7ec73a11a940dbeefe..d246c9932f3f98972124089306d6ed74 public void setToOutOfStock() { diff --git a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java -index 3f5bb5c9ceb5b31fcc9ef0a7a6157e1e1cb2a09f..3087c60589de8fc38e12d322e58886ba76749507 100644 +index a7a21f071161fb7e73a046717d2462f871ab653c..8159f81defa377f56b8d836d9c3a8ff2107ff8fa 100644 --- a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java +++ b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java -@@ -118,6 +118,16 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal { +@@ -120,6 +120,16 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal { if (tileentity instanceof TheEndGatewayBlockEntity tileentityendgateway) { Vec3 vec3d = tileentityendgateway.getPortalPosition(world, pos); @@ -195,6 +195,6 @@ index 3f5bb5c9ceb5b31fcc9ef0a7a6157e1e1cb2a09f..3087c60589de8fc38e12d322e58886ba + } + // Leaves end - force void trade + - return vec3d != null ? new DimensionTransition(world, vec3d, EndGatewayBlock.calculateExitMovement(entity), entity.getYRot(), entity.getXRot(), DimensionTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : null; // CraftBukkit + return vec3d == null ? null : (entity instanceof ThrownEnderpearl ? new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY)); // CraftBukkit } else { return null; diff --git a/patches/server/0103-Villager-infinite-discounts.patch b/patches/server/0097-Villager-infinite-discounts.patch similarity index 100% rename from patches/server/0103-Villager-infinite-discounts.patch rename to patches/server/0097-Villager-infinite-discounts.patch diff --git a/patches/server/0104-CCE-update-suppression.patch b/patches/server/0098-CCE-update-suppression.patch similarity index 92% rename from patches/server/0104-CCE-update-suppression.patch rename to patches/server/0098-CCE-update-suppression.patch index e46273b8..33d67d53 100644 --- a/patches/server/0104-CCE-update-suppression.patch +++ b/patches/server/0098-CCE-update-suppression.patch @@ -5,10 +5,10 @@ Subject: [PATCH] CCE update suppression diff --git a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java -index 8e899549f09b8429cd63bd5c895253325f65ccab..7d88524eb5b193600c8985c68bb9ed10e3fe3c4d 100644 +index 2ae2f899183e3043b524712f0944bb9e894d74ab..aa7f993654de91f2af5d52fa41ab5d77aece47e1 100644 --- a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java -@@ -243,17 +243,21 @@ public class ShulkerBoxBlock extends BaseEntityBlock { +@@ -239,17 +239,21 @@ public class ShulkerBoxBlock extends BaseEntityBlock { @Override protected int getAnalogOutputSignal(BlockState state, Level world, BlockPos pos) { diff --git a/patches/server/0105-Disable-offline-warn-if-use-proxy.patch b/patches/server/0099-Disable-offline-warn-if-use-proxy.patch similarity index 89% rename from patches/server/0105-Disable-offline-warn-if-use-proxy.patch rename to patches/server/0099-Disable-offline-warn-if-use-proxy.patch index 197a5386..4ca3ea1f 100644 --- a/patches/server/0105-Disable-offline-warn-if-use-proxy.patch +++ b/patches/server/0099-Disable-offline-warn-if-use-proxy.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable offline warn if use proxy diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 3e4d4c417904fba6aeba0dee2e01d3b5bd95ac20..85e7321c7b918db404fca1c75a16ec17bc6b0b2f 100644 +index e57aea5bc337e182f20ae2b90407f0ec15770bc1..beb0c55454e849de092cdf5cff5af73c178a6ed0 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -@@ -303,7 +303,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -301,7 +301,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface String proxyFlavor = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "Velocity" : "BungeeCord"; String proxyLink = (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) ? "https://docs.papermc.io/velocity/security" : "http://www.spigotmc.org/wiki/firewall-guide/"; // Paper end - Add Velocity IP Forwarding Support diff --git a/patches/server/0106-Disable-moved-wrongly-threshold.patch b/patches/server/0100-Disable-moved-wrongly-threshold.patch similarity index 92% rename from patches/server/0106-Disable-moved-wrongly-threshold.patch rename to patches/server/0100-Disable-moved-wrongly-threshold.patch index 3f9d4d01..097d97d0 100644 --- a/patches/server/0106-Disable-moved-wrongly-threshold.patch +++ b/patches/server/0100-Disable-moved-wrongly-threshold.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Disable moved wrongly threshold diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2e08a927f9c3c4a4cfcad16b7a835b80efefdfca..614907d64362ae51b3f19a6d5652e23be28f795c 100644 +index a0b0bee8c2c0452d41872722875dbb131ccceacf..fd05c29b888f7979e208e51cfc8a4110f3324eb9 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -569,7 +569,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -574,7 +574,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } // Paper end - Prevent moving into unloaded chunks @@ -17,7 +17,7 @@ index 2e08a927f9c3c4a4cfcad16b7a835b80efefdfca..614907d64362ae51b3f19a6d5652e23b // CraftBukkit end ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8}); this.send(new ClientboundMoveVehiclePacket(entity)); -@@ -605,7 +605,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -610,7 +610,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl d10 = d6 * d6 + d7 * d7 + d8 * d8; boolean flag2 = false; @@ -26,7 +26,7 @@ index 2e08a927f9c3c4a4cfcad16b7a835b80efefdfca..614907d64362ae51b3f19a6d5652e23b flag2 = true; // Paper - diff on change, this should be moved wrongly ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", new Object[]{entity.getName().getString(), this.player.getName().getString(), Math.sqrt(d10)}); } -@@ -1414,7 +1414,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1426,7 +1426,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl io.papermc.paper.event.player.PlayerFailMoveEvent event = fireFailMove(io.papermc.paper.event.player.PlayerFailMoveEvent.FailReason.MOVED_TOO_QUICKLY, toX, toY, toZ, toYaw, toPitch, true); if (!event.isAllowed()) { @@ -35,7 +35,7 @@ index 2e08a927f9c3c4a4cfcad16b7a835b80efefdfca..614907d64362ae51b3f19a6d5652e23b ServerGamePacketListenerImpl.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[]{this.player.getName().getString(), d6, d7, d8}); this.teleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot()); return; -@@ -1484,7 +1484,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -1496,7 +1496,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl d10 = d6 * d6 + d7 * d7 + d8 * d8; boolean movedWrongly = false; // Paper - Add fail move event; rename diff --git a/patches/server/0107-Armor-stand-cant-kill-by-mob-projectile.patch b/patches/server/0101-Armor-stand-cant-kill-by-mob-projectile.patch similarity index 68% rename from patches/server/0107-Armor-stand-cant-kill-by-mob-projectile.patch rename to patches/server/0101-Armor-stand-cant-kill-by-mob-projectile.patch index 076446ed..e8e3f462 100644 --- a/patches/server/0107-Armor-stand-cant-kill-by-mob-projectile.patch +++ b/patches/server/0101-Armor-stand-cant-kill-by-mob-projectile.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Armor stand cant kill by mob projectile diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 9ab1c4dccf0cc96ecc6f3a2a8dbcb38df0b530af..9883db7b41c44fdb878ae3e110b1339a87dfa7a3 100644 +index dbaa552bed4d09e8b87475732dc911c95893ff89..a73ce65ed27b5cde99694210007b926a8b7112f0 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -531,6 +531,14 @@ public class ArmorStand extends LivingEntity { - boolean flag = source.is(DamageTypeTags.CAN_BREAK_ARMOR_STAND); - boolean flag1 = source.is(DamageTypeTags.ALWAYS_KILLS_ARMOR_STANDS); +@@ -532,6 +532,14 @@ public class ArmorStand extends LivingEntity { + boolean flag = source.is(DamageTypeTags.CAN_BREAK_ARMOR_STAND); + boolean flag1 = source.is(DamageTypeTags.ALWAYS_KILLS_ARMOR_STANDS); + // Leaves start - Armor stand cant kill by mob projectile + if (org.leavesmc.leaves.LeavesConfig.armorStandCantKillByMobProjectile) { @@ -20,6 +20,6 @@ index 9ab1c4dccf0cc96ecc6f3a2a8dbcb38df0b530af..9883db7b41c44fdb878ae3e110b1339a + } + // Leaves end - Armor stand cant kill by mob projectile + - if (!flag && !flag1) { - return false; - } else { + if (!flag && !flag1) { + return false; + } else { diff --git a/patches/server/0108-Make-Item-tick-vanilla.patch b/patches/server/0102-Make-Item-tick-vanilla.patch similarity index 83% rename from patches/server/0108-Make-Item-tick-vanilla.patch rename to patches/server/0102-Make-Item-tick-vanilla.patch index 0bde093b..10b6b72e 100644 --- a/patches/server/0108-Make-Item-tick-vanilla.patch +++ b/patches/server/0102-Make-Item-tick-vanilla.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make Item tick vanilla diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 510735cc63968265d2e1d9deb1a06beda3112ed9..2d885a09fc7bd7c2df76321147c75eeb46808b48 100644 +index 322b22577ae0269b0a4b641112130a8e96c4e344..232e0555ff0e25b528ee1a2ce6c0f0004a631cbb 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -250,6 +250,9 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -251,6 +251,9 @@ public class ItemEntity extends Entity implements TraceableEntity { // Spigot start - copied from above @Override public void inactiveTick() { @@ -18,7 +18,7 @@ index 510735cc63968265d2e1d9deb1a06beda3112ed9..2d885a09fc7bd7c2df76321147c75eeb // Paper start - remove anti tick skipping measures / wall time - copied from above if (this.pickupDelay > 0 && this.pickupDelay != 32767) { --this.pickupDelay; -@@ -268,6 +271,8 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -269,6 +272,8 @@ public class ItemEntity extends Entity implements TraceableEntity { // CraftBukkit end this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause } diff --git a/patches/server/0109-Copper-Bulb-1-gt-delay.patch b/patches/server/0103-Copper-Bulb-1-gt-delay.patch similarity index 87% rename from patches/server/0109-Copper-Bulb-1-gt-delay.patch rename to patches/server/0103-Copper-Bulb-1-gt-delay.patch index a1630015..5dafa6d3 100644 --- a/patches/server/0109-Copper-Bulb-1-gt-delay.patch +++ b/patches/server/0103-Copper-Bulb-1-gt-delay.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Copper Bulb 1 gt delay diff --git a/src/main/java/net/minecraft/world/level/block/CopperBulbBlock.java b/src/main/java/net/minecraft/world/level/block/CopperBulbBlock.java -index b4250059a9068124b76268913f675babac379670..e6cfa8c1ce45c5e4b647ac6faceb838961e69dad 100644 +index 7c6481fc6e84f6477a4d113a222cae51cfa9053a..4e05441e3d78559b372f2a7109aece8c254ba126 100644 --- a/src/main/java/net/minecraft/world/level/block/CopperBulbBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CopperBulbBlock.java -@@ -30,14 +30,26 @@ public class CopperBulbBlock extends Block { +@@ -32,14 +32,26 @@ public class CopperBulbBlock extends Block { @Override protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { if (oldState.getBlock() != state.getBlock() && world instanceof ServerLevel serverLevel) { @@ -24,7 +24,7 @@ index b4250059a9068124b76268913f675babac379670..e6cfa8c1ce45c5e4b647ac6faceb8389 } @Override - protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { + protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) { if (world instanceof ServerLevel serverLevel) { - this.checkAndFlip(state, serverLevel, pos); + // Leaves start - copper bulb 1 gt @@ -37,7 +37,7 @@ index b4250059a9068124b76268913f675babac379670..e6cfa8c1ce45c5e4b647ac6faceb8389 } } -@@ -54,6 +66,15 @@ public class CopperBulbBlock extends Block { +@@ -56,6 +68,15 @@ public class CopperBulbBlock extends Block { } } diff --git a/patches/server/0110-Crafter-1-gt-delay.patch b/patches/server/0104-Crafter-1-gt-delay.patch similarity index 86% rename from patches/server/0110-Crafter-1-gt-delay.patch rename to patches/server/0104-Crafter-1-gt-delay.patch index 98ab68df..bdc0d565 100644 --- a/patches/server/0110-Crafter-1-gt-delay.patch +++ b/patches/server/0104-Crafter-1-gt-delay.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Crafter 1 gt delay diff --git a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java -index deb5b4fab94618c08a51e432c33e49b1627bd717..cd141680fec975b1a286974178b90d89ed8e34f5 100644 +index 0e609b1e3abd50b415d8376dc550375a8a0251b6..730f5376d9d298c05d3e4cf6d4c264f16d97913c 100644 --- a/src/main/java/net/minecraft/world/level/block/CrafterBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CrafterBlock.java -@@ -90,7 +90,7 @@ public class CrafterBlock extends BaseEntityBlock { +@@ -91,7 +91,7 @@ public class CrafterBlock extends BaseEntityBlock { BlockEntity tileentity = world.getBlockEntity(pos); if (flag1 && !flag2) { @@ -17,7 +17,7 @@ index deb5b4fab94618c08a51e432c33e49b1627bd717..cd141680fec975b1a286974178b90d89 world.setBlock(pos, (BlockState) state.setValue(CrafterBlock.TRIGGERED, true), 2); this.setBlockEntityTriggered(tileentity, true); } else if (!flag1 && flag2) { -@@ -156,7 +156,7 @@ public class CrafterBlock extends BaseEntityBlock { +@@ -157,7 +157,7 @@ public class CrafterBlock extends BaseEntityBlock { @Override public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) { if ((Boolean) state.getValue(CrafterBlock.TRIGGERED)) { diff --git a/patches/server/0111-Linear-region-file-format.patch b/patches/server/0105-Linear-region-file-format.patch similarity index 89% rename from patches/server/0111-Linear-region-file-format.patch rename to patches/server/0105-Linear-region-file-format.patch index d578b218..677593e3 100644 --- a/patches/server/0111-Linear-region-file-format.patch +++ b/patches/server/0105-Linear-region-file-format.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Linear region file format This patch is Powered by LinearPurpur(https://github.com/StupidCraft/LinearPurpur) diff --git a/build.gradle.kts b/build.gradle.kts -index 51bf5df7bca5b32e171e452d62f6843a7a10fee1..ecc29f64b5cbd2849f86d22aee8a76d172b3def0 100644 +index fcfdd05ab074523e3ffb58340d7bfb17731b9651..ea3af00594d62ad5ce17e3640ff027e3b6aa2973 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -30,6 +30,10 @@ dependencies { +@@ -42,6 +42,10 @@ dependencies { alsoShade(log4jPlugins.output) implementation("io.netty:netty-codec-haproxy:4.1.97.Final") // Paper - Add support for proxy protocol // Paper end @@ -21,10 +21,10 @@ index 51bf5df7bca5b32e171e452d62f6843a7a10fee1..ecc29f64b5cbd2849f86d22aee8a76d1 implementation("org.ow2.asm:asm-commons:9.7.1") implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/ChunkSystemRegionFileStorage.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/ChunkSystemRegionFileStorage.java -index 73df26b27146bbad2106d57b22dd3c792ed3dd1d..f3bd1488da34ea796c8205088e83d4c5dbd9f6bc 100644 +index a814512fcfb85312474ae2c2c21443843bf57831..c56812494d2cd270eb66bde1f0a8a9b4100777bd 100644 --- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/ChunkSystemRegionFileStorage.java +++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/ChunkSystemRegionFileStorage.java -@@ -7,8 +7,8 @@ public interface ChunkSystemRegionFileStorage { +@@ -8,9 +8,9 @@ public interface ChunkSystemRegionFileStorage { public boolean moonrise$doesRegionFileNotExistNoIO(final int chunkX, final int chunkZ); @@ -34,40 +34,13 @@ index 73df26b27146bbad2106d57b22dd3c792ed3dd1d..f3bd1488da34ea796c8205088e83d4c5 - public RegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException; + public org.leavesmc.leaves.region.AbstractRegionFile moonrise$getRegionFileIfExists(final int chunkX, final int chunkZ) throws IOException; - } -diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/RegionFileIOThread.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/RegionFileIOThread.java -index 3218cbf84f54daf06e84442d5eb1a36d8da6b215..80dd90189d7790066b2e42285f256f21b146600c 100644 ---- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/RegionFileIOThread.java -+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/io/RegionFileIOThread.java -@@ -1043,9 +1043,9 @@ public final class RegionFileIOThread extends PrioritisedQueueExecutorThread { - return ((ChunkSystemRegionFileStorage)(Object)this.getCache()).moonrise$doesRegionFileNotExistNoIO(chunkX, chunkZ); - } - -- public T computeForRegionFile(final int chunkX, final int chunkZ, final boolean existingOnly, final Function function) { -+ public T computeForRegionFile(final int chunkX, final int chunkZ, final boolean existingOnly, final Function function) { // Leaves - final RegionFileStorage cache = this.getCache(); -- final RegionFile regionFile; -+ final org.leavesmc.leaves.region.AbstractRegionFile regionFile; // Leaves - synchronized (cache) { - try { - if (existingOnly) { -@@ -1061,9 +1061,9 @@ public final class RegionFileIOThread extends PrioritisedQueueExecutorThread { - } - } - -- public T computeForRegionFileIfLoaded(final int chunkX, final int chunkZ, final Function function) { -+ public T computeForRegionFileIfLoaded(final int chunkX, final int chunkZ, final Function function) { // Leaves - final RegionFileStorage cache = this.getCache(); -- final RegionFile regionFile; -+ final org.leavesmc.leaves.region.AbstractRegionFile regionFile; // Leaves - - synchronized (cache) { - regionFile = ((ChunkSystemRegionFileStorage)(Object)cache).moonrise$getRegionFileIfLoaded(chunkX, chunkZ); + public MoonriseRegionFileIO.RegionDataController.WriteData moonrise$startWrite( + final int chunkX, final int chunkZ, final CompoundTag compound diff --git a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java -index cb39c629af1827078f35904a373d35a63fea17ff..4f8ec87adc72f096caeb4bb437c5f43b136fb4fc 100644 +index 622d0cbe023774d92d212f242b60b96317720835..c182e2d26a72ebd28636b50bbbc050e34fa600cc 100644 --- a/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java +++ b/src/main/java/net/minecraft/util/worldupdate/WorldUpgrader.java -@@ -76,7 +76,7 @@ public class WorldUpgrader { +@@ -75,7 +75,7 @@ public class WorldUpgrader implements AutoCloseable { volatile int skipped; final Reference2FloatMap> progressMap = Reference2FloatMaps.synchronize(new Reference2FloatOpenHashMap()); volatile Component status = Component.translatable("optimizeWorld.stage.counting"); @@ -76,7 +49,7 @@ index cb39c629af1827078f35904a373d35a63fea17ff..4f8ec87adc72f096caeb4bb437c5f43b final DimensionDataStorage overworldDataStorage; public WorldUpgrader(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, RegistryAccess dynamicRegistryManager, boolean eraseCache, boolean recreateRegionFiles) { -@@ -400,7 +400,7 @@ public class WorldUpgrader { +@@ -399,7 +399,7 @@ public class WorldUpgrader implements AutoCloseable { private static List getAllChunkPositions(RegionStorageInfo key, Path regionDirectory) { File[] afile = regionDirectory.toFile().listFiles((file, s) -> { @@ -85,7 +58,7 @@ index cb39c629af1827078f35904a373d35a63fea17ff..4f8ec87adc72f096caeb4bb437c5f43b }); if (afile == null) { -@@ -420,7 +420,7 @@ public class WorldUpgrader { +@@ -419,7 +419,7 @@ public class WorldUpgrader implements AutoCloseable { List list1 = Lists.newArrayList(); try { @@ -94,7 +67,7 @@ index cb39c629af1827078f35904a373d35a63fea17ff..4f8ec87adc72f096caeb4bb437c5f43b try { for (int i1 = 0; i1 < 32; ++i1) { -@@ -483,7 +483,7 @@ public class WorldUpgrader { +@@ -482,7 +482,7 @@ public class WorldUpgrader implements AutoCloseable { protected abstract boolean tryProcessOnePosition(T storage, ChunkPos chunkPos, ResourceKey worldKey); @@ -103,7 +76,7 @@ index cb39c629af1827078f35904a373d35a63fea17ff..4f8ec87adc72f096caeb4bb437c5f43b if (WorldUpgrader.this.recreateRegionFiles) { if (this.previousWriteFuture != null) { this.previousWriteFuture.join(); -@@ -508,7 +508,7 @@ public class WorldUpgrader { +@@ -507,7 +507,7 @@ public class WorldUpgrader implements AutoCloseable { } } @@ -113,19 +86,19 @@ index cb39c629af1827078f35904a373d35a63fea17ff..4f8ec87adc72f096caeb4bb437c5f43b } diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java -index 1e0439cf3f4008fa430acb90b45f5bc4cdd6d7f2..d7475e04fbfd41bde70ffdbc1fffa7a023b7ca8e 100644 +index 6a465d9b12c92b5385c394fef7456630be97c04d..3155e999b437d49ee99f0f8f362d08417e4bb60d 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java @@ -28,7 +28,7 @@ import net.minecraft.nbt.NbtIo; // Paper import net.minecraft.world.level.ChunkPos; import org.slf4j.Logger; --public class RegionFile implements AutoCloseable { -+public class RegionFile implements AutoCloseable, org.leavesmc.leaves.region.AbstractRegionFile { // Leaves +-public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.storage.ChunkSystemRegionFile { // Paper - rewrite chunk system ++public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patches.chunk_system.storage.ChunkSystemRegionFile, org.leavesmc.leaves.region.AbstractRegionFile { // Paper - rewrite chunk system // Leaves private static final Logger LOGGER = LogUtils.getLogger(); private static final int SECTOR_BYTES = 4096; -@@ -129,7 +129,7 @@ public class RegionFile implements AutoCloseable { +@@ -129,7 +129,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche } // note: only call for CHUNK regionfiles @@ -134,7 +107,7 @@ index 1e0439cf3f4008fa430acb90b45f5bc4cdd6d7f2..d7475e04fbfd41bde70ffdbc1fffa7a0 if (!this.canRecalcHeader) { return false; } -@@ -928,10 +928,10 @@ public class RegionFile implements AutoCloseable { +@@ -953,10 +953,10 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche private static int getChunkIndex(int x, int z) { return (x & 31) + (z & 31) * 32; } @@ -147,7 +120,7 @@ index 1e0439cf3f4008fa430acb90b45f5bc4cdd6d7f2..d7475e04fbfd41bde70ffdbc1fffa7a0 final int offset = getChunkIndex(x, z); boolean previous = this.oversized[offset] == 1; this.oversized[offset] = (byte) (oversized ? 1 : 0); -@@ -970,7 +970,7 @@ public class RegionFile implements AutoCloseable { +@@ -995,7 +995,7 @@ public class RegionFile implements AutoCloseable, ca.spottedleaf.moonrise.patche return this.path.getParent().resolve(this.path.getFileName().toString().replaceAll("\\.mca$", "") + "_oversized_" + x + "_" + z + ".nbt"); } @@ -157,7 +130,7 @@ index 1e0439cf3f4008fa430acb90b45f5bc4cdd6d7f2..d7475e04fbfd41bde70ffdbc1fffa7a0 try (DataInputStream out = new DataInputStream(new java.io.BufferedInputStream(new InflaterInputStream(Files.newInputStream(file))))) { return NbtIo.read((java.io.DataInput) out); diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java -index 40689256711cc94a806ca1da346f4f62eda31526..9cc7699eadf9401fc66b47c86e59cadfaeba9162 100644 +index 78922c3e9a69db1774dd846047b79e9523d7cf41..b70f26604e45fffed3c58c1fd5e36091287d2e94 100644 --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java @@ -21,7 +21,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise @@ -170,8 +143,8 @@ index 40689256711cc94a806ca1da346f4f62eda31526..9cc7699eadf9401fc66b47c86e59cadf private final Path folder; private final boolean sync; @@ -31,9 +31,15 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise - private static final int MAX_NON_EXISTING_CACHE = 1024 * 64; - private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet nonExistingRegionFiles = new it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet(MAX_NON_EXISTING_CACHE+1); + private static final int MAX_NON_EXISTING_CACHE = 1024 * 4; + private final it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet nonExistingRegionFiles = new it.unimi.dsi.fastutil.longs.LongLinkedOpenHashSet(); private static String getRegionFileName(final int chunkX, final int chunkZ) { - return "r." + (chunkX >> REGION_SHIFT) + "." + (chunkZ >> REGION_SHIFT) + ".mca"; + return "r." + (chunkX >> REGION_SHIFT) + "." + (chunkZ >> REGION_SHIFT) + (org.leavesmc.leaves.LeavesConfig.regionFormat != org.leavesmc.leaves.region.RegionFileFormat.LINEAR ? ".mca" : ".linear"); // Leaves @@ -234,16 +207,22 @@ index 40689256711cc94a806ca1da346f4f62eda31526..9cc7699eadf9401fc66b47c86e59cadf this.regionCache.putAndMoveToFirst(key, ret); -@@ -143,7 +153,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise - this.isChunkData = isChunkDataFolder(this.folder); // Paper - recalculate region file headers +@@ -235,12 +245,12 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise + } + + // Paper start - rewrite chunk system +- public RegionFile getRegionFile(ChunkPos chunkcoordintpair) throws IOException { ++ public org.leavesmc.leaves.region.AbstractRegionFile getRegionFile(ChunkPos chunkcoordintpair) throws IOException { // Leaves + return this.getRegionFile(chunkcoordintpair, false); } + // Paper end - rewrite chunk system - public RegionFile getRegionFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit // Paper - public + public org.leavesmc.leaves.region.AbstractRegionFile getRegionFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit // Paper - public // Leaves // Paper start - rewrite chunk system if (existingOnly) { return this.moonrise$getRegionFileIfExists(chunkcoordintpair.x, chunkcoordintpair.z); -@@ -151,7 +161,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise +@@ -248,7 +258,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise synchronized (this) { final long key = ChunkPos.asLong(chunkcoordintpair.x >> REGION_SHIFT, chunkcoordintpair.z >> REGION_SHIFT); @@ -252,7 +231,7 @@ index 40689256711cc94a806ca1da346f4f62eda31526..9cc7699eadf9401fc66b47c86e59cadf if (ret != null) { return ret; } -@@ -166,7 +176,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise +@@ -263,7 +273,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise FileUtil.createDirectoriesSafe(this.folder); @@ -261,7 +240,7 @@ index 40689256711cc94a806ca1da346f4f62eda31526..9cc7699eadf9401fc66b47c86e59cadf this.regionCache.putAndMoveToFirst(key, ret); -@@ -180,7 +190,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise +@@ -277,7 +287,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise org.apache.logging.log4j.LogManager.getLogger().fatal(msg + " (" + file.toString().replaceAll(".+[\\\\/]", "") + " - " + x + "," + z + ") Go clean it up to remove this message. /minecraft:tp " + (x<<4)+" 128 "+(z<<4) + " - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed."); } @@ -270,7 +249,7 @@ index 40689256711cc94a806ca1da346f4f62eda31526..9cc7699eadf9401fc66b47c86e59cadf synchronized (regionfile) { try (DataInputStream datainputstream = regionfile.getChunkDataInputStream(chunkCoordinate)) { CompoundTag oversizedData = regionfile.getOversizedData(chunkCoordinate.x, chunkCoordinate.z); -@@ -215,7 +225,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise +@@ -312,7 +322,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise @Nullable public CompoundTag read(ChunkPos pos) throws IOException { // CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing @@ -279,7 +258,7 @@ index 40689256711cc94a806ca1da346f4f62eda31526..9cc7699eadf9401fc66b47c86e59cadf if (regionfile == null) { return null; } -@@ -279,7 +289,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise +@@ -376,7 +386,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise public void scanChunk(ChunkPos chunkPos, StreamTagVisitor scanner) throws IOException { // CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing @@ -288,7 +267,7 @@ index 40689256711cc94a806ca1da346f4f62eda31526..9cc7699eadf9401fc66b47c86e59cadf if (regionfile == null) { return; } -@@ -309,7 +319,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise +@@ -406,7 +416,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise } public void write(ChunkPos pos, @Nullable CompoundTag nbt) throws IOException { // Paper - public @@ -297,7 +276,7 @@ index 40689256711cc94a806ca1da346f4f62eda31526..9cc7699eadf9401fc66b47c86e59cadf // Paper start - rewrite chunk system if (regionfile == null) { // if the RegionFile doesn't exist, no point in deleting from it -@@ -325,8 +335,33 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise +@@ -422,8 +432,33 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise if (nbt == null) { regionfile.clear(pos); } else { @@ -332,7 +311,7 @@ index 40689256711cc94a806ca1da346f4f62eda31526..9cc7699eadf9401fc66b47c86e59cadf try { NbtIo.write(nbt, (DataOutput) dataoutputstream); regionfile.setOversized(pos.x, pos.z, false); // Paper - We don't do this anymore, mojang stores differently, but clear old meta flag if it exists to get rid of our own meta file once last oversized is gone -@@ -368,7 +403,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise +@@ -465,7 +500,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise // Paper start - rewrite chunk system synchronized (this) { final ExceptionCollector exceptionCollector = new ExceptionCollector<>(); @@ -341,7 +320,7 @@ index 40689256711cc94a806ca1da346f4f62eda31526..9cc7699eadf9401fc66b47c86e59cadf try { regionFile.close(); } catch (final IOException ex) { -@@ -385,7 +420,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise +@@ -482,7 +517,7 @@ public class RegionFileStorage implements AutoCloseable, ca.spottedleaf.moonrise // Paper start - rewrite chunk system synchronized (this) { final ExceptionCollector exceptionCollector = new ExceptionCollector<>(); diff --git a/patches/server/0112-No-TNT-place-update.patch b/patches/server/0106-No-TNT-place-update.patch similarity index 90% rename from patches/server/0112-No-TNT-place-update.patch rename to patches/server/0106-No-TNT-place-update.patch index 3a8db65a..f8fec0d2 100644 --- a/patches/server/0112-No-TNT-place-update.patch +++ b/patches/server/0106-No-TNT-place-update.patch @@ -5,10 +5,10 @@ Subject: [PATCH] No TNT place update diff --git a/src/main/java/net/minecraft/world/level/block/TntBlock.java b/src/main/java/net/minecraft/world/level/block/TntBlock.java -index a3525ae6d83591664e1456f20d9732a8de0ec326..48412de89948175bab7f7060432afef92cdaa27c 100644 +index 2cbe2053dd5d0bcdcd89de69762c77b400b8697a..30f7252f89a532a3ae691fa1ab5f97bdd6d4c4b2 100644 --- a/src/main/java/net/minecraft/world/level/block/TntBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TntBlock.java -@@ -49,7 +49,7 @@ public class TntBlock extends Block { +@@ -51,7 +51,7 @@ public class TntBlock extends Block { @Override protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { if (!oldState.is(state.getBlock())) { diff --git a/patches/server/0113-Servux-Protocol.patch b/patches/server/0107-Servux-Protocol.patch similarity index 95% rename from patches/server/0113-Servux-Protocol.patch rename to patches/server/0107-Servux-Protocol.patch index 5aafc603..422e68d3 100644 --- a/patches/server/0113-Servux-Protocol.patch +++ b/patches/server/0107-Servux-Protocol.patch @@ -4,28 +4,11 @@ Date: Wed, 13 Sep 2023 19:31:20 +0800 Subject: [PATCH] Servux Protocol -diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java -index a608f57ebca98eda88ad749d0aad021678be54f9..aea042e67daeacfb34bbb770bb267ef29921c517 100644 ---- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java -+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java -@@ -412,7 +412,11 @@ public final class RegionizedPlayerChunkLoader { - if (this.sentChunks.add(CoordinateUtils.getChunkKey(chunkX, chunkZ))) { - ((ChunkSystemChunkHolder)((ChunkSystemServerLevel)this.world).moonrise$getChunkTaskScheduler().chunkHolderManager - .getChunkHolder(chunkX, chunkZ).vanillaChunkHolder).moonrise$addReceivedChunk(this.player); -- PlayerChunkSender.sendChunk(this.player.connection, this.world, ((ChunkSystemLevel)this.world).moonrise$getFullChunkIfLoaded(chunkX, chunkZ)); -+ // Leaves start - servux -+ LevelChunk chunk = ((ChunkSystemLevel)this.world).moonrise$getFullChunkIfLoaded(chunkX, chunkZ); -+ org.leavesmc.leaves.protocol.servux.ServuxStructuresProtocol.onStartedWatchingChunk(player, chunk); -+ PlayerChunkSender.sendChunk(this.player.connection, this.world, chunk); -+ // Leaves end - servux - return; - } - throw new IllegalStateException(); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 1337c4c2e966a8eeeee3480206025a6ee520747a..631b83683b5297aeaa6f81f6b73c75ca4e64dd3c 100644 +index fd2039e21382dfc8d9994930e55a6e940ad22c27..511caa9999a1edc0ef5639db711f2676385bcdb1 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2009,6 +2009,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf. +@@ -2155,6 +2155,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } this.lastSpawnChunkRadius = i; diff --git a/patches/server/0114-Placing-locked-hopper-no-longer-send-NC-updates.patch b/patches/server/0108-Placing-locked-hopper-no-longer-send-NC-updates.patch similarity index 88% rename from patches/server/0114-Placing-locked-hopper-no-longer-send-NC-updates.patch rename to patches/server/0108-Placing-locked-hopper-no-longer-send-NC-updates.patch index 36cc9ba7..75ad2278 100644 --- a/patches/server/0114-Placing-locked-hopper-no-longer-send-NC-updates.patch +++ b/patches/server/0108-Placing-locked-hopper-no-longer-send-NC-updates.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Placing locked hopper no longer send NC updates diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 1848ed1dff8327db5c9a01e8e2019997e927692c..79f5a45cb0f4e2ffdbe82614afa6ad017fd1b09e 100644 +index 483cc25754a031200e7cee8524a88f2a58eb167f..03b9c6c7158cf34484a0290755467b45adbd1944 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1128,7 +1128,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl +@@ -1202,7 +1202,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl } if ((i & 1) != 0) { diff --git a/patches/server/0115-Renewable-deepslate.patch b/patches/server/0109-Renewable-deepslate.patch similarity index 88% rename from patches/server/0115-Renewable-deepslate.patch rename to patches/server/0109-Renewable-deepslate.patch index 3d7b3acc..06a9920d 100644 --- a/patches/server/0115-Renewable-deepslate.patch +++ b/patches/server/0109-Renewable-deepslate.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Renewable deepslate diff --git a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java -index 84623c632d8c2f0fa7ec939c711316d757117d23..bba79516a7e3765d6b04992dfae310eb30f889ce 100644 +index a2d023ff011f71f80032f02430a53d6a08a23623..25a6f7fa38f45e289e4c5bd740ff98f04efec28c 100644 --- a/src/main/java/net/minecraft/world/level/block/LiquidBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LiquidBlock.java -@@ -190,7 +190,7 @@ public class LiquidBlock extends Block implements BucketPickup { +@@ -193,7 +193,7 @@ public class LiquidBlock extends Block implements BucketPickup { BlockPos blockposition1 = pos.relative(enumdirection.getOpposite()); if (world.getFluidState(blockposition1).is(FluidTags.WATER)) { @@ -18,10 +18,10 @@ index 84623c632d8c2f0fa7ec939c711316d757117d23..bba79516a7e3765d6b04992dfae310eb // CraftBukkit start if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, pos, block.defaultBlockState())) { diff --git a/src/main/java/net/minecraft/world/level/material/LavaFluid.java b/src/main/java/net/minecraft/world/level/material/LavaFluid.java -index 3bb4a9a1a6249e8ba2de237f801210e7f4fd5825..8f849cd7ee32a2180fc46d5ee618add72b07de72 100644 +index 884db3e64cb22ed765beec8f11ea309fcf810207..0a2113dd697af30a7de3d019d2ff3a650adfbf61 100644 --- a/src/main/java/net/minecraft/world/level/material/LavaFluid.java +++ b/src/main/java/net/minecraft/world/level/material/LavaFluid.java -@@ -211,7 +211,7 @@ public abstract class LavaFluid extends FlowingFluid { +@@ -212,7 +212,7 @@ public abstract class LavaFluid extends FlowingFluid { if (this.is(FluidTags.LAVA) && fluid1.is(FluidTags.WATER)) { if (state.getBlock() instanceof LiquidBlock) { // CraftBukkit start diff --git a/patches/server/0116-Renewable-sponges.patch b/patches/server/0110-Renewable-sponges.patch similarity index 91% rename from patches/server/0116-Renewable-sponges.patch rename to patches/server/0110-Renewable-sponges.patch index 3a54b7bf..626fc0ea 100644 --- a/patches/server/0116-Renewable-sponges.patch +++ b/patches/server/0110-Renewable-sponges.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Renewable sponges diff --git a/src/main/java/net/minecraft/world/entity/monster/Guardian.java b/src/main/java/net/minecraft/world/entity/monster/Guardian.java -index 5df07b59ff6e39687e361d89d7764381ca3ce9ca..465a46f497d726303859ca31688a848699441234 100644 +index 951f46684623582980901c1ebc1870aa5bcf25a1..77514f0e212ad2dfe4994658ac46b85376701de0 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Guardian.java +++ b/src/main/java/net/minecraft/world/entity/monster/Guardian.java -@@ -345,6 +345,28 @@ public class Guardian extends Monster { +@@ -342,6 +342,28 @@ public class Guardian extends Monster { } diff --git a/patches/server/0117-Renewable-coral.patch b/patches/server/0111-Renewable-coral.patch similarity index 93% rename from patches/server/0117-Renewable-coral.patch rename to patches/server/0111-Renewable-coral.patch index 2e8940a3..ca749c80 100644 --- a/patches/server/0117-Renewable-coral.patch +++ b/patches/server/0111-Renewable-coral.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Renewable coral diff --git a/src/main/java/net/minecraft/world/level/block/CoralFanBlock.java b/src/main/java/net/minecraft/world/level/block/CoralFanBlock.java -index 7701683000132479d8c8eaa77ac3f93e41a960be..3bd4308bb2b8cce5091486f5fc57fbc7cb24b202 100644 +index 09849438e2170d8b2fbc82ee7dfc5df28ce91cc9..c63f0b00042db5637bb0ac9f3535295fa3ef7d5f 100644 --- a/src/main/java/net/minecraft/world/level/block/CoralFanBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CoralFanBlock.java -@@ -13,7 +13,7 @@ import net.minecraft.world.level.block.state.BlockState; +@@ -14,7 +14,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.material.Fluid; import net.minecraft.world.level.material.Fluids; @@ -17,8 +17,8 @@ index 7701683000132479d8c8eaa77ac3f93e41a960be..3bd4308bb2b8cce5091486f5fc57fbc7 public static final MapCodec CODEC = RecordCodecBuilder.mapCodec((instance) -> { return instance.group(CoralBlock.DEAD_CORAL_FIELD.forGetter((blockcoralfan) -> { -@@ -63,4 +63,11 @@ public class CoralFanBlock extends BaseCoralFanBlock { - return super.updateShape(state, direction, neighborState, world, pos, neighborPos); +@@ -64,4 +64,11 @@ public class CoralFanBlock extends BaseCoralFanBlock { + return super.updateShape(state, world, tickView, pos, direction, neighborPos, neighborState, random); } } + @@ -30,10 +30,10 @@ index 7701683000132479d8c8eaa77ac3f93e41a960be..3bd4308bb2b8cce5091486f5fc57fbc7 + // Leaves end - renewable coral } diff --git a/src/main/java/net/minecraft/world/level/block/CoralPlantBlock.java b/src/main/java/net/minecraft/world/level/block/CoralPlantBlock.java -index 4c4aa2a63be84ff614a3dc0db2864266755545a2..208685f28509f92483f1efc89302e7a9ce6838c6 100644 +index 5200ceb141795dd7d4d28d861996ce360adeae01..822b42d4d37349361d4dd83ea99add173956d93a 100644 --- a/src/main/java/net/minecraft/world/level/block/CoralPlantBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CoralPlantBlock.java -@@ -16,7 +16,7 @@ import net.minecraft.world.level.material.Fluids; +@@ -17,7 +17,7 @@ import net.minecraft.world.level.material.Fluids; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -42,7 +42,7 @@ index 4c4aa2a63be84ff614a3dc0db2864266755545a2..208685f28509f92483f1efc89302e7a9 public static final MapCodec CODEC = RecordCodecBuilder.mapCodec((instance) -> { return instance.group(CoralBlock.DEAD_CORAL_FIELD.forGetter((blockcoralplant) -> { -@@ -73,4 +73,12 @@ public class CoralPlantBlock extends BaseCoralPlantTypeBlock { +@@ -74,4 +74,12 @@ public class CoralPlantBlock extends BaseCoralPlantTypeBlock { protected VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return CoralPlantBlock.SHAPE; } diff --git a/patches/server/0118-Fast-resume.patch b/patches/server/0112-Fast-resume.patch similarity index 96% rename from patches/server/0118-Fast-resume.patch rename to patches/server/0112-Fast-resume.patch index 9ead8e6a..6085d1c8 100644 --- a/patches/server/0118-Fast-resume.patch +++ b/patches/server/0112-Fast-resume.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fast resume diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java -index 58d3d1a47e9f2423c467bb329c2d5f4b58a8b5ef..ea1ffe6b5e49ccf2b472829ed97e977b4938f3a5 100644 +index a0e5fc2eff605e17704f0726d20e79cbb3d88d6d..b8578fafb7e119ddc451fb1b7532ab598c9c36cb 100644 --- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java +++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/scheduling/ChunkHolderManager.java -@@ -582,6 +582,49 @@ public final class ChunkHolderManager { +@@ -602,6 +602,49 @@ public final class ChunkHolderManager { } } @@ -59,10 +59,10 @@ index 58d3d1a47e9f2423c467bb329c2d5f4b58a8b5ef..ea1ffe6b5e49ccf2b472829ed97e977b return this.removeTicketAtLevel(type, CoordinateUtils.getChunkKey(chunkPos), level, identifier); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 0c43170b31363beca32407bddeee33ef9404d09a..3b4d1bd023904ead8b340021acd1d74b5aa53a87 100644 +index fbebe8a51f33311bc744283c6db1f233a3d5bdcc..6d9b1779cac9979350c8fdc3cf921b512af82c02 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -749,6 +749,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { +@@ -302,7 +302,7 @@ public interface Component extends Message, FormattedText, Iterable { return (MutableComponent) ComponentSerialization.CODEC.parse(registries.createSerializationContext(JsonOps.INSTANCE), json).getOrThrow(JsonParseException::new); } @@ -18,10 +18,10 @@ index 2de8da4dbe2f7b9da740a90829f18bff0b3d5b8c..a8af45393b4733ea3b6639ad7d890896 } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index fc6d2d5febe4a8c7f315997b3dde38b0dd70d03a..b440103be9aaef22a0ea42d0ed05f92a0ceca924 100644 +index 2dfb6dd33a1a20df22ea3928cde2508d469fe8e2..cc8e4b788bc40b9faeaea5c9c61170b42a0ccf3b 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -466,6 +466,12 @@ public abstract class PlayerList { +@@ -470,6 +470,12 @@ public abstract class PlayerList { return; } @@ -35,10 +35,10 @@ index fc6d2d5febe4a8c7f315997b3dde38b0dd70d03a..b440103be9aaef22a0ea42d0ed05f92a // Leaves start - bot support diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8649eae46402d53290f17181003bda5e97114d82..402e590454764117f3f20649bbf13148d0fce521 100644 +index ec5c406e4c6ec0881cfaca3147dae184e9df86a3..04d347e3ad8bcb22b9f0c27fe62b91bd66c9943a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -312,6 +312,7 @@ public final class CraftServer implements Server { +@@ -315,6 +315,7 @@ public final class CraftServer implements Server { public final io.papermc.paper.SparksFly spark; // Paper - spark private final org.leavesmc.leaves.entity.CraftBotManager botManager; // Leaves private final org.leavesmc.leaves.entity.CraftPhotographerManager photographerManager = new org.leavesmc.leaves.entity.CraftPhotographerManager(); // Leaves @@ -46,7 +46,7 @@ index 8649eae46402d53290f17181003bda5e97114d82..402e590454764117f3f20649bbf13148 // Paper start - Folia region threading API private final io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler(); -@@ -3245,4 +3246,15 @@ public final class CraftServer implements Server { +@@ -3274,4 +3275,15 @@ public final class CraftServer implements Server { return photographerManager; } // Leaves end - replay mod api @@ -63,10 +63,10 @@ index 8649eae46402d53290f17181003bda5e97114d82..402e590454764117f3f20649bbf13148 + // Leaves end - Bytebuf API } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 79ebcaac331c8f8860928668701c791b54bdb66b..3b06bb785bf94e70662811eae62e579c5c111e82 100644 +index f31afa163eaa23653bfe6ff95fa35e8844c094d7..fe184bbcd04969f2ecd19ba061ee52f2655c17c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3568,4 +3568,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3578,4 +3578,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundEntityEventPacket(((CraftEntity) target).getHandle(), effect.getData())); } // Paper end - entity effect API diff --git a/patches/server/0123-Allow-grindstone-overstacking.patch b/patches/server/0117-Allow-grindstone-overstacking.patch similarity index 86% rename from patches/server/0123-Allow-grindstone-overstacking.patch rename to patches/server/0117-Allow-grindstone-overstacking.patch index 8b57b8f0..f480925b 100644 --- a/patches/server/0123-Allow-grindstone-overstacking.patch +++ b/patches/server/0117-Allow-grindstone-overstacking.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow grindstone overstacking diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java -index 138f77d13dda574def523d74fa55bc71b5bfa01b..620fac433487caa4d22cb865e8b77c2e372462df 100644 +index 5687f492fc76f699e2a388790ca5380d9b8c8d0a..661919788a0e23e09b707d8fff023e526ea863b1 100644 --- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java -@@ -206,7 +206,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { +@@ -194,7 +194,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { byte b0 = 1; if (!firstInput.isDamageableItem()) { @@ -17,7 +17,7 @@ index 138f77d13dda574def523d74fa55bc71b5bfa01b..620fac433487caa4d22cb865e8b77c2e return ItemStack.EMPTY; } -@@ -290,7 +290,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { +@@ -278,7 +278,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { ItemStack itemstack3 = this.repairSlots.getItem(1); if (slot == 2) { diff --git a/patches/server/0118-Configurable-MC-67.patch b/patches/server/0118-Configurable-MC-67.patch new file mode 100644 index 00000000..fab4f43b --- /dev/null +++ b/patches/server/0118-Configurable-MC-67.patch @@ -0,0 +1,18 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Lumine1909 <133463833+Lumine1909@users.noreply.github.com> +Date: Wed, 26 Jun 2024 18:15:57 +0800 +Subject: [PATCH] Configurable MC-67 + + +diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java +index 9b9b6915ed9660853ea29062a957c1d2aaed392e..754935d08cb4ae4bc4b336b4c55270c55536868a 100644 +--- a/src/main/java/net/minecraft/world/entity/Entity.java ++++ b/src/main/java/net/minecraft/world/entity/Entity.java +@@ -4211,6 +4211,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess + } + + public boolean canTeleport(Level from, Level to) { ++ if (!org.leavesmc.leaves.LeavesConfig.allowEntityPortalWithPassenger && (this.isPassenger() || this.isVehicle())) return false; // Leaves - allowEntityPortalWithPassenger + if (!this.isAlive() || !this.valid) return false; // Paper - Fix item duplication and teleport issues + if (from.dimension() == Level.END && to.dimension() == Level.OVERWORLD) { + Iterator iterator = this.getPassengers().iterator(); diff --git a/patches/server/0119-Disable-end-gateway-portal-entity-ticking.patch b/patches/server/0119-Disable-end-gateway-portal-entity-ticking.patch new file mode 100644 index 00000000..b1446395 --- /dev/null +++ b/patches/server/0119-Disable-end-gateway-portal-entity-ticking.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: violetc <58360096+s-yh-china@users.noreply.github.com> +Date: Mon, 1 Jul 2024 22:09:33 +0800 +Subject: [PATCH] Disable end gateway portal entity ticking + + +diff --git a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java +index 8159f81defa377f56b8d836d9c3a8ff2107ff8fa..491455d7319a025e9eab4da5eb7046fbb82bf525 100644 +--- a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java +@@ -130,7 +130,10 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal { + } + // Leaves end - force void trade + +- return vec3d == null ? null : (entity instanceof ThrownEnderpearl ? new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY)); // CraftBukkit ++ // Leaves start - Disable end gateway portal entity ticking ++ TeleportTransition.PostTeleportTransition postTeleportTransition = org.leavesmc.leaves.LeavesConfig.disableGatewayPortalEntityTicking ? TeleportTransition.DO_NOTHING : TeleportTransition.PLACE_PORTAL_TICKET; ++ return vec3d == null ? null : (entity instanceof ThrownEnderpearl ? new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Set.of(), postTeleportTransition, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), postTeleportTransition, PlayerTeleportEvent.TeleportCause.END_GATEWAY)); // CraftBukkit ++ // Leaves end - Disable end gateway portal entity ticking + } else { + return null; + } diff --git a/patches/server/0126-Disable-crystal-portal-proximity-check.patch b/patches/server/0120-Disable-crystal-portal-proximity-check.patch similarity index 90% rename from patches/server/0126-Disable-crystal-portal-proximity-check.patch rename to patches/server/0120-Disable-crystal-portal-proximity-check.patch index 6a86ba99..7245dc5e 100644 --- a/patches/server/0126-Disable-crystal-portal-proximity-check.patch +++ b/patches/server/0120-Disable-crystal-portal-proximity-check.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Disable crystal-portal proximity check diff --git a/src/main/java/net/minecraft/world/item/EndCrystalItem.java b/src/main/java/net/minecraft/world/item/EndCrystalItem.java -index 5f51e64cb0611a4ba6bdcdcacbcba1063a7f3a5c..29c9543a1afa03b2d2864d366d526029c0f4f0d4 100644 +index b62db8c7c8c57e43869ee239ebf4b02f112355d9..b33ac3221ad9f91d466285a4b00b0e0c67000864 100644 --- a/src/main/java/net/minecraft/world/item/EndCrystalItem.java +++ b/src/main/java/net/minecraft/world/item/EndCrystalItem.java @@ -30,7 +30,7 @@ public class EndCrystalItem extends Item { @@ -28,10 +28,10 @@ index 5f51e64cb0611a4ba6bdcdcacbcba1063a7f3a5c..29c9543a1afa03b2d2864d366d526029 } diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index 6f867139ef83ca6d1fc26f98c4d9e4b7ce689580..98b4c79b46f2ca073d92c3bbade826df8b7c9206 100644 +index 52228cc8f6a26ee465d2bb678090c0d42c5b6ead..b237134ad77b614f6ace990d9784d0ac04605d39 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -@@ -619,12 +619,14 @@ public class EndDragonFight { +@@ -622,12 +622,14 @@ public class EndDragonFight { } public boolean tryRespawn() { // CraftBukkit - return boolean @@ -46,7 +46,7 @@ index 6f867139ef83ca6d1fc26f98c4d9e4b7ce689580..98b4c79b46f2ca073d92c3bbade826df if (this.dragonKilled && this.respawnStage == null) { BlockPos blockposition = this.portalLocation; -@@ -642,6 +644,7 @@ public class EndDragonFight { +@@ -645,6 +647,7 @@ public class EndDragonFight { blockposition = this.portalLocation; } @@ -54,7 +54,7 @@ index 6f867139ef83ca6d1fc26f98c4d9e4b7ce689580..98b4c79b46f2ca073d92c3bbade826df // Paper start - Perf: Do crystal-portal proximity check before entity lookup if (placedEndCrystalPos != null) { // The end crystal must be 0 or 1 higher than the portal origin -@@ -657,6 +660,7 @@ public class EndDragonFight { +@@ -660,6 +663,7 @@ public class EndDragonFight { } } // Paper end - Perf: Do crystal-portal proximity check before entity lookup diff --git a/patches/server/0127-Can-disable-LivingEntity-aiStep-alive-check.patch b/patches/server/0121-Can-disable-LivingEntity-aiStep-alive-check.patch similarity index 82% rename from patches/server/0127-Can-disable-LivingEntity-aiStep-alive-check.patch rename to patches/server/0121-Can-disable-LivingEntity-aiStep-alive-check.patch index c03a24f9..273c4f99 100644 --- a/patches/server/0127-Can-disable-LivingEntity-aiStep-alive-check.patch +++ b/patches/server/0121-Can-disable-LivingEntity-aiStep-alive-check.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Can disable LivingEntity aiStep alive check diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a55264e08b595005e30b3bf0b17a23e7de563bc3..dbe8f6f366e02a035cf4fea81a0bda0322c6b360 100644 +index 563bc62c4463e7414a847db4cf03a0db334ee49e..28ccfcb80faccea74cb4511f6d44709a26e1c61a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3193,7 +3193,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3305,7 +3305,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } } diff --git a/patches/server/0128-Leaves-plugins.patch b/patches/server/0122-Leaves-plugins.patch similarity index 99% rename from patches/server/0128-Leaves-plugins.patch rename to patches/server/0122-Leaves-plugins.patch index 6e15ba99..6eb3893e 100644 --- a/patches/server/0128-Leaves-plugins.patch +++ b/patches/server/0122-Leaves-plugins.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Leaves plugins diff --git a/build.gradle.kts b/build.gradle.kts -index ecc29f64b5cbd2849f86d22aee8a76d172b3def0..881896b9f25afc530f4c04096ee364b80f8e8e0c 100644 +index ea3af00594d62ad5ce17e3640ff027e3b6aa2973..9978421c16ee6799098632b97e76ac268bba54bb 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -34,6 +34,7 @@ dependencies { +@@ -46,6 +46,7 @@ dependencies { implementation("com.github.luben:zstd-jni:1.5.6-3") implementation("org.lz4:lz4-java:1.8.0") // Leaves end - Linear format diff --git a/patches/server/0129-Fix-fortress-mob-spawn.patch b/patches/server/0123-Fix-fortress-mob-spawn.patch similarity index 100% rename from patches/server/0129-Fix-fortress-mob-spawn.patch rename to patches/server/0123-Fix-fortress-mob-spawn.patch diff --git a/patches/server/0124-Configurable-MC-67.patch b/patches/server/0124-Configurable-MC-67.patch deleted file mode 100644 index 4cc34bb8..00000000 --- a/patches/server/0124-Configurable-MC-67.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Lumine1909 <133463833+Lumine1909@users.noreply.github.com> -Date: Wed, 26 Jun 2024 18:15:57 +0800 -Subject: [PATCH] Configurable MC-67 - - -diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 799df7c72e0d4c4ccd4d33a94681ff440ff81d08..4e3bc9334af6b8d3131edb6ce2abffc165a82bb6 100644 ---- a/src/main/java/net/minecraft/world/entity/Entity.java -+++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3918,7 +3918,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - } - - public boolean canChangeDimensions(Level from, Level to) { -- return this.isAlive() && this.valid; // Paper - Fix item duplication and teleport issues -+ return !(!org.leavesmc.leaves.LeavesConfig.allowEntityPortalWithPassenger && (this.isPassenger() || this.isVehicle())) && this.isAlive() && this.valid; // Paper - Fix item duplication and teleport issues // Leaves - allowEntityPortalWithPassenger - } - - public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { diff --git a/patches/server/0130-Fix-FallingBlockEntity-Duplicate.patch b/patches/server/0124-Fix-FallingBlockEntity-Duplicate.patch similarity index 81% rename from patches/server/0130-Fix-FallingBlockEntity-Duplicate.patch rename to patches/server/0124-Fix-FallingBlockEntity-Duplicate.patch index 6ff96f4f..853dab95 100644 --- a/patches/server/0130-Fix-FallingBlockEntity-Duplicate.patch +++ b/patches/server/0124-Fix-FallingBlockEntity-Duplicate.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Fix FallingBlockEntity Duplicate 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 b83be9bbb9f348da83c0fd1ecc7f65c8a58b45b9..e38f588e3043320a9c135e03f506a00924ed58b8 100644 +index 06d9a519e64d4b8b8764b3ad7691ad93b5cee065..e067e826aae963e30dd9e12e57e9a63912165b0d 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -419,7 +419,7 @@ public class FallingBlockEntity extends Entity { +@@ -435,7 +435,7 @@ public class FallingBlockEntity extends Entity { boolean flag = (resourcekey1 == Level.END || resourcekey == Level.END) && resourcekey1 != resourcekey; - Entity entity = super.changeDimension(teleportTarget); + Entity entity = super.teleport(teleportTarget); - this.forceTickAfterTeleportToDuplicate = entity != null && flag && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowUnsafeEndPortalTeleportation; // Paper + this.forceTickAfterTeleportToDuplicate = entity != null && flag; // Paper // Leaves diff --git a/patches/server/0125-Disable-end-gateway-portal-entity-ticking.patch b/patches/server/0125-Disable-end-gateway-portal-entity-ticking.patch deleted file mode 100644 index b8d4407c..00000000 --- a/patches/server/0125-Disable-end-gateway-portal-entity-ticking.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: violetc <58360096+s-yh-china@users.noreply.github.com> -Date: Mon, 1 Jul 2024 22:09:33 +0800 -Subject: [PATCH] Disable end gateway portal entity ticking - - -diff --git a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java -index 3087c60589de8fc38e12d322e58886ba76749507..d16f1defac4030248ad24b4c4a38ca1717908cd4 100644 ---- a/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/EndGatewayBlock.java -@@ -128,7 +128,7 @@ public class EndGatewayBlock extends BaseEntityBlock implements Portal { - } - // Leaves end - force void trade - -- return vec3d != null ? new DimensionTransition(world, vec3d, EndGatewayBlock.calculateExitMovement(entity), entity.getYRot(), entity.getXRot(), DimensionTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : null; // CraftBukkit -+ return vec3d != null ? new DimensionTransition(world, vec3d, EndGatewayBlock.calculateExitMovement(entity), entity.getYRot(), entity.getXRot(), !org.leavesmc.leaves.LeavesConfig.disableGatewayPortalEntityTicking ? DimensionTransition.PLACE_PORTAL_TICKET : DimensionTransition.DO_NOTHING, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : null; // CraftBukkit // Leaves - disable-gateway-portal-entity-ticking - } else { - return null; - } diff --git a/patches/server/0131-Old-BlockEntity-behaviour.patch b/patches/server/0125-Old-BlockEntity-behaviour.patch similarity index 85% rename from patches/server/0131-Old-BlockEntity-behaviour.patch rename to patches/server/0125-Old-BlockEntity-behaviour.patch index 5aa42751..0aaa81ce 100644 --- a/patches/server/0131-Old-BlockEntity-behaviour.patch +++ b/patches/server/0125-Old-BlockEntity-behaviour.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Old BlockEntity behaviour diff --git a/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java b/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java -index ca3a8ead09cf0d3c1352ac266b749bc0bca2ff9a..b705ee10371e77d027b88afc790f346f20c0087f 100644 +index 5a95ecd7e94652d2af3eb42ee9cf61913fb95a69..b570c52023a2a525f9cd9dff595bf584dc4554fb 100644 --- a/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ChiseledBookShelfBlock.java -@@ -197,6 +197,13 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock { +@@ -194,6 +194,13 @@ public class ChiseledBookShelfBlock extends BaseEntityBlock { } chiseledBookShelfBlockEntity.clearContent(); @@ -23,27 +23,27 @@ index ca3a8ead09cf0d3c1352ac266b749bc0bca2ff9a..b705ee10371e77d027b88afc790f346f break label32; } diff --git a/src/main/java/net/minecraft/world/level/block/LecternBlock.java b/src/main/java/net/minecraft/world/level/block/LecternBlock.java -index 3a1e2f62b297f384cc0dcfb828e523a37c703d6f..c45a636f8c3542f7a073d6b76a7bf23a91b8c7dc 100644 +index 70f2e6278e2d970245ca5b46fbd9ffae4727b47b..d7dbb5b911bd4cae95b3a703276954eaca340bbc 100644 --- a/src/main/java/net/minecraft/world/level/block/LecternBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LecternBlock.java -@@ -226,10 +226,11 @@ public class LecternBlock extends BaseEntityBlock { +@@ -229,10 +229,11 @@ public class LecternBlock extends BaseEntityBlock { this.popBook(state, world, pos); } - super.onRemove(state, world, pos, newState, moved); + if (!org.leavesmc.leaves.LeavesConfig.oldBlockEntityBehaviour) super.onRemove(state, world, pos, newState, moved); // Leaves - behaviour 1.21.1- if ((Boolean) state.getValue(LecternBlock.POWERED)) { - world.updateNeighborsAt(pos.below(), this); + LecternBlock.updateBelow(world, pos, state); } + if (org.leavesmc.leaves.LeavesConfig.oldBlockEntityBehaviour) super.onRemove(state, world, pos, newState, moved); // Leaves - behaviour 1.21.1- } } diff --git a/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java b/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java -index 8d57c68d2f20f7c0d5c1be5d5b12e6926aad8c58..f1341d0f6545dfb13d14a37a68fda5b3403604b5 100644 +index 0ed449a188d98f87dbddd2d76009fed02a29ed25..c760061bae7d1f58639f7f80afbe779b5a08e89c 100644 --- a/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SculkSensorBlock.java -@@ -150,10 +150,11 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg +@@ -151,10 +151,11 @@ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterlogg @Override protected void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) { if (!state.is(newState.getBlock())) { @@ -57,10 +57,10 @@ index 8d57c68d2f20f7c0d5c1be5d5b12e6926aad8c58..f1341d0f6545dfb13d14a37a68fda5b3 } } diff --git a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java -index 7d88524eb5b193600c8985c68bb9ed10e3fe3c4d..7f966d72b3124a79a5941c574ede329184666389 100644 +index aa7f993654de91f2af5d52fa41ab5d77aece47e1..fa8f3ed205e7b9fb6bf5a7b1461eb929e6c542c2 100644 --- a/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ShulkerBoxBlock.java -@@ -186,10 +186,11 @@ public class ShulkerBoxBlock extends BaseEntityBlock { +@@ -182,10 +182,11 @@ public class ShulkerBoxBlock extends BaseEntityBlock { protected void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) { if (!state.is(newState.getBlock())) { BlockEntity blockEntity = world.getBlockEntity(pos); @@ -74,7 +74,7 @@ index 7d88524eb5b193600c8985c68bb9ed10e3fe3c4d..7f966d72b3124a79a5941c574ede3291 } diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index f2ef63d69bfc6fb3b3dc4b3b2938733d1c371746..e6c67426c9ea76eae2c677d796d0db579acaed6e 100644 +index 1f929b467a0ece3143af58a657cf5983c07a8d51..65d0292a615b8ad142697bb8367a586b4b72644d 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java @@ -67,7 +67,7 @@ public abstract class BlockEntity { diff --git a/patches/server/0132-Revert-raid-changes.patch b/patches/server/0126-Revert-raid-changes.patch similarity index 70% rename from patches/server/0132-Revert-raid-changes.patch rename to patches/server/0126-Revert-raid-changes.patch index 80f0bc54..56791015 100644 --- a/patches/server/0132-Revert-raid-changes.patch +++ b/patches/server/0126-Revert-raid-changes.patch @@ -5,43 +5,26 @@ Subject: [PATCH] Revert raid changes diff --git a/src/main/java/net/minecraft/world/effect/BadOmenMobEffect.java b/src/main/java/net/minecraft/world/effect/BadOmenMobEffect.java -index 038ee9e1ef4c7fc6a92efbba0f2ec9063c236df5..391be234ad2635cabb0eb39eecb1e07d2d872518 100644 +index e33e8db5f24437081d2026e66c13256aa3893a15..90060d6782e1169f540addcfdca00d1412b5cba6 100644 --- a/src/main/java/net/minecraft/world/effect/BadOmenMobEffect.java +++ b/src/main/java/net/minecraft/world/effect/BadOmenMobEffect.java -@@ -1,5 +1,6 @@ - package net.minecraft.world.effect; - -+import net.minecraft.core.BlockPos; - import net.minecraft.server.level.ServerLevel; - import net.minecraft.server.level.ServerPlayer; - import net.minecraft.world.Difficulty; -@@ -20,6 +21,11 @@ class BadOmenMobEffect extends MobEffect { - public boolean applyEffectTick(LivingEntity entity, int amplifier) { - if (entity instanceof ServerPlayer serverPlayer && !serverPlayer.isSpectator()) { - ServerLevel serverLevel = serverPlayer.serverLevel(); +@@ -22,6 +22,11 @@ class BadOmenMobEffect extends MobEffect { + && !serverPlayer.isSpectator() + && world.getDifficulty() != Difficulty.PEACEFUL + && world.isVillage(serverPlayer.blockPosition())) { + // Leaves start - Revert raid changes + if (org.leavesmc.leaves.LeavesConfig.allowBadOmenTriggerRaid) { -+ return this.legacyApplyEffectTick(serverPlayer, serverLevel); ++ return world.getRaids().createOrExtendRaid(serverPlayer, serverPlayer.blockPosition()) != null; + } + // Leaves end - Revert raid changes - if (serverLevel.getDifficulty() != Difficulty.PEACEFUL && serverLevel.isVillage(serverPlayer.blockPosition())) { - Raid raid = serverLevel.getRaidAt(serverPlayer.blockPosition()); - if (raid == null || raid.getRaidOmenLevel() < raid.getMaxRaidOmenLevel()) { -@@ -32,4 +38,9 @@ class BadOmenMobEffect extends MobEffect { - - return true; - } -+ -+ private boolean legacyApplyEffectTick(ServerPlayer player, ServerLevel world) { -+ BlockPos blockPos = player.blockPosition(); -+ return world.getDifficulty() == Difficulty.PEACEFUL || !world.isVillage(blockPos) || world.getRaids().createOrExtendRaid(player, blockPos) == null; -+ } - } + Raid raid = world.getRaidAt(serverPlayer.blockPosition()); + if (raid == null || raid.getRaidOmenLevel() < raid.getMaxRaidOmenLevel()) { + serverPlayer.addEffect(new MobEffectInstance(MobEffects.RAID_OMEN, 600, amplifier)); diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java -index 6e68f8fa8280a106b1a262d86aa130e89d4f5cce..2401ebf4f2cbc841c7938eba2e0bd7dd54124c9e 100644 +index 18e4c53cb5c65647c3633ab41305a593fdc67c02..73406fee7cf7cdf371e6b098e9f9ad9390806536 100644 --- a/src/main/java/net/minecraft/world/entity/raid/Raider.java +++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java -@@ -16,8 +16,11 @@ import net.minecraft.network.syncher.EntityDataSerializers; +@@ -17,8 +17,11 @@ import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvent; @@ -51,9 +34,9 @@ index 6e68f8fa8280a106b1a262d86aa130e89d4f5cce..2401ebf4f2cbc841c7938eba2e0bd7dd +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.effect.MobEffects; import net.minecraft.world.entity.Entity; + import net.minecraft.world.entity.EntitySpawnReason; import net.minecraft.world.entity.EntityType; - import net.minecraft.world.entity.EquipmentSlot; -@@ -30,10 +33,13 @@ import net.minecraft.world.entity.ai.targeting.TargetingConditions; +@@ -32,10 +35,13 @@ import net.minecraft.world.entity.ai.targeting.TargetingConditions; import net.minecraft.world.entity.ai.util.DefaultRandomPos; import net.minecraft.world.entity.ai.village.poi.PoiManager; import net.minecraft.world.entity.ai.village.poi.PoiTypes; @@ -66,8 +49,8 @@ index 6e68f8fa8280a106b1a262d86aa130e89d4f5cce..2401ebf4f2cbc841c7938eba2e0bd7dd +import net.minecraft.world.level.GameRules; import net.minecraft.world.level.Level; import net.minecraft.world.level.ServerLevelAccessor; - import net.minecraft.world.phys.Vec3; -@@ -131,6 +137,43 @@ public abstract class Raider extends PatrollingMonster { + import net.minecraft.world.level.pathfinder.Path; +@@ -134,6 +140,43 @@ public abstract class Raider extends PatrollingMonster { raid.removeFromRaid(this, false); } diff --git a/patches/server/0133-Allow-anvil-destroy-item-entities.patch b/patches/server/0127-Allow-anvil-destroy-item-entities.patch similarity index 87% rename from patches/server/0133-Allow-anvil-destroy-item-entities.patch rename to patches/server/0127-Allow-anvil-destroy-item-entities.patch index 56d5254a..eacac76f 100644 --- a/patches/server/0133-Allow-anvil-destroy-item-entities.patch +++ b/patches/server/0127-Allow-anvil-destroy-item-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow anvil destroy item entities 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 e38f588e3043320a9c135e03f506a00924ed58b8..5e91b222f9e6e908071d7b21a3fb782fa52eddab 100644 +index e067e826aae963e30dd9e12e57e9a63912165b0d..4091d47da49f5a864604f097b3d7644c1e307808 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -275,7 +275,7 @@ public class FallingBlockEntity extends Entity { +@@ -291,7 +291,7 @@ public class FallingBlockEntity extends Entity { if (i < 0) { return false; } else { diff --git a/patches/server/0134-Fix-Incorrect-Collision-Behavior-for-Block-Shape.patch b/patches/server/0128-Fix-Incorrect-Collision-Behavior-for-Block-Shape.patch similarity index 78% rename from patches/server/0134-Fix-Incorrect-Collision-Behavior-for-Block-Shape.patch rename to patches/server/0128-Fix-Incorrect-Collision-Behavior-for-Block-Shape.patch index ab154112..1869476a 100644 --- a/patches/server/0134-Fix-Incorrect-Collision-Behavior-for-Block-Shape.patch +++ b/patches/server/0128-Fix-Incorrect-Collision-Behavior-for-Block-Shape.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Incorrect Collision Behavior for Block Shape diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java b/src/main/java/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java -index 748ab4d637ce463272bae4fdbab6842a27385126..1de40570caed06942d6aba638ee4fa1acb2ecfd1 100644 +index aec503ca1551ce4b15b8975832cd664ebd670722..7815fd1f7aa621351905555fa63479cce1798d99 100644 --- a/src/main/java/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java +++ b/src/main/java/ca/spottedleaf/moonrise/patches/collisions/CollisionUtil.java -@@ -56,6 +56,14 @@ public final class CollisionUtil { +@@ -101,6 +101,14 @@ public final class CollisionUtil { (box1.minZ - box2.maxZ) < -COLLISION_EPSILON && (box1.maxZ - box2.minZ) > COLLISION_EPSILON; } @@ -21,10 +21,10 @@ index 748ab4d637ce463272bae4fdbab6842a27385126..1de40570caed06942d6aba638ee4fa1a + // Leaves end + // assume !isEmpty(target) && abs(source_move) >= COLLISION_EPSILON - public static double collideX(final net.minecraft.world.phys.AABB target, final net.minecraft.world.phys.AABB source, final double source_move) { + public static double collideX(final AABB target, final AABB source, final double source_move) { if ((source.minY - target.maxY) < -COLLISION_EPSILON && (source.maxY - target.minY) > COLLISION_EPSILON && -@@ -1700,7 +1708,10 @@ public final class CollisionUtil { - net.minecraft.world.phys.AABB singleAABB = ((ca.spottedleaf.moonrise.patches.collisions.shape.CollisionVoxelShape)blockCollision).moonrise$getSingleAABBRepresentation(); +@@ -2042,7 +2050,10 @@ public final class CollisionUtil { + AABB singleAABB = ((CollisionVoxelShape)blockCollision).moonrise$getSingleAABBRepresentation(); if (singleAABB != null) { singleAABB = singleAABB.move((double)blockX, (double)blockY, (double)blockZ); - if (!voxelShapeIntersect(aabb, singleAABB)) { diff --git a/patches/server/0135-Disable-vault-blacklist.patch b/patches/server/0129-Disable-vault-blacklist.patch similarity index 100% rename from patches/server/0135-Disable-vault-blacklist.patch rename to patches/server/0129-Disable-vault-blacklist.patch