diff --git a/gradle.properties b/gradle.properties index 6aac19d6..07b42208 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group = org.dreeam.leaf version = 1.20.1-R0.1-SNAPSHOT -galeCommit = 9ea4827350d827c685dfe0eeb937914744c98f6c +galeCommit = 4f9aa63f7296cb10f6d6030a9300f600af41ab15 org.gradle.caching = true org.gradle.parallel = true diff --git a/patches/api/0001-Pufferfish-Sentry.patch b/patches/api/0001-Pufferfish-Sentry.patch index 8ad0535e..d9155a82 100644 --- a/patches/api/0001-Pufferfish-Sentry.patch +++ b/patches/api/0001-Pufferfish-Sentry.patch @@ -7,7 +7,7 @@ Original license: GPL v3 Original project: https://github.com/pufferfish-gg/Pufferfish diff --git a/build.gradle.kts b/build.gradle.kts -index adcee0a55ed720cb76f9dcd67be9be8f46fb925c..9796d6d0a1b8fba6f694e8c4d9446d0887aed1ee 100644 +index 8825fd8ff27ba641deaa61c8a5cadb2b236b6512..b9fe57f709de6dc262295a0a0134c371ddd69baa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -46,6 +46,7 @@ dependencies { @@ -216,10 +216,10 @@ index fc2dae69165776d08274e34a69962cc70445f411..899d67fa782fac639fe7fb096e05c551 callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerEventException(msg, ex, registration.getPlugin(), registration.getListener(), event))); } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index eaefbb00e9993d54906cc8cf35cf753c0d6c7707..301e82369603f3dd6e6c1bd380da4bacacd7ef6c 100644 +index 12fe20a5a05dc3780def4c0cb3de0b291c2a8185..3755da1134c109b138b32ebe04a451b5ec88bf72 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -@@ -336,7 +336,13 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -343,7 +343,13 @@ public final class JavaPluginLoader implements PluginLoader { try { jPlugin.setEnabled(true); } catch (Throwable ex) { @@ -233,7 +233,7 @@ index eaefbb00e9993d54906cc8cf35cf753c0d6c7707..301e82369603f3dd6e6c1bd380da4bac } // Perhaps abort here, rather than continue going, but as it stands, -@@ -361,7 +367,9 @@ public final class JavaPluginLoader implements PluginLoader { +@@ -368,7 +374,9 @@ public final class JavaPluginLoader implements PluginLoader { try { jPlugin.setEnabled(false); } catch (Throwable ex) { diff --git a/patches/api/0002-Purpur-API-Changes.patch b/patches/api/0002-Purpur-API-Changes.patch index fb439513..1c9002c9 100644 --- a/patches/api/0002-Purpur-API-Changes.patch +++ b/patches/api/0002-Purpur-API-Changes.patch @@ -2062,7 +2062,7 @@ index cd3296fea01648592d2af89b3d80135acb6d0958..45797a6fbae1d8edc4211cb30def24ad permissions.put(lname, new PermissionAttachmentInfo(parent, lname, attachment, value)); diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 301e82369603f3dd6e6c1bd380da4bacacd7ef6c..0c6ca7588fb3d6b6497ddf032fe75e5c6c9719e5 100644 +index 3755da1134c109b138b32ebe04a451b5ec88bf72..340609e00d9bfecc5f00b2a00a05f8cfc45d9d37 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -55,6 +55,7 @@ public final class JavaPluginLoader implements PluginLoader { @@ -2071,36 +2071,8 @@ index 301e82369603f3dd6e6c1bd380da4bacacd7ef6c..0c6ca7588fb3d6b6497ddf032fe75e5c private final LibraryLoader libraryLoader; + public static boolean SuppressLibraryLoaderLogger = false; // Purpur - /** - * This class was not meant to be constructed explicitly -diff --git a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java -index e4b6f278a811acbb0070e311c5c3bdaff7b00474..ee83ecb054099cb85168a9499dfe967a0a9ec796 100644 ---- a/src/main/java/org/bukkit/plugin/java/LibraryLoader.java -+++ b/src/main/java/org/bukkit/plugin/java/LibraryLoader.java -@@ -65,6 +65,7 @@ public class LibraryLoader - @Override - public void transferStarted(@NotNull TransferEvent event) throws TransferCancelledException - { -+ if (!JavaPluginLoader.SuppressLibraryLoaderLogger) // Purpur - logger.log( Level.INFO, "Downloading {0}", event.getResource().getRepositoryUrl() + event.getResource().getResourceName() ); - } - } ); -@@ -80,6 +81,7 @@ public class LibraryLoader - { - return null; - } -+ if (!JavaPluginLoader.SuppressLibraryLoaderLogger) // Purpur - logger.log( Level.INFO, "[{0}] Loading {1} libraries... please wait", new Object[] - { - java.util.Objects.requireNonNullElseGet(desc.getPrefix(), desc::getName), desc.getLibraries().size() // Paper - use configured log prefix -@@ -118,6 +120,7 @@ public class LibraryLoader - } - - jarFiles.add( url ); -+ if (!JavaPluginLoader.SuppressLibraryLoaderLogger) // Purpur - logger.log( Level.INFO, "[{0}] Loaded library {1}", new Object[] - { - java.util.Objects.requireNonNullElseGet(desc.getPrefix(), desc::getName), file // Paper - use configured log prefix + // Gale start - Purpur - do not log plugin library loads + public static boolean SuppressLibraryLoaderLogger = false; // This is not set by Gale, but is included for compatibility with Purpur plugins diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java index ccdca0d75868135dc7b96daeff2236b225c4add1..cad9f4ddc6be23c595e79419872f8f026703cb80 100644 --- a/src/main/java/org/bukkit/potion/PotionEffect.java diff --git a/patches/server/0010-Purpur-Server-Changes.patch b/patches/server/0010-Purpur-Server-Changes.patch index 0bf118d6..82f362b6 100644 --- a/patches/server/0010-Purpur-Server-Changes.patch +++ b/patches/server/0010-Purpur-Server-Changes.patch @@ -1565,7 +1565,7 @@ index f830ff98ac6e94fa4f0c9d85bcdd8f3816ecc645..24405fb76f0995350f259d5c5b775863 + // Purpur end } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60ae0be013 100644 +index c6d13f1df78d93fb4a21e6733c4ca7d22464bded..59eaa377ca7201d2c634ef30f588969b36f4d6e3 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -349,6 +349,20 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -1725,16 +1725,16 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 } else { ServerLevel worldserver = this.player.serverLevel(); -@@ -1583,7 +1633,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - - if (!this.player.isChangingDimension() && d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot +@@ -1601,7 +1651,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + if (!event.isAllowed()) { flag2 = true; // Paper - diff on change, this should be moved wrongly + if (event.getLogWarning()) - ServerGamePacketListenerImpl.LOGGER.warn("{} moved wrongly!", this.player.getName().getString()); -+ ServerGamePacketListenerImpl.LOGGER.warn("{} moved wrongly!, ({})", this.player.getName().getString(), d11); // Purpur ++ ServerGamePacketListenerImpl.LOGGER.warn("{} moved wrongly!, ({})", this.player.getName().getString(), d11); // Purpur + } + // Paper end } - - // Paper start - optimise out extra getCubes -@@ -1634,6 +1684,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1663,6 +1713,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.lastYaw = to.getYaw(); this.lastPitch = to.getPitch(); @@ -1743,7 +1743,7 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 // Skip the first time we do this if (from.getX() != Double.MAX_VALUE) { Location oldTo = to.clone(); -@@ -1672,6 +1724,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1701,6 +1753,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.resetFallDistance(); } @@ -1757,7 +1757,7 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 this.player.checkMovementStatistics(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5); this.lastGoodX = this.player.getX(); this.lastGoodY = this.player.getY(); -@@ -1704,6 +1763,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1745,6 +1804,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } // Paper end - optimise out extra getCubes @@ -1771,7 +1771,7 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 private boolean isPlayerCollidingWithAnythingNew(LevelReader world, AABB box, double newX, double newY, double newZ) { AABB axisalignedbb1 = this.player.getBoundingBox().move(newX - this.player.getX(), newY - this.player.getY(), newZ - this.player.getZ()); Iterable iterable = world.getCollisions(this.player, axisalignedbb1.deflate(9.999999747378752E-6D)); -@@ -2049,6 +2115,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2090,6 +2156,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean cancelled; if (movingobjectposition == null || movingobjectposition.getType() != HitResult.Type.BLOCK) { @@ -1779,7 +1779,7 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemstack, enumhand); cancelled = event.useItemInHand() == Event.Result.DENY; } else { -@@ -2103,12 +2170,21 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2144,12 +2211,21 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleResourcePackResponse(ServerboundResourcePackPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); @@ -1801,7 +1801,7 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 player.getBukkitEntity().setResourcePackStatus(packStatus); this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packStatus)); // CraftBukkit // Paper end -@@ -2413,7 +2489,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2454,7 +2530,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic do { instant1 = (Instant) this.lastChatTimeStamp.get(); if (timestamp.isBefore(instant1)) { @@ -1810,7 +1810,7 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 } } while (!this.lastChatTimeStamp.compareAndSet(instant1, timestamp)); -@@ -2843,6 +2919,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2884,6 +2960,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic AABB axisalignedbb = entity.getBoundingBox(); if (axisalignedbb.distanceToSqr(this.player.getEyePosition()) < ServerGamePacketListenerImpl.getMaxInteractionDistanceSquared(this.player.level())) { // Gale - make max interaction distance configurable @@ -1818,7 +1818,7 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 packet.dispatch(new ServerboundInteractPacket.Handler() { private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand); -@@ -2856,6 +2933,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2897,6 +2974,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event); @@ -1827,7 +1827,7 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 // Entity in bucket - SPIGOT-4048 and SPIGOT-6859a if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) { entity.getEntityData().resendPossiblyDesyncedEntity(player); // Paper - The entire mob gets deleted, so resend it. -@@ -3435,6 +3514,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3476,6 +3555,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } } @@ -1840,7 +1840,7 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 boolean flag1 = packet.getSlotNum() >= 1 && packet.getSlotNum() <= 45; boolean flag2 = itemstack.isEmpty() || itemstack.getDamageValue() >= 0 && itemstack.getCount() <= 64 && !itemstack.isEmpty(); -@@ -3590,6 +3675,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3631,6 +3716,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister"); private static final ResourceLocation MINECRAFT_BRAND = new ResourceLocation("brand"); // Paper - Brand support @@ -1848,7 +1848,7 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 @Override public void handleCustomPayload(ServerboundCustomPayloadPacket packet) { -@@ -3614,6 +3700,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3655,6 +3741,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex); this.disconnect("Invalid payload UNREGISTER!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); // Paper - kick event cause } @@ -1863,7 +1863,7 @@ index cafe296c9613c3363971a04a9fcd96bf1be8781b..fc43b6892f651af1cd6017aa15e07f60 try { byte[] data = new byte[packet.data.readableBytes()]; diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index ded7811cd10bc436957ed9f1576f3231f1af7b7b..badb262810effd22ca1ba021a1e746a777a19cbc 100644 +index da6e9efd48567149123649e1a1014ebf14a4da2b..2163d62be320031b6cd1bed06a2600801c634112 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java @@ -233,6 +233,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -2282,7 +2282,7 @@ index 14fab63346d56c72cd7534a04760efd10eef4295..745e792482f61c571e2efbd4200dd1bd @Override diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 1bc6a4f616efbb9b78a894da0f501769e28394f4..136b9c7e21cb6eed24066efe81e9a7a33b1fd907 100644 +index 4e1db12dbffd839cd37130ddfd494226c65c0d0e..2763c93cc32b4b0954cb34c67cbeccd2258cd07c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -156,7 +156,7 @@ import org.bukkit.plugin.PluginManager; @@ -2491,7 +2491,7 @@ index 1bc6a4f616efbb9b78a894da0f501769e28394f4..136b9c7e21cb6eed24066efe81e9a7a3 } public int getAirSupply() { -@@ -3759,7 +3825,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3764,7 +3830,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public boolean canChangeDimensions() { @@ -2500,7 +2500,7 @@ index 1bc6a4f616efbb9b78a894da0f501769e28394f4..136b9c7e21cb6eed24066efe81e9a7a3 } public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { -@@ -4066,6 +4132,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4071,6 +4137,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return SlotAccess.NULL; } @@ -2521,7 +2521,7 @@ index 1bc6a4f616efbb9b78a894da0f501769e28394f4..136b9c7e21cb6eed24066efe81e9a7a3 @Override public void sendSystemMessage(Component message) {} -@@ -4347,6 +4427,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4352,6 +4432,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.yRotO = this.getYRot(); } @@ -2534,7 +2534,7 @@ index 1bc6a4f616efbb9b78a894da0f501769e28394f4..136b9c7e21cb6eed24066efe81e9a7a3 public boolean updateFluidHeightAndDoFluidPushing(TagKey tag, double speed) { if (false && this.touchingUnloadedChunk()) { // Gale - Airplane - reduce entity fluid lookups if no fluids - cost of a lookup here is the same cost as below, so skip return false; -@@ -4910,4 +4996,45 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4915,4 +5001,45 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this); } // Paper end @@ -17668,7 +17668,7 @@ index 03455a6cf97b8bec5c84978fdae2c5cc5d27c7ff..cc34d64ae522f69d1d4cbd0be75c50e1 + // Purpur end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 550dcb7d595221b221e4710890d8a3cad789fc07..f30c6e09adb3a6aa485357f859fc2a22227350c9 100644 +index 0cc4025613df85ace29db75cb8c4a465a69b1a06..555f8d3aff7a6c1beed604dddc316d5904a0ea77 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -2290,6 +2290,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0015-Remove-Paper-s-Fix-tripwire-dupe.patch b/patches/server/0015-Remove-Paper-s-Fix-tripwire-dupe.patch deleted file mode 100644 index 8411ebd1..00000000 --- a/patches/server/0015-Remove-Paper-s-Fix-tripwire-dupe.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> -Date: Sun, 6 Nov 2022 04:32:27 -0500 -Subject: [PATCH] Remove Paper's Fix tripwire dupe - -Revert Paper's Fix tripwire state inconsistency patches: -Fix-tripwire-state-inconsistency.patch -Validate-tripwire-hook-placement-before-update.patch - -diff --git a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java -index cb2ff8d94308c637a498d2737f86f6af4c9c1b83..89d3a2b1089a12d623431af9ae39631d5efa881f 100644 ---- a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java -@@ -78,7 +78,7 @@ public class TripWireBlock extends Block { - public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) { - if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return; // Paper - prevent adjacent tripwires from updating - if (!moved && !state.is(newState.getBlock())) { -- this.updateSource(world, pos, (BlockState) state.setValue(TripWireBlock.POWERED, true), true); // Paper - fix state inconsistency -+ this.updateSource(world, pos, (BlockState) state.setValue(TripWireBlock.POWERED, true)); - } - } - -@@ -94,13 +94,6 @@ public class TripWireBlock extends Block { - } - - private void updateSource(Level world, BlockPos pos, BlockState state) { -- if (io.papermc.paper.configuration.GlobalConfiguration.get().blockUpdates.disableTripwireUpdates) return; // Paper - prevent adjacent tripwires from updating -- // Paper start - fix state inconsistency -- this.updateSource(world, pos, state, false); -- } -- -- private void updateSource(Level world, BlockPos pos, BlockState state, boolean beingRemoved) { -- // Paper end - Direction[] aenumdirection = new Direction[]{Direction.SOUTH, Direction.WEST}; - int i = aenumdirection.length; - int j = 0; -@@ -116,7 +109,7 @@ public class TripWireBlock extends Block { - - if (iblockdata1.is((Block) this.hook)) { - if (iblockdata1.getValue(TripWireHookBlock.FACING) == enumdirection.getOpposite()) { -- this.hook.calculateState(world, blockposition1, iblockdata1, false, true, k, state, beingRemoved); // Paper - fix state inconsistency -+ this.hook.calculateState(world, blockposition1, iblockdata1, false, true, k, state); - } - } else if (iblockdata1.is((Block) this)) { - ++k; -diff --git a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java -index 004dce26ff073f1de52a84cd425c4f60fdab5e50..a5f8c7d9d9998eebce7f15e01c157651b9831516 100644 ---- a/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/TripWireHookBlock.java -@@ -108,12 +108,6 @@ public class TripWireHookBlock extends Block { - } - - public void calculateState(Level world, BlockPos pos, BlockState state, boolean beingRemoved, boolean flag1, int i, @Nullable BlockState iblockdata1) { -- // Paper start - fix tripwire inconsistency -- this.calculateState(world, pos, state, beingRemoved, flag1, i, iblockdata1, false); -- } -- -- public void calculateState(Level world, BlockPos pos, BlockState state, boolean beingRemoved, boolean flag1, int i, @Nullable BlockState iblockdata1, boolean tripWireBeingRemoved) { -- // Paper end - Direction enumdirection = (Direction) state.getValue(TripWireHookBlock.FACING); - boolean flag2 = (Boolean) state.getValue(TripWireHookBlock.ATTACHED); - boolean flag3 = (Boolean) state.getValue(TripWireHookBlock.POWERED); -@@ -147,7 +141,6 @@ public class TripWireHookBlock extends Block { - boolean flag7 = (Boolean) iblockdata2.getValue(TripWireBlock.POWERED); - - flag5 |= flag6 && flag7; -- if (k != i || !tripWireBeingRemoved || !flag6) // Paper - don't update the tripwire again if being removed and not disarmed - aiblockdata[k] = iblockdata2; - if (k == i) { - world.scheduleTick(pos, (Block) this, 10); -@@ -182,7 +175,6 @@ public class TripWireHookBlock extends Block { - - this.emitState(world, pos, flag4, flag5, flag2, flag3); - if (!beingRemoved) { -- if (world.getBlockState(pos).getBlock() == Blocks.TRIPWIRE_HOOK) // Paper - validate - world.setBlock(pos, (BlockState) iblockdata3.setValue(TripWireHookBlock.FACING, enumdirection), 3); - if (flag1) { - this.notifyNeighbors(world, pos, enumdirection); diff --git a/patches/server/0016-Remove-UseItemOnPacket-Too-Far-Check.patch b/patches/server/0015-Remove-UseItemOnPacket-Too-Far-Check.patch similarity index 94% rename from patches/server/0016-Remove-UseItemOnPacket-Too-Far-Check.patch rename to patches/server/0015-Remove-UseItemOnPacket-Too-Far-Check.patch index 9f0b958a..9ac67b9e 100644 --- a/patches/server/0016-Remove-UseItemOnPacket-Too-Far-Check.patch +++ b/patches/server/0015-Remove-UseItemOnPacket-Too-Far-Check.patch @@ -7,10 +7,10 @@ This Check is added in 1.17.x -> 1.18.x update by Mojang. By removing this check, it enable hackers to use some modules of hack clients. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index fc43b6892f651af1cd6017aa15e07f60ae0be013..5fc20f52e33765c59fbdf77f0a5fe6aae485f245 100644 +index 59eaa377ca7201d2c634ef30f588969b36f4d6e3..281a2eeed84b8d4c1db808edf0d40d5e1971c742 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2048,7 +2048,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2089,7 +2089,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic Vec3 vec3d2 = vec3d.subtract(vec3d1); double d0 = 1.0000001D; diff --git a/patches/server/0017-KTP-Optimize-spigot-event-bus.patch b/patches/server/0016-KTP-Optimize-spigot-event-bus.patch similarity index 100% rename from patches/server/0017-KTP-Optimize-spigot-event-bus.patch rename to patches/server/0016-KTP-Optimize-spigot-event-bus.patch diff --git a/patches/server/0018-KeYi-Player-Skull-API.patch b/patches/server/0017-KeYi-Player-Skull-API.patch similarity index 100% rename from patches/server/0018-KeYi-Player-Skull-API.patch rename to patches/server/0017-KeYi-Player-Skull-API.patch diff --git a/patches/server/0019-KeYi-Disable-arrow-despawn-counter-by-default.patch b/patches/server/0018-KeYi-Disable-arrow-despawn-counter-by-default.patch similarity index 93% rename from patches/server/0019-KeYi-Disable-arrow-despawn-counter-by-default.patch rename to patches/server/0018-KeYi-Disable-arrow-despawn-counter-by-default.patch index 026e9276..bdc396cb 100644 --- a/patches/server/0019-KeYi-Disable-arrow-despawn-counter-by-default.patch +++ b/patches/server/0018-KeYi-Disable-arrow-despawn-counter-by-default.patch @@ -7,7 +7,7 @@ Original license: MIT Original project: https://github.com/KeYiMC/KeYi diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java -index dbb13ee8dffe8cd99f4c5483f08569a8a39f53e1..c4ca9fa0c7b6752c9c69d421ee701e63dadda385 100644 +index 0c8a2a18da5b86bd5b20d83b3a705651362cf870..3e26e1efd07178b4314fa31f88d674d68804a612 100644 --- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java +++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java @@ -320,7 +320,7 @@ public class GaleWorldConfiguration extends ConfigurationPart { diff --git a/patches/server/0020-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch b/patches/server/0019-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch similarity index 100% rename from patches/server/0020-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch rename to patches/server/0019-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch diff --git a/patches/server/0021-Carpet-Fixes-Optimized-getBiome-method.patch b/patches/server/0020-Carpet-Fixes-Optimized-getBiome-method.patch similarity index 100% rename from patches/server/0021-Carpet-Fixes-Optimized-getBiome-method.patch rename to patches/server/0020-Carpet-Fixes-Optimized-getBiome-method.patch diff --git a/patches/server/0022-Carpet-Fixes-Use-optimized-RecipeManager.patch b/patches/server/0021-Carpet-Fixes-Use-optimized-RecipeManager.patch similarity index 100% rename from patches/server/0022-Carpet-Fixes-Use-optimized-RecipeManager.patch rename to patches/server/0021-Carpet-Fixes-Use-optimized-RecipeManager.patch diff --git a/patches/server/0023-Akarin-Save-Json-list-asynchronously.patch b/patches/server/0022-Akarin-Save-Json-list-asynchronously.patch similarity index 100% rename from patches/server/0023-Akarin-Save-Json-list-asynchronously.patch rename to patches/server/0022-Akarin-Save-Json-list-asynchronously.patch diff --git a/patches/server/0024-Slice-Smooth-Teleports.patch b/patches/server/0023-Slice-Smooth-Teleports.patch similarity index 100% rename from patches/server/0024-Slice-Smooth-Teleports.patch rename to patches/server/0023-Slice-Smooth-Teleports.patch diff --git a/patches/server/0025-PaperPR-Optimize-VarInts.patch b/patches/server/0024-PaperPR-Optimize-VarInts.patch similarity index 100% rename from patches/server/0025-PaperPR-Optimize-VarInts.patch rename to patches/server/0024-PaperPR-Optimize-VarInts.patch diff --git a/patches/server/0026-Parchment-Make-FixLight-use-action-bar.patch b/patches/server/0025-Parchment-Make-FixLight-use-action-bar.patch similarity index 100% rename from patches/server/0026-Parchment-Make-FixLight-use-action-bar.patch rename to patches/server/0025-Parchment-Make-FixLight-use-action-bar.patch diff --git a/patches/server/0027-Leaves-Server-Utils.patch b/patches/server/0026-Leaves-Server-Utils.patch similarity index 98% rename from patches/server/0027-Leaves-Server-Utils.patch rename to patches/server/0026-Leaves-Server-Utils.patch index d528ed60..889ad2b0 100644 --- a/patches/server/0027-Leaves-Server-Utils.patch +++ b/patches/server/0026-Leaves-Server-Utils.patch @@ -7,7 +7,7 @@ Original license: GPLv3 Original project: https://github.com/LeavesMC/Leaves diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index af7ad38a2ad1c252616af6355f67ba0fd3982e0f..85011523949f3b20f0a3d5192082859dda17d25e 100644 +index 2763c93cc32b4b0954cb34c67cbeccd2258cd07c..0ef4711e37abee590abbfc249c9c6ffbf01265ce 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -419,6 +419,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -38,7 +38,7 @@ index af7ad38a2ad1c252616af6355f67ba0fd3982e0f..85011523949f3b20f0a3d5192082859d } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT"); -@@ -5037,4 +5044,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -5042,4 +5049,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return false; } // Purpur end diff --git a/patches/server/0028-Leaves-Jade-Protocol.patch b/patches/server/0027-Leaves-Jade-Protocol.patch similarity index 99% rename from patches/server/0028-Leaves-Jade-Protocol.patch rename to patches/server/0027-Leaves-Jade-Protocol.patch index db9641b8..72c537bb 100644 --- a/patches/server/0028-Leaves-Jade-Protocol.patch +++ b/patches/server/0027-Leaves-Jade-Protocol.patch @@ -9,7 +9,7 @@ Original project: https://github.com/LeavesMC/Leaves This patch is Powered by Jade(https://github.com/Snownee/Jade) diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5fc20f52e33765c59fbdf77f0a5fe6aae485f245..da8ae7fd90389d0e0d9f665fd496f856b81fa408 100644 +index 281a2eeed84b8d4c1db808edf0d40d5e1971c742..379218906cb02702d3a723c0ab42e768409ecacd 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -250,6 +250,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -20,7 +20,7 @@ index 5fc20f52e33765c59fbdf77f0a5fe6aae485f245..da8ae7fd90389d0e0d9f665fd496f856 // CraftBukkit end public class ServerGamePacketListenerImpl implements ServerPlayerConnection, TickablePacketListener, ServerGamePacketListener { -@@ -3721,6 +3722,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3762,6 +3763,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Paper end this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data); diff --git a/patches/server/0029-Leaves-Appleskin-Protocol.patch b/patches/server/0028-Leaves-Appleskin-Protocol.patch similarity index 100% rename from patches/server/0029-Leaves-Appleskin-Protocol.patch rename to patches/server/0028-Leaves-Appleskin-Protocol.patch diff --git a/patches/server/0030-Leaves-Xaero-Map-Protocol.patch b/patches/server/0029-Leaves-Xaero-Map-Protocol.patch similarity index 97% rename from patches/server/0030-Leaves-Xaero-Map-Protocol.patch rename to patches/server/0029-Leaves-Xaero-Map-Protocol.patch index 9933a14e..d13d5a2d 100644 --- a/patches/server/0030-Leaves-Xaero-Map-Protocol.patch +++ b/patches/server/0029-Leaves-Xaero-Map-Protocol.patch @@ -7,7 +7,7 @@ Original license: GPLv3 Original project: https://github.com/LeavesMC/Leaves diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 621875cc5ecb613b7a64067d1c0805305977b9a3..a29f58dce847b4cdcf276906011f84509beb2e40 100644 +index 16e1bb93dfddb647d3cd11c6b467a16a1b16d5a9..e1fac61e493282945bcd28e7a8c3a82647ce2c18 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1356,6 +1356,7 @@ public abstract class PlayerList { diff --git a/patches/server/0031-Fix-Make-log4j-compatible-with-future-release.patch b/patches/server/0030-Fix-Make-log4j-compatible-with-future-release.patch similarity index 100% rename from patches/server/0031-Fix-Make-log4j-compatible-with-future-release.patch rename to patches/server/0030-Fix-Make-log4j-compatible-with-future-release.patch diff --git a/patches/server/0032-Fix-compile-error.patch b/patches/server/0031-Fix-compile-error.patch similarity index 100% rename from patches/server/0032-Fix-compile-error.patch rename to patches/server/0031-Fix-compile-error.patch diff --git a/patches/server/0033-sync-with-Gale-s-Optimize-villager-data-storage.patc.patch b/patches/server/0032-sync-with-Gale-s-Optimize-villager-data-storage.patc.patch similarity index 100% rename from patches/server/0033-sync-with-Gale-s-Optimize-villager-data-storage.patc.patch rename to patches/server/0032-sync-with-Gale-s-Optimize-villager-data-storage.patc.patch diff --git a/patches/server/0034-Revert-Purpur-Fire-Immunity-API.patch b/patches/server/0033-Revert-Purpur-Fire-Immunity-API.patch similarity index 97% rename from patches/server/0034-Revert-Purpur-Fire-Immunity-API.patch rename to patches/server/0033-Revert-Purpur-Fire-Immunity-API.patch index 0e52afef..69d8d0d8 100644 --- a/patches/server/0034-Revert-Purpur-Fire-Immunity-API.patch +++ b/patches/server/0033-Revert-Purpur-Fire-Immunity-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Revert Purpur Fire Immunity API diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 85011523949f3b20f0a3d5192082859dda17d25e..1f05b647d796d03fec8198456d3e0ee7db1d3985 100644 +index 0ef4711e37abee590abbfc249c9c6ffbf01265ce..3dc15fca6927e35275f1d6453a60d41d6c7c9d03 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -418,7 +418,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/server/0035-Petal-Reduce-sensor-work.patch b/patches/server/0034-Petal-Reduce-sensor-work.patch similarity index 100% rename from patches/server/0035-Petal-Reduce-sensor-work.patch rename to patches/server/0034-Petal-Reduce-sensor-work.patch diff --git a/patches/server/0036-Petal-Async-Pathfinding.patch b/patches/server/0035-Petal-Async-Pathfinding.patch similarity index 100% rename from patches/server/0036-Petal-Async-Pathfinding.patch rename to patches/server/0035-Petal-Async-Pathfinding.patch diff --git a/patches/server/0037-Petal-Multithreaded-Tracker.patch b/patches/server/0036-Petal-Multithreaded-Tracker.patch similarity index 100% rename from patches/server/0037-Petal-Multithreaded-Tracker.patch rename to patches/server/0036-Petal-Multithreaded-Tracker.patch diff --git a/patches/server/0038-Petal-Sync-event-calls-on-async-threads.patch b/patches/server/0037-Petal-Sync-event-calls-on-async-threads.patch similarity index 100% rename from patches/server/0038-Petal-Sync-event-calls-on-async-threads.patch rename to patches/server/0037-Petal-Sync-event-calls-on-async-threads.patch diff --git a/patches/server/0039-Fix-tracker-NPE.patch b/patches/server/0038-Fix-tracker-NPE.patch similarity index 100% rename from patches/server/0039-Fix-tracker-NPE.patch rename to patches/server/0038-Fix-tracker-NPE.patch