diff --git a/patches/unapplied/server/Add-BlockStateMeta-clearBlockState.patch b/patches/server/Add-BlockStateMeta-clearBlockState.patch similarity index 100% rename from patches/unapplied/server/Add-BlockStateMeta-clearBlockState.patch rename to patches/server/Add-BlockStateMeta-clearBlockState.patch diff --git a/patches/unapplied/server/Add-Heightmap-API.patch b/patches/server/Add-Heightmap-API.patch similarity index 100% rename from patches/unapplied/server/Add-Heightmap-API.patch rename to patches/server/Add-Heightmap-API.patch diff --git a/patches/unapplied/server/Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/Add-PlayerAttackEntityCooldownResetEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerAttackEntityCooldownResetEvent.patch rename to patches/server/Add-PlayerAttackEntityCooldownResetEvent.patch diff --git a/patches/unapplied/server/Add-PlayerPostRespawnEvent.patch b/patches/server/Add-PlayerPostRespawnEvent.patch similarity index 55% rename from patches/unapplied/server/Add-PlayerPostRespawnEvent.patch rename to patches/server/Add-PlayerPostRespawnEvent.patch index 8c13de0cf1..2e661527b3 100644 --- a/patches/unapplied/server/Add-PlayerPostRespawnEvent.patch +++ b/patches/server/Add-PlayerPostRespawnEvent.patch @@ -10,28 +10,35 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -0,0 +0,0 @@ public abstract class PlayerList { - boolean flag2 = false; - + entityplayer1.addTag(s); + } + // Paper start - Add PlayerPostRespawnEvent + boolean isBedSpawn = false; + boolean isRespawn = false; + // Paper end - Add PlayerPostRespawnEvent -+ - // CraftBukkit start - fire PlayerRespawnEvent - if (location == null) { -- boolean isBedSpawn = false; -+ // boolean isBedSpawn = false; // Paper - Add PlayerPostRespawnEvent; moved up - ServerLevel worldserver1 = this.server.getLevel(entityplayer.getRespawnDimension()); - if (worldserver1 != null) { - Optional optional; -@@ -0,0 +0,0 @@ public abstract class PlayerList { - location = respawnEvent.getRespawnLocation(); + // CraftBukkit start - fire PlayerRespawnEvent + DimensionTransition dimensiontransition; +@@ -0,0 +0,0 @@ public abstract class PlayerList { + dimensiontransition = entityplayer.findRespawnPositionAndUseSpawnBlock(flag, DimensionTransition.DO_NOTHING, reason); + if (!flag) entityplayer.reset(); // SPIGOT-4785 + isRespawn = true; // Paper - Add PlayerPostRespawnEvent } else { - location.setWorld(worldserver.getWorld()); + dimensiontransition = new DimensionTransition(((CraftWorld) location.getWorld()).getHandle(), CraftLocation.toVec3D(location), Vec3.ZERO, location.getYaw(), location.getPitch(), DimensionTransition.DO_NOTHING); } +@@ -0,0 +0,0 @@ public abstract class PlayerList { + if (iblockdata.is(Blocks.RESPAWN_ANCHOR)) { + entityplayer1.connection.send(new ClientboundSoundPacket(SoundEvents.RESPAWN_ANCHOR_DEPLETE, SoundSource.BLOCKS, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 1.0F, 1.0F, worldserver.getRandom().nextLong())); + } ++ // Paper start - Add PlayerPostRespawnEvent ++ if (iblockdata.is(net.minecraft.tags.BlockTags.BEDS) && !dimensiontransition.missingRespawnBlock()) { ++ isBedSpawn = true; ++ } ++ // Paper end - Add PlayerPostRespawnEvent + } + // Added from changeDimension + this.sendAllPlayerInfo(entityplayer); // Update health, etc... @@ -0,0 +0,0 @@ public abstract class PlayerList { if (entityplayer.connection.isDisconnected()) { this.save(entityplayer); @@ -44,5 +51,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end - Add PlayerPostRespawnEvent + // CraftBukkit end + return entityplayer1; - } diff --git a/patches/unapplied/server/Add-PlayerRecipeBookClickEvent.patch b/patches/server/Add-PlayerRecipeBookClickEvent.patch similarity index 100% rename from patches/unapplied/server/Add-PlayerRecipeBookClickEvent.patch rename to patches/server/Add-PlayerRecipeBookClickEvent.patch diff --git a/patches/unapplied/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch similarity index 100% rename from patches/unapplied/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch rename to patches/server/Add-Plugin-Tickets-to-API-Chunk-Methods.patch diff --git a/patches/unapplied/server/Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/Add-Raw-Byte-ItemStack-Serialization.patch similarity index 100% rename from patches/unapplied/server/Add-Raw-Byte-ItemStack-Serialization.patch rename to patches/server/Add-Raw-Byte-ItemStack-Serialization.patch diff --git a/patches/unapplied/server/Add-ThrownEggHatchEvent.patch b/patches/server/Add-ThrownEggHatchEvent.patch similarity index 100% rename from patches/unapplied/server/Add-ThrownEggHatchEvent.patch rename to patches/server/Add-ThrownEggHatchEvent.patch diff --git a/patches/unapplied/server/Add-debug-for-sync-chunk-loads.patch b/patches/server/Add-debug-for-sync-chunk-loads.patch similarity index 100% rename from patches/unapplied/server/Add-debug-for-sync-chunk-loads.patch rename to patches/server/Add-debug-for-sync-chunk-loads.patch diff --git a/patches/unapplied/server/Add-entity-liquid-API.patch b/patches/server/Add-entity-liquid-API.patch similarity index 100% rename from patches/unapplied/server/Add-entity-liquid-API.patch rename to patches/server/Add-entity-liquid-API.patch diff --git a/patches/unapplied/server/Add-option-for-console-having-all-permissions.patch b/patches/server/Add-option-for-console-having-all-permissions.patch similarity index 100% rename from patches/unapplied/server/Add-option-for-console-having-all-permissions.patch rename to patches/server/Add-option-for-console-having-all-permissions.patch diff --git a/patches/unapplied/server/Add-option-to-allow-iron-golems-to-spawn-in-air.patch b/patches/server/Add-option-to-allow-iron-golems-to-spawn-in-air.patch similarity index 100% rename from patches/unapplied/server/Add-option-to-allow-iron-golems-to-spawn-in-air.patch rename to patches/server/Add-option-to-allow-iron-golems-to-spawn-in-air.patch diff --git a/patches/unapplied/server/Add-option-to-disable-pillager-patrols.patch b/patches/server/Add-option-to-disable-pillager-patrols.patch similarity index 100% rename from patches/unapplied/server/Add-option-to-disable-pillager-patrols.patch rename to patches/server/Add-option-to-disable-pillager-patrols.patch diff --git a/patches/unapplied/server/Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/Add-option-to-nerf-pigmen-from-nether-portals.patch similarity index 97% rename from patches/unapplied/server/Add-option-to-nerf-pigmen-from-nether-portals.patch rename to patches/server/Add-option-to-nerf-pigmen-from-nether-portals.patch index 37efb4406e..119aebb90f 100644 --- a/patches/unapplied/server/Add-option-to-nerf-pigmen-from-nether-portals.patch +++ b/patches/server/Add-option-to-nerf-pigmen-from-nether-portals.patch @@ -38,7 +38,7 @@ diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.jav index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java -@@ -0,0 +0,0 @@ public class NetherPortalBlock extends Block { +@@ -0,0 +0,0 @@ public class NetherPortalBlock extends Block implements Portal { if (entity != null) { entity.setPortalCooldown(); diff --git a/patches/unapplied/server/Add-permission-for-command-blocks.patch b/patches/server/Add-permission-for-command-blocks.patch similarity index 100% rename from patches/unapplied/server/Add-permission-for-command-blocks.patch rename to patches/server/Add-permission-for-command-blocks.patch diff --git a/patches/unapplied/server/Add-phantom-creative-and-insomniac-controls.patch b/patches/server/Add-phantom-creative-and-insomniac-controls.patch similarity index 100% rename from patches/unapplied/server/Add-phantom-creative-and-insomniac-controls.patch rename to patches/server/Add-phantom-creative-and-insomniac-controls.patch diff --git a/patches/unapplied/server/Add-tick-times-API-and-mspt-command.patch b/patches/server/Add-tick-times-API-and-mspt-command.patch similarity index 100% rename from patches/unapplied/server/Add-tick-times-API-and-mspt-command.patch rename to patches/server/Add-tick-times-API-and-mspt-command.patch diff --git a/patches/unapplied/server/Add-villager-reputation-API.patch b/patches/server/Add-villager-reputation-API.patch similarity index 100% rename from patches/unapplied/server/Add-villager-reputation-API.patch rename to patches/server/Add-villager-reputation-API.patch diff --git a/patches/unapplied/server/Alternative-item-despawn-rate.patch b/patches/server/Alternative-item-despawn-rate.patch similarity index 100% rename from patches/unapplied/server/Alternative-item-despawn-rate.patch rename to patches/server/Alternative-item-despawn-rate.patch diff --git a/patches/unapplied/server/Bees-get-gravity-in-void.-Fixes-MC-167279.patch b/patches/server/Bees-get-gravity-in-void.-Fixes-MC-167279.patch similarity index 100% rename from patches/unapplied/server/Bees-get-gravity-in-void.-Fixes-MC-167279.patch rename to patches/server/Bees-get-gravity-in-void.-Fixes-MC-167279.patch diff --git a/patches/unapplied/server/Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/patches/server/Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch similarity index 100% rename from patches/unapplied/server/Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch rename to patches/server/Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch diff --git a/patches/unapplied/server/Configurable-chance-of-villager-zombie-infection.patch b/patches/server/Configurable-chance-of-villager-zombie-infection.patch similarity index 100% rename from patches/unapplied/server/Configurable-chance-of-villager-zombie-infection.patch rename to patches/server/Configurable-chance-of-villager-zombie-infection.patch diff --git a/patches/unapplied/server/Configurable-projectile-relative-velocity.patch b/patches/server/Configurable-projectile-relative-velocity.patch similarity index 98% rename from patches/unapplied/server/Configurable-projectile-relative-velocity.patch rename to patches/server/Configurable-projectile-relative-velocity.patch index 80913cc63b..a6e85dc382 100644 --- a/patches/unapplied/server/Configurable-projectile-relative-velocity.patch +++ b/patches/server/Configurable-projectile-relative-velocity.patch @@ -30,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java @@ -0,0 +0,0 @@ public abstract class Projectile extends Entity implements TraceableEntity { this.shoot((double) f5, (double) f6, (double) f7, speed, divergence); - Vec3 vec3d = shooter.getDeltaMovement(); + Vec3 vec3d = shooter.getKnownMovement(); - this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.onGround() ? 0.0D : vec3d.y, vec3d.z)); + if (!shooter.level().paperConfig().misc.disableRelativeProjectileVelocity) this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.onGround() ? 0.0D : vec3d.y, vec3d.z)); // Paper - allow disabling relative velocity diff --git a/patches/unapplied/server/Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/Convert-legacy-attributes-in-Item-Meta.patch similarity index 100% rename from patches/unapplied/server/Convert-legacy-attributes-in-Item-Meta.patch rename to patches/server/Convert-legacy-attributes-in-Item-Meta.patch diff --git a/patches/unapplied/server/Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/Dead-Player-s-shouldn-t-be-able-to-move.patch similarity index 100% rename from patches/unapplied/server/Dead-Player-s-shouldn-t-be-able-to-move.patch rename to patches/server/Dead-Player-s-shouldn-t-be-able-to-move.patch diff --git a/patches/unapplied/server/Do-not-accept-invalid-client-settings.patch b/patches/server/Do-not-accept-invalid-client-settings.patch similarity index 100% rename from patches/unapplied/server/Do-not-accept-invalid-client-settings.patch rename to patches/server/Do-not-accept-invalid-client-settings.patch diff --git a/patches/unapplied/server/Do-not-allow-bees-to-load-chunks-for-beehives.patch b/patches/server/Do-not-allow-bees-to-load-chunks-for-beehives.patch similarity index 100% rename from patches/unapplied/server/Do-not-allow-bees-to-load-chunks-for-beehives.patch rename to patches/server/Do-not-allow-bees-to-load-chunks-for-beehives.patch diff --git a/patches/unapplied/server/Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/patches/server/Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch similarity index 100% rename from patches/unapplied/server/Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch rename to patches/server/Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch diff --git a/patches/unapplied/server/Don-t-fire-BlockFade-on-worldgen-threads.patch b/patches/server/Don-t-fire-BlockFade-on-worldgen-threads.patch similarity index 100% rename from patches/unapplied/server/Don-t-fire-BlockFade-on-worldgen-threads.patch rename to patches/server/Don-t-fire-BlockFade-on-worldgen-threads.patch diff --git a/patches/unapplied/server/Don-t-load-Chunks-from-Hoppers-and-other-things.patch b/patches/server/Don-t-load-Chunks-from-Hoppers-and-other-things.patch similarity index 100% rename from patches/unapplied/server/Don-t-load-Chunks-from-Hoppers-and-other-things.patch rename to patches/server/Don-t-load-Chunks-from-Hoppers-and-other-things.patch diff --git a/patches/unapplied/server/Don-t-move-existing-players-to-world-spawn.patch b/patches/server/Don-t-move-existing-players-to-world-spawn.patch similarity index 79% rename from patches/unapplied/server/Don-t-move-existing-players-to-world-spawn.patch rename to patches/server/Don-t-move-existing-players-to-world-spawn.patch index 02947b01de..4134e44caf 100644 --- a/patches/unapplied/server/Don-t-move-existing-players-to-world-spawn.patch +++ b/patches/server/Don-t-move-existing-players-to-world-spawn.patch @@ -16,16 +16,16 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.server = server; this.stats = server.getPlayerList().getPlayerStats(this); this.advancements = server.getPlayerList().getPlayerAdvancements(this); -- this.fudgeSpawnLocation(world); -+ // this.fudgeSpawnLocation(world); // Paper - Don't move existing players to world spawn +- this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); ++ // this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); // Paper - Don't move existing players to world spawn this.updateOptions(clientOptions); this.object = null; -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { position = Vec3.atCenterOf(world.getSharedSpawnPos()); } this.setLevel(world); @@ -42,7 +42,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // Paper start - Entity#getEntitySpawnReason if (optional.isEmpty()) { player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login -+ player.fudgeSpawnLocation(worldserver1); // Paper - Don't move existing players to world spawn ++ player.moveTo(player.adjustSpawnLocation(worldserver1, worldserver1.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); } // Paper end - Entity#getEntitySpawnReason player.setServerLevel(worldserver1); diff --git a/patches/unapplied/server/Don-t-run-entity-collision-code-if-not-needed.patch b/patches/server/Don-t-run-entity-collision-code-if-not-needed.patch similarity index 100% rename from patches/unapplied/server/Don-t-run-entity-collision-code-if-not-needed.patch rename to patches/server/Don-t-run-entity-collision-code-if-not-needed.patch diff --git a/patches/unapplied/server/Don-t-tick-dead-players.patch b/patches/server/Don-t-tick-dead-players.patch similarity index 91% rename from patches/unapplied/server/Don-t-tick-dead-players.patch rename to patches/server/Don-t-tick-dead-players.patch index 75dae1c0ab..ce70142472 100644 --- a/patches/unapplied/server/Don-t-tick-dead-players.patch +++ b/patches/server/Don-t-tick-dead-players.patch @@ -10,7 +10,7 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { public void doTick() { try { diff --git a/patches/unapplied/server/Dont-send-unnecessary-sign-update.patch b/patches/server/Dont-send-unnecessary-sign-update.patch similarity index 100% rename from patches/unapplied/server/Dont-send-unnecessary-sign-update.patch rename to patches/server/Dont-send-unnecessary-sign-update.patch diff --git a/patches/unapplied/server/Duplicate-UUID-Resolve-Option.patch b/patches/server/Duplicate-UUID-Resolve-Option.patch similarity index 82% rename from patches/unapplied/server/Duplicate-UUID-Resolve-Option.patch rename to patches/server/Duplicate-UUID-Resolve-Option.patch index a823c8477c..61dcfc3c3b 100644 --- a/patches/unapplied/server/Duplicate-UUID-Resolve-Option.patch +++ b/patches/server/Duplicate-UUID-Resolve-Option.patch @@ -32,11 +32,11 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. -diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java +diff --git a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/level/ChunkMap.java -+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +--- a/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java ++++ b/src/main/java/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java +@@ -0,0 +0,0 @@ public class ChunkStatusTasks { entity.discard(null); // CraftBukkit - add Bukkit remove cause needsRemoval = true; } @@ -44,20 +44,20 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 return !needsRemoval; })); // CraftBukkit end -@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - }); - } + } + } ++ + // Paper start - duplicate uuid resolving + // rets true if to prevent the entity from being added -+ public static boolean checkDupeUUID(ServerLevel level, Entity entity) { ++ public static boolean checkDupeUUID(ServerLevel level, net.minecraft.world.entity.Entity entity) { + io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode mode = level.paperConfig().entities.spawning.duplicateUuid.mode; + if (mode != io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode.WARN + && mode != io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode.DELETE + && mode != io.papermc.paper.configuration.WorldConfiguration.Entities.Spawning.DuplicateUUID.DuplicateUUIDMode.SAFE_REGEN) { + return false; + } -+ Entity other = level.getEntity(entity.getUUID()); ++ net.minecraft.world.entity.Entity other = level.getEntity(entity.getUUID()); + + if (other == null || other == entity) { + return false; @@ -87,7 +87,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + return false; + } + // Paper end - duplicate uuid resolving -+ - public CompletableFuture> prepareTickingChunk(ChunkHolder holder) { - CompletableFuture>> completablefuture = this.getChunkRangeFuture(holder, 1, (i) -> { - return ChunkStatus.FULL; + } diff --git a/patches/unapplied/server/Ensure-Entity-position-and-AABB-are-never-invalid.patch b/patches/server/Ensure-Entity-position-and-AABB-are-never-invalid.patch similarity index 100% rename from patches/unapplied/server/Ensure-Entity-position-and-AABB-are-never-invalid.patch rename to patches/server/Ensure-Entity-position-and-AABB-are-never-invalid.patch diff --git a/patches/unapplied/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch similarity index 100% rename from patches/unapplied/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch rename to patches/server/Ensure-EntityRaider-respects-game-and-entity-rules-f.patch diff --git a/patches/unapplied/server/Entity-Jump-API.patch b/patches/server/Entity-Jump-API.patch similarity index 100% rename from patches/unapplied/server/Entity-Jump-API.patch rename to patches/server/Entity-Jump-API.patch diff --git a/patches/unapplied/server/Entity-getEntitySpawnReason.patch b/patches/server/Entity-getEntitySpawnReason.patch similarity index 100% rename from patches/unapplied/server/Entity-getEntitySpawnReason.patch rename to patches/server/Entity-getEntitySpawnReason.patch diff --git a/patches/unapplied/server/ExperienceOrb-merging-stacking-API-and-fixes.patch b/patches/server/ExperienceOrb-merging-stacking-API-and-fixes.patch similarity index 91% rename from patches/unapplied/server/ExperienceOrb-merging-stacking-API-and-fixes.patch rename to patches/server/ExperienceOrb-merging-stacking-API-and-fixes.patch index 855acc394e..833208d8cd 100644 --- a/patches/unapplied/server/ExperienceOrb-merging-stacking-API-and-fixes.patch +++ b/patches/server/ExperienceOrb-merging-stacking-API-and-fixes.patch @@ -45,14 +45,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.age = Math.min(this.age, other.age); other.discard(EntityRemoveEvent.Cause.MERGE); // CraftBukkit - add Bukkit remove cause @@ -0,0 +0,0 @@ public class ExperienceOrb extends Entity { + int l = amount - k * amount / j; - itemstack.setDamageValue(itemstack.getDamageValue() - j); - int k = amount - this.durabilityToXp(j); -- this.value = k; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls -+ // this.value = k; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls // Paper - the value field should not be mutated here because it doesn't take "count" into account - - return k > 0 ? this.repairPlayerItems(player, k) : 0; - } else { + if (l > 0) { +- this.value = l; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls ++ // this.value = l; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls // Paper - the value field should not be mutated here because it doesn't take "count" into account + return this.repairPlayerItems(player, l); + } + } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java diff --git a/patches/unapplied/server/Expose-MinecraftServer-isRunning.patch b/patches/server/Expose-MinecraftServer-isRunning.patch similarity index 100% rename from patches/unapplied/server/Expose-MinecraftServer-isRunning.patch rename to patches/server/Expose-MinecraftServer-isRunning.patch diff --git a/patches/unapplied/server/Expose-the-internal-current-tick.patch b/patches/server/Expose-the-internal-current-tick.patch similarity index 100% rename from patches/unapplied/server/Expose-the-internal-current-tick.patch rename to patches/server/Expose-the-internal-current-tick.patch diff --git a/patches/unapplied/server/Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch b/patches/server/Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch similarity index 95% rename from patches/unapplied/server/Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch rename to patches/server/Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch index 46a83d3a42..2a20979047 100644 --- a/patches/unapplied/server/Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch +++ b/patches/server/Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch @@ -46,7 +46,7 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { public double maxHealthCache; public boolean joining = true; public boolean sentListPacket = false; @@ -81,10 +81,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 player.refreshEntityData(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn @@ -0,0 +0,0 @@ public abstract class PlayerList { - - playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect, false)); - } -- + worldserver1 = player.serverLevel(); // CraftBukkit - Update in case join event changed it + // CraftBukkit end + this.sendActivePlayerEffects(player); + // Paper start - Fire PlayerJoinEvent when Player is actually ready; move vehicle into method so it can be called above - short circuit around that code + this.onPlayerJoinFinish(player, worldserver1, s1); + } diff --git a/patches/unapplied/server/Fire-event-on-GS4-query.patch b/patches/server/Fire-event-on-GS4-query.patch similarity index 100% rename from patches/unapplied/server/Fire-event-on-GS4-query.patch rename to patches/server/Fire-event-on-GS4-query.patch diff --git a/patches/unapplied/server/Fix-CB-call-to-changed-postToMainThread-method.patch b/patches/server/Fix-CB-call-to-changed-postToMainThread-method.patch similarity index 100% rename from patches/unapplied/server/Fix-CB-call-to-changed-postToMainThread-method.patch rename to patches/server/Fix-CB-call-to-changed-postToMainThread-method.patch diff --git a/patches/unapplied/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch b/patches/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch similarity index 100% rename from patches/unapplied/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch rename to patches/server/Fix-CraftScheduler-runTaskTimerAsynchronously-Plugin.patch diff --git a/patches/unapplied/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch similarity index 87% rename from patches/unapplied/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch rename to patches/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch index 565e370e83..579f6d9aed 100644 --- a/patches/unapplied/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -75,19 +75,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @Override -diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/level/ServerPlayer.java -+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { - this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds - - this.connection.send(new ClientboundRespawnPacket(this.createCommonSpawnInfo(worldserver), (byte) 3)); -- this.connection.send(new ClientboundChangeDifficultyPacket(this.level().getDifficulty(), this.level().getLevelData().isDifficultyLocked())); -+ this.connection.send(new ClientboundChangeDifficultyPacket(worldserver.getDifficulty(), this.level().getLevelData().isDifficultyLocked())); // Paper - per level difficulty - PlayerList playerlist = this.server.getPlayerList(); - - playerlist.sendPlayerPermissionLevel(this); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/patches/unapplied/server/Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/Fix-PotionEffect-ignores-icon-flag.patch similarity index 100% rename from patches/unapplied/server/Fix-PotionEffect-ignores-icon-flag.patch rename to patches/server/Fix-PotionEffect-ignores-icon-flag.patch diff --git a/patches/unapplied/server/Fix-item-duplication-and-teleport-issues.patch b/patches/server/Fix-item-duplication-and-teleport-issues.patch similarity index 82% rename from patches/unapplied/server/Fix-item-duplication-and-teleport-issues.patch rename to patches/server/Fix-item-duplication-and-teleport-issues.patch index 21e60d0ae2..88c5b7a0da 100644 --- a/patches/unapplied/server/Fix-item-duplication-and-teleport-issues.patch +++ b/patches/server/Fix-item-duplication-and-teleport-issues.patch @@ -35,47 +35,36 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 entityitem.setDefaultPickUpDelay(); // CraftBukkit start @@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - @Nullable - public Entity teleportTo(ServerLevel worldserver, Vec3 location) { - // CraftBukkit end + public Entity changeDimension(DimensionTransition teleportTarget) { + Level world = this.level(); + + // Paper start - Fix item duplication and teleport issues + if (!this.isAlive() || !this.valid) { -+ LOGGER.warn("Illegal Entity Teleport " + this + " to " + worldserver + ":" + location, new Throwable()); ++ LOGGER.warn("Illegal Entity Teleport " + this + " to " + teleportTarget.newLevel() + ":" + teleportTarget.pos(), new Throwable()); + return null; + } + // Paper end - Fix item duplication and teleport issues - if (this.level() instanceof ServerLevel && !this.isRemoved()) { - this.level().getProfiler().push("changeDimension"); - // CraftBukkit start + if (world instanceof ServerLevel worldserver) { + if (!this.isRemoved()) { + // CraftBukkit start @@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - // CraftBukkit end - - this.level().getProfiler().popPush("reloading"); -+ // Paper start - Fix item duplication and teleport issues -+ if (this instanceof Mob) { -+ ((Mob) this).dropLeash(true, true); // Paper drop lead -+ } -+ // Paper end - Fix item duplication and teleport issues - Entity entity = this.getType().create(worldserver); - - if (entity != null) { -@@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess - // CraftBukkit start - Forward the CraftEntity to the new entity - this.getBukkitEntity().setHandle(entity); - entity.bukkitEntity = this.getBukkitEntity(); -- -- if (this instanceof Mob) { -- ((Mob) this).dropLeash(true, false); // Unleash to prevent duping of leads. -- } - // CraftBukkit end - } + if (entity2 != null) { + if (this != entity2) { ++ // Paper start - Fix item duplication and teleport issues ++ if (this instanceof Mob) { ++ ((Mob) this).dropLeash(true, true); // Paper drop lead ++ } ++ // Paper end - Fix item duplication and teleport issues + entity2.restoreFrom(this); + this.removeAfterChangingDimensions(); + // CraftBukkit start - Forward the CraftEntity to the new entity @@ -0,0 +0,0 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } - public boolean canChangeDimensions() { -- return !this.isPassenger() && !this.isVehicle(); -+ return !this.isPassenger() && !this.isVehicle() && isAlive() && valid; // Paper - Fix item duplication and teleport issues + public boolean canChangeDimensions(Level from, Level to) { +- return true; ++ return this.isAlive() && this.valid; // Paper - Fix item duplication and teleport issues } public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { @@ -85,7 +74,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable { // Paper start - org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource); + org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(worldserver, damageSource); if (deathEvent == null || !deathEvent.isCancelled()) { - if (this.deathScore >= 0 && entityliving != null) { - entityliving.awardKillScore(this, this.deathScore, damageSource); @@ -97,16 +86,16 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (this instanceof Mob) { for (EquipmentSlot slot : this.clearedEquipmentSlots) { @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable { - this.dropCustomDeathLoot(source, i, flag); + this.dropCustomDeathLoot(world, damageSource, flag); this.clearEquipmentSlots = prev; // Paper } - // CraftBukkit start - Call death event -- org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, source, this.drops); // Paper +- org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, damageSource, this.drops); // Paper + // CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment -+ org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, source, this.drops, () -> { ++ org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, damageSource, this.drops, () -> { + final LivingEntity entityliving = this.getKillCredit(); + if (this.deathScore >= 0 && entityliving != null) { -+ entityliving.awardKillScore(this, this.deathScore, source); ++ entityliving.awardKillScore(this, this.deathScore, damageSource); + } + }); // Paper end this.postDeathDropItems(deathEvent); // Paper @@ -149,7 +138,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper end CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource); - EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward()); + EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(damageSource.getEntity())); @@ -0,0 +0,0 @@ public class CraftEventFactory { playDeathSound(victim, event); // Paper end diff --git a/patches/unapplied/server/Fix-items-not-falling-correctly.patch b/patches/server/Fix-items-not-falling-correctly.patch similarity index 100% rename from patches/unapplied/server/Fix-items-not-falling-correctly.patch rename to patches/server/Fix-items-not-falling-correctly.patch diff --git a/patches/unapplied/server/Fix-missing-chunks-due-to-integer-overflow.patch b/patches/server/Fix-missing-chunks-due-to-integer-overflow.patch similarity index 100% rename from patches/unapplied/server/Fix-missing-chunks-due-to-integer-overflow.patch rename to patches/server/Fix-missing-chunks-due-to-integer-overflow.patch diff --git a/patches/unapplied/server/Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/Fix-piston-physics-inconsistency-MC-188840.patch similarity index 100% rename from patches/unapplied/server/Fix-piston-physics-inconsistency-MC-188840.patch rename to patches/server/Fix-piston-physics-inconsistency-MC-188840.patch diff --git a/patches/unapplied/server/Fix-sounds-when-item-frames-are-modified-MC-123450.patch b/patches/server/Fix-sounds-when-item-frames-are-modified-MC-123450.patch similarity index 100% rename from patches/unapplied/server/Fix-sounds-when-item-frames-are-modified-MC-123450.patch rename to patches/server/Fix-sounds-when-item-frames-are-modified-MC-123450.patch diff --git a/patches/unapplied/server/Fix-villager-trading-demand-MC-163962.patch b/patches/server/Fix-villager-trading-demand-MC-163962.patch similarity index 100% rename from patches/unapplied/server/Fix-villager-trading-demand-MC-163962.patch rename to patches/server/Fix-villager-trading-demand-MC-163962.patch diff --git a/patches/unapplied/server/Guard-against-serializing-mismatching-chunk-coordina.patch b/patches/server/Guard-against-serializing-mismatching-chunk-coordina.patch similarity index 97% rename from patches/unapplied/server/Guard-against-serializing-mismatching-chunk-coordina.patch rename to patches/server/Guard-against-serializing-mismatching-chunk-coordina.patch index c75ff17741..df68a3071c 100644 --- a/patches/unapplied/server/Guard-against-serializing-mismatching-chunk-coordina.patch +++ b/patches/server/Guard-against-serializing-mismatching-chunk-coordina.patch @@ -25,7 +25,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + } + // Paper end - guard against serializing mismatching coordinates - public static ProtoChunk read(ServerLevel world, PoiManager poiStorage, ChunkPos chunkPos, CompoundTag nbt) { ++ + public static ProtoChunk read(ServerLevel world, PoiManager poiStorage, RegionStorageInfo key, ChunkPos chunkPos, CompoundTag nbt) { - ChunkPos chunkcoordintpair1 = new ChunkPos(nbt.getInt("xPos"), nbt.getInt("zPos")); + ChunkPos chunkcoordintpair1 = new ChunkPos(nbt.getInt("xPos"), nbt.getInt("zPos")); // Paper - guard against serializing mismatching coordinates; diff on change, see ChunkSerializer#getChunkCoordinate diff --git a/patches/unapplied/server/Hide-sync-chunk-writes-behind-flag.patch b/patches/server/Hide-sync-chunk-writes-behind-flag.patch similarity index 100% rename from patches/unapplied/server/Hide-sync-chunk-writes-behind-flag.patch rename to patches/server/Hide-sync-chunk-writes-behind-flag.patch diff --git a/patches/unapplied/server/Implement-CraftBlockSoundGroup.patch b/patches/server/Implement-CraftBlockSoundGroup.patch similarity index 100% rename from patches/unapplied/server/Implement-CraftBlockSoundGroup.patch rename to patches/server/Implement-CraftBlockSoundGroup.patch diff --git a/patches/unapplied/server/Implement-Mob-Goal-API.patch b/patches/server/Implement-Mob-Goal-API.patch similarity index 100% rename from patches/unapplied/server/Implement-Mob-Goal-API.patch rename to patches/server/Implement-Mob-Goal-API.patch diff --git a/patches/unapplied/server/Implement-Player-Client-Options-API.patch b/patches/server/Implement-Player-Client-Options-API.patch similarity index 95% rename from patches/unapplied/server/Implement-Player-Client-Options-API.patch rename to patches/server/Implement-Player-Client-Options-API.patch index ff929c7fa0..ac57f4497d 100644 --- a/patches/unapplied/server/Implement-Player-Client-Options-API.patch +++ b/patches/server/Implement-Player-Client-Options-API.patch @@ -90,16 +90,16 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.stats = server.getPlayerList().getPlayerStats(this); this.advancements = server.getPlayerList().getPlayerAdvancements(this); - // this.fudgeSpawnLocation(world); // Paper - Don't move existing players to world spawn + // this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); // Paper - Don't move existing players to world spawn - this.updateOptions(clientOptions); + this.updateOptionsNoEvents(clientOptions); // Paper - don't call options events on login this.object = null; this.cachedSingleHashSet = new com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<>(this); // Paper -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } } @@ -123,12 +123,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit start if (this.getMainArm() != clientOptions.mainHand()) { PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT); -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.server.server.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), this.language, clientOptions.language())); // Paper } // CraftBukkit end + // Paper start - don't call options events on login -+ updateOptionsNoEvents(clientOptions); ++ this.updateOptionsNoEvents(clientOptions); + } + public void updateOptionsNoEvents(ClientInformation clientOptions) { + // Paper end diff --git a/patches/unapplied/server/Improve-Block-breakNaturally-API.patch b/patches/server/Improve-Block-breakNaturally-API.patch similarity index 98% rename from patches/unapplied/server/Improve-Block-breakNaturally-API.patch rename to patches/server/Improve-Block-breakNaturally-API.patch index 3317483d7a..e7f653a451 100644 --- a/patches/unapplied/server/Improve-Block-breakNaturally-API.patch +++ b/patches/server/Improve-Block-breakNaturally-API.patch @@ -30,7 +30,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + public void afterDestroy(Level world, BlockPos pos, ItemStack tool) { + // Paper end - Improve Block#breakNaturally API - if (EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) == 0) { + if (!EnchantmentHelper.hasTag(tool, EnchantmentTags.PREVENTS_ICE_MELTING)) { if (world.dimensionType().ultraWarm()) { world.removeBlock(pos, false); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java diff --git a/patches/unapplied/server/Improve-Legacy-Component-serialization-size.patch b/patches/server/Improve-Legacy-Component-serialization-size.patch similarity index 100% rename from patches/unapplied/server/Improve-Legacy-Component-serialization-size.patch rename to patches/server/Improve-Legacy-Component-serialization-size.patch diff --git a/patches/unapplied/server/Improve-fix-EntityTargetLivingEntityEvent.patch b/patches/server/Improve-fix-EntityTargetLivingEntityEvent.patch similarity index 100% rename from patches/unapplied/server/Improve-fix-EntityTargetLivingEntityEvent.patch rename to patches/server/Improve-fix-EntityTargetLivingEntityEvent.patch diff --git a/patches/unapplied/server/Improve-java-version-check.patch b/patches/server/Improve-java-version-check.patch similarity index 100% rename from patches/unapplied/server/Improve-java-version-check.patch rename to patches/server/Improve-java-version-check.patch diff --git a/patches/unapplied/server/Inventory-getHolder-method-without-block-snapshot.patch b/patches/server/Inventory-getHolder-method-without-block-snapshot.patch similarity index 100% rename from patches/unapplied/server/Inventory-getHolder-method-without-block-snapshot.patch rename to patches/server/Inventory-getHolder-method-without-block-snapshot.patch diff --git a/patches/unapplied/server/Limit-Client-Sign-length-more.patch b/patches/server/Limit-Client-Sign-length-more.patch similarity index 100% rename from patches/unapplied/server/Limit-Client-Sign-length-more.patch rename to patches/server/Limit-Client-Sign-length-more.patch diff --git a/patches/unapplied/server/MC-145656-Fix-Follow-Range-Initial-Target.patch b/patches/server/MC-145656-Fix-Follow-Range-Initial-Target.patch similarity index 100% rename from patches/unapplied/server/MC-145656-Fix-Follow-Range-Initial-Target.patch rename to patches/server/MC-145656-Fix-Follow-Range-Initial-Target.patch diff --git a/patches/unapplied/server/Make-the-GUI-graph-fancier.patch b/patches/server/Make-the-GUI-graph-fancier.patch similarity index 100% rename from patches/unapplied/server/Make-the-GUI-graph-fancier.patch rename to patches/server/Make-the-GUI-graph-fancier.patch diff --git a/patches/unapplied/server/Maps-shouldn-t-load-chunks.patch b/patches/server/Maps-shouldn-t-load-chunks.patch similarity index 100% rename from patches/unapplied/server/Maps-shouldn-t-load-chunks.patch rename to patches/server/Maps-shouldn-t-load-chunks.patch diff --git a/patches/unapplied/server/Mob-Spawner-API-Enhancements.patch b/patches/server/Mob-Spawner-API-Enhancements.patch similarity index 100% rename from patches/unapplied/server/Mob-Spawner-API-Enhancements.patch rename to patches/server/Mob-Spawner-API-Enhancements.patch diff --git a/patches/unapplied/server/Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/patches/server/Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch similarity index 98% rename from patches/unapplied/server/Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch rename to patches/server/Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch index 5ab45f0e10..e354400d73 100644 --- a/patches/unapplied/server/Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch +++ b/patches/server/Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch @@ -80,7 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + if (optional.isEmpty() || invalidPlayerWorld[0]) { + // Paper end - reset to main world spawn if first spawn or invalid world - player.fudgeSpawnLocation(worldserver1); // Paper - Don't move existing players to world spawn + player.moveTo(player.adjustSpawnLocation(worldserver1, worldserver1.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F); } // Paper end - Entity#getEntitySpawnReason diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/patches/unapplied/server/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch b/patches/server/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch similarity index 100% rename from patches/unapplied/server/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch rename to patches/server/Only-count-Natural-Spawned-mobs-towards-natural-spaw.patch diff --git a/patches/unapplied/server/Optimise-Chunk-getFluid.patch b/patches/server/Optimise-Chunk-getFluid.patch similarity index 100% rename from patches/unapplied/server/Optimise-Chunk-getFluid.patch rename to patches/server/Optimise-Chunk-getFluid.patch diff --git a/patches/unapplied/server/Optimise-EntityGetter-getPlayerByUUID.patch b/patches/server/Optimise-EntityGetter-getPlayerByUUID.patch similarity index 100% rename from patches/unapplied/server/Optimise-EntityGetter-getPlayerByUUID.patch rename to patches/server/Optimise-EntityGetter-getPlayerByUUID.patch diff --git a/patches/unapplied/server/Optimise-getChunkAt-calls-for-loaded-chunks.patch b/patches/server/Optimise-getChunkAt-calls-for-loaded-chunks.patch similarity index 74% rename from patches/unapplied/server/Optimise-getChunkAt-calls-for-loaded-chunks.patch rename to patches/server/Optimise-getChunkAt-calls-for-loaded-chunks.patch index b60ce28e8f..8b2e8a4b4c 100644 --- a/patches/unapplied/server/Optimise-getChunkAt-calls-for-loaded-chunks.patch +++ b/patches/server/Optimise-getChunkAt-calls-for-loaded-chunks.patch @@ -30,10 +30,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - this.level.getProfiler().incrementCounter("getChunkNow"); - long k = ChunkPos.asLong(chunkX, chunkZ); - +- ChunkAccess ichunkaccess; +- - for (int l = 0; l < 4; ++l) { - if (k == this.lastChunkPos[l] && this.lastChunkStatus[l] == ChunkStatus.FULL) { -- ChunkAccess ichunkaccess = this.lastChunk[l]; -- +- ichunkaccess = this.lastChunk[l]; - return ichunkaccess instanceof LevelChunk ? (LevelChunk) ichunkaccess : null; - } - } @@ -43,22 +44,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - if (playerchunk == null) { - return null; - } else { -- ChunkResult chunkresult = (ChunkResult) playerchunk.getFutureIfPresent(ChunkStatus.FULL).getNow(null); // CraftBukkit - decompile error -- -- if (chunkresult == null) { -- return null; -- } else { -- ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error -- -- if (ichunkaccess1 != null) { -- this.storeInCache(k, ichunkaccess1, ChunkStatus.FULL); -- if (ichunkaccess1 instanceof LevelChunk) { -- return (LevelChunk) ichunkaccess1; -- } +- ichunkaccess = playerchunk.getChunkIfPresent(ChunkStatus.FULL); +- if (ichunkaccess != null) { +- this.storeInCache(k, ichunkaccess, ChunkStatus.FULL); +- if (ichunkaccess instanceof LevelChunk) { +- return (LevelChunk) ichunkaccess; - } -- -- return null; - } +- +- return null; - } + return this.getChunkAtIfLoadedMainThread(chunkX, chunkZ); // Paper - Perf: Optimise getChunkAt calls for loaded chunks } diff --git a/patches/unapplied/server/Optimize-Captured-BlockEntity-Lookup.patch b/patches/server/Optimize-Captured-BlockEntity-Lookup.patch similarity index 100% rename from patches/unapplied/server/Optimize-Captured-BlockEntity-Lookup.patch rename to patches/server/Optimize-Captured-BlockEntity-Lookup.patch diff --git a/patches/unapplied/server/Optimize-Pathfinding.patch b/patches/server/Optimize-Pathfinding.patch similarity index 100% rename from patches/unapplied/server/Optimize-Pathfinding.patch rename to patches/server/Optimize-Pathfinding.patch diff --git a/patches/unapplied/server/Optimize-call-to-getFluid-for-explosions.patch b/patches/server/Optimize-call-to-getFluid-for-explosions.patch similarity index 100% rename from patches/unapplied/server/Optimize-call-to-getFluid-for-explosions.patch rename to patches/server/Optimize-call-to-getFluid-for-explosions.patch diff --git a/patches/unapplied/server/Paper-dumpitem-command.patch b/patches/server/Paper-dumpitem-command.patch similarity index 100% rename from patches/unapplied/server/Paper-dumpitem-command.patch rename to patches/server/Paper-dumpitem-command.patch diff --git a/patches/unapplied/server/Pillager-patrol-spawn-settings-and-per-player-option.patch b/patches/server/Pillager-patrol-spawn-settings-and-per-player-option.patch similarity index 98% rename from patches/unapplied/server/Pillager-patrol-spawn-settings-and-per-player-option.patch rename to patches/server/Pillager-patrol-spawn-settings-and-per-player-option.patch index 3d1c141307..3316a520cb 100644 --- a/patches/unapplied/server/Pillager-patrol-spawn-settings-and-per-player-option.patch +++ b/patches/server/Pillager-patrol-spawn-settings-and-per-player-option.patch @@ -13,7 +13,7 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { public boolean wonGame; private int containerUpdateDelay; // Paper - Configurable container update tick rate public long loginTime; // Paper - Replace OfflinePlayer#getLastPlayed diff --git a/patches/unapplied/server/PlayerDeathEvent-getItemsToKeep.patch b/patches/server/PlayerDeathEvent-getItemsToKeep.patch similarity index 92% rename from patches/unapplied/server/PlayerDeathEvent-getItemsToKeep.patch rename to patches/server/PlayerDeathEvent-getItemsToKeep.patch index 007d8a4745..5bc8cf6009 100644 --- a/patches/unapplied/server/PlayerDeathEvent-getItemsToKeep.patch +++ b/patches/server/PlayerDeathEvent-getItemsToKeep.patch @@ -14,7 +14,7 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { }); } @@ -61,8 +61,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @Override public void die(DamageSource damageSource) { // this.gameEvent(GameEvent.ENTITY_DIE); // Paper - move below event cancellation check -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { - this.dropExperience(); +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { + this.dropExperience(damageSource.getEntity()); // we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory. if (!event.getKeepInventory()) { - this.getInventory().clearContent(); diff --git a/patches/unapplied/server/PlayerDeathEvent-shouldDropExperience.patch b/patches/server/PlayerDeathEvent-shouldDropExperience.patch similarity index 77% rename from patches/unapplied/server/PlayerDeathEvent-shouldDropExperience.patch rename to patches/server/PlayerDeathEvent-shouldDropExperience.patch index 6a0b473eab..bc446c9435 100644 --- a/patches/unapplied/server/PlayerDeathEvent-shouldDropExperience.patch +++ b/patches/server/PlayerDeathEvent-shouldDropExperience.patch @@ -8,12 +8,12 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { this.tellNeutralMobsThatIDied(); } // SPIGOT-5478 must be called manually now -- this.dropExperience(); -+ if (event.shouldDropExperience()) this.dropExperience(); // Paper - tie to event +- this.dropExperience(damageSource.getEntity()); ++ if (event.shouldDropExperience()) this.dropExperience(damageSource.getEntity()); // Paper - tie to event // we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory. if (!event.getKeepInventory()) { // Paper start - PlayerDeathEvent#getItemsToKeep diff --git a/patches/unapplied/server/Potential-bed-API.patch b/patches/server/Potential-bed-API.patch similarity index 100% rename from patches/unapplied/server/Potential-bed-API.patch rename to patches/server/Potential-bed-API.patch diff --git a/patches/unapplied/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch similarity index 100% rename from patches/unapplied/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch rename to patches/server/Prevent-Double-PlayerChunkMap-adds-crashing-server.patch diff --git a/patches/unapplied/server/Prevent-bees-loading-chunks-checking-hive-position.patch b/patches/server/Prevent-bees-loading-chunks-checking-hive-position.patch similarity index 100% rename from patches/unapplied/server/Prevent-bees-loading-chunks-checking-hive-position.patch rename to patches/server/Prevent-bees-loading-chunks-checking-hive-position.patch diff --git a/patches/unapplied/server/Prevent-consuming-the-wrong-itemstack.patch b/patches/server/Prevent-consuming-the-wrong-itemstack.patch similarity index 97% rename from patches/unapplied/server/Prevent-consuming-the-wrong-itemstack.patch rename to patches/server/Prevent-consuming-the-wrong-itemstack.patch index f7c02434df..969d95373e 100644 --- a/patches/unapplied/server/Prevent-consuming-the-wrong-itemstack.patch +++ b/patches/server/Prevent-consuming-the-wrong-itemstack.patch @@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - if (!itemstack.isEmpty() && !this.isUsingItem()) { + if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper - Prevent consuming the wrong itemstack this.useItem = itemstack; - this.useItemRemaining = itemstack.getUseDuration(); + this.useItemRemaining = itemstack.getUseDuration(this); if (!this.level().isClientSide) { @@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable { this.releaseUsingItem(); diff --git a/patches/unapplied/server/Prevent-opening-inventories-when-frozen.patch b/patches/server/Prevent-opening-inventories-when-frozen.patch similarity index 95% rename from patches/unapplied/server/Prevent-opening-inventories-when-frozen.patch rename to patches/server/Prevent-opening-inventories-when-frozen.patch index e7abf05ec0..ff46a40983 100644 --- a/patches/unapplied/server/Prevent-opening-inventories-when-frozen.patch +++ b/patches/server/Prevent-opening-inventories-when-frozen.patch @@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/ma index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate; } // Paper end - Configurable container update tick rate @@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason this.containerMenu = this.inventoryMenu; } -@@ -0,0 +0,0 @@ public class ServerPlayer extends Player { +@@ -0,0 +0,0 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player { } else { // CraftBukkit start this.containerMenu = container; diff --git a/patches/unapplied/server/Prevent-position-desync-causing-tp-exploit.patch b/patches/server/Prevent-position-desync-causing-tp-exploit.patch similarity index 100% rename from patches/unapplied/server/Prevent-position-desync-causing-tp-exploit.patch rename to patches/server/Prevent-position-desync-causing-tp-exploit.patch diff --git a/patches/unapplied/server/Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch b/patches/server/Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch similarity index 100% rename from patches/unapplied/server/Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch rename to patches/server/Prevent-sync-chunk-loads-when-villagers-try-to-find-.patch diff --git a/patches/unapplied/server/Prevent-teleporting-dead-entities.patch b/patches/server/Prevent-teleporting-dead-entities.patch similarity index 100% rename from patches/unapplied/server/Prevent-teleporting-dead-entities.patch rename to patches/server/Prevent-teleporting-dead-entities.patch diff --git a/patches/unapplied/server/Reduce-Either-Optional-allocation.patch b/patches/server/Reduce-Either-Optional-allocation.patch similarity index 100% rename from patches/unapplied/server/Reduce-Either-Optional-allocation.patch rename to patches/server/Reduce-Either-Optional-allocation.patch diff --git a/patches/unapplied/server/Reduce-memory-footprint-of-CompoundTag.patch b/patches/server/Reduce-memory-footprint-of-CompoundTag.patch similarity index 100% rename from patches/unapplied/server/Reduce-memory-footprint-of-CompoundTag.patch rename to patches/server/Reduce-memory-footprint-of-CompoundTag.patch diff --git a/patches/unapplied/server/Remote-Connections-shouldn-t-hold-up-shutdown.patch b/patches/server/Remote-Connections-shouldn-t-hold-up-shutdown.patch similarity index 100% rename from patches/unapplied/server/Remote-Connections-shouldn-t-hold-up-shutdown.patch rename to patches/server/Remote-Connections-shouldn-t-hold-up-shutdown.patch diff --git a/patches/unapplied/server/Server-Tick-Events.patch b/patches/server/Server-Tick-Events.patch similarity index 100% rename from patches/unapplied/server/Server-Tick-Events.patch rename to patches/server/Server-Tick-Events.patch diff --git a/patches/unapplied/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch b/patches/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch similarity index 100% rename from patches/unapplied/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch rename to patches/server/Set-cap-on-JDK-per-thread-native-byte-buffer-cache.patch diff --git a/patches/unapplied/server/Set-spigots-verbose-world-setting-to-false-by-def.patch b/patches/server/Set-spigots-verbose-world-setting-to-false-by-def.patch similarity index 100% rename from patches/unapplied/server/Set-spigots-verbose-world-setting-to-false-by-def.patch rename to patches/server/Set-spigots-verbose-world-setting-to-false-by-def.patch diff --git a/patches/unapplied/server/Show-blockstate-location-if-we-failed-to-read-it.patch b/patches/server/Show-blockstate-location-if-we-failed-to-read-it.patch similarity index 100% rename from patches/unapplied/server/Show-blockstate-location-if-we-failed-to-read-it.patch rename to patches/server/Show-blockstate-location-if-we-failed-to-read-it.patch diff --git a/patches/unapplied/server/Tracking-Range-Improvements.patch b/patches/server/Tracking-Range-Improvements.patch similarity index 100% rename from patches/unapplied/server/Tracking-Range-Improvements.patch rename to patches/server/Tracking-Range-Improvements.patch diff --git a/patches/unapplied/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch similarity index 100% rename from patches/unapplied/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch rename to patches/server/Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch diff --git a/patches/unapplied/server/Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/Validate-PickItem-Packet-and-kick-for-invalid.patch similarity index 100% rename from patches/unapplied/server/Validate-PickItem-Packet-and-kick-for-invalid.patch rename to patches/server/Validate-PickItem-Packet-and-kick-for-invalid.patch diff --git a/patches/unapplied/server/Validate-tripwire-hook-placement-before-update.patch b/patches/server/Validate-tripwire-hook-placement-before-update.patch similarity index 100% rename from patches/unapplied/server/Validate-tripwire-hook-placement-before-update.patch rename to patches/server/Validate-tripwire-hook-placement-before-update.patch diff --git a/patches/unapplied/server/Villager-Restocks-API.patch b/patches/server/Villager-Restocks-API.patch similarity index 100% rename from patches/unapplied/server/Villager-Restocks-API.patch rename to patches/server/Villager-Restocks-API.patch diff --git a/patches/unapplied/server/Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/Wait-for-Async-Tasks-during-shutdown.patch similarity index 100% rename from patches/unapplied/server/Wait-for-Async-Tasks-during-shutdown.patch rename to patches/server/Wait-for-Async-Tasks-during-shutdown.patch diff --git a/patches/unapplied/server/add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/add-hand-to-BlockMultiPlaceEvent.patch similarity index 100% rename from patches/unapplied/server/add-hand-to-BlockMultiPlaceEvent.patch rename to patches/server/add-hand-to-BlockMultiPlaceEvent.patch diff --git a/patches/unapplied/server/don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/patches/server/don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch similarity index 100% rename from patches/unapplied/server/don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch rename to patches/server/don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch diff --git a/patches/unapplied/server/misc-debugging-dumps.patch b/patches/server/misc-debugging-dumps.patch similarity index 97% rename from patches/unapplied/server/misc-debugging-dumps.patch rename to patches/server/misc-debugging-dumps.patch index 3d81d9242d..6b169ced5e 100644 --- a/patches/unapplied/server/misc-debugging-dumps.patch +++ b/patches/server/misc-debugging-dumps.patch @@ -84,13 +84,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis @Override - public void onDisconnect(Component reason) { + public void onDisconnect(DisconnectionDetails info) { + // Paper start - Debugging + if (net.minecraft.server.MinecraftServer.getServer().isDebugging()) { + ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}, while in configuration phase {}", this.gameProfile, reason.getString(), currentTask != null ? currentTask.type().id() : "null"); + } else // Paper end - ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}", this.gameProfile, reason.getString()); - super.onDisconnect(reason); + ServerConfigurationPacketListenerImpl.LOGGER.info("{} lost connection: {}", this.gameProfile, info.reason().getString()); + super.onDisconnect(info); } @@ -0,0 +0,0 @@ public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketLis playerlist.placeNewPlayer(this.connection, entityplayer, this.createCookie(this.clientInformation)); diff --git a/patches/server/offset-item-frame-ticking.patch b/patches/server/offset-item-frame-ticking.patch new file mode 100644 index 0000000000..148bff96f2 --- /dev/null +++ b/patches/server/offset-item-frame-ticking.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: kickash32 +Date: Tue, 30 Jul 2019 03:17:16 +0500 +Subject: [PATCH] offset item frame ticking + + +diff --git a/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java b/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java ++++ b/src/main/java/net/minecraft/world/entity/decoration/BlockAttachedEntity.java +@@ -0,0 +0,0 @@ import org.bukkit.event.hanging.HangingBreakEvent; + public abstract class BlockAttachedEntity extends Entity { + + private static final Logger LOGGER = LogUtils.getLogger(); +- private int checkInterval; ++ private int checkInterval; { this.checkInterval = this.getId() % this.level().spigotConfig.hangingTickFrequency; } // Paper - Perf: offset item frame ticking + protected BlockPos pos; + + protected BlockAttachedEntity(EntityType type, Level world) { diff --git a/patches/unapplied/server/Ensure-safe-gateway-teleport.patch b/patches/unapplied/server/Ensure-safe-gateway-teleport.patch deleted file mode 100644 index 8952831618..0000000000 --- a/patches/unapplied/server/Ensure-safe-gateway-teleport.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: kickash32 -Date: Fri, 15 May 2020 01:10:03 -0400 -Subject: [PATCH] Ensure safe gateway teleport - -== AT == -public net.minecraft.world.entity.Entity teleportPassengers()V - -diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -@@ -0,0 +0,0 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { - - entity1.setPortalCooldown(); - ((ServerPlayer) entity1).connection.teleport(teleEvent.getTo()); -+ entity1.teleportPassengers(); // Paper - teleport passengers as well, preventing invisible passengers post teleport. - TheEndGatewayBlockEntity.triggerCooldown(world, pos, state, blockEntity); // CraftBukkit - call at end of method - return; - diff --git a/patches/unapplied/server/offset-item-frame-ticking.patch b/patches/unapplied/server/offset-item-frame-ticking.patch deleted file mode 100644 index 89178a6c14..0000000000 --- a/patches/unapplied/server/offset-item-frame-ticking.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: kickash32 -Date: Tue, 30 Jul 2019 03:17:16 +0500 -Subject: [PATCH] offset item frame ticking - - -diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java -+++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java -@@ -0,0 +0,0 @@ public abstract class HangingEntity extends Entity { - protected static final Predicate HANGING_ENTITY = (entity) -> { - return entity instanceof HangingEntity; - }; -- private int checkInterval; -+ private int checkInterval; { this.checkInterval = this.getId() % this.level().spigotConfig.hangingTickFrequency; } // Paper - Perf: offset item frame ticking - public BlockPos pos; - protected Direction direction; -