diff options
Diffstat (limited to 'patches/server')
22 files changed, 41 insertions, 41 deletions
diff --git a/patches/server/0023-Timings-v2.patch b/patches/server/0023-Timings-v2.patch index 0fd756a82d..4e5f30f3df 100644 --- a/patches/server/0023-Timings-v2.patch +++ b/patches/server/0023-Timings-v2.patch @@ -1344,10 +1344,10 @@ index c010d18061f58a583c69e85fc29305497523f569..c8b8102d84119dfb6093f4b79aa3124c private void applyMovementEmissionAndPlaySound(Entity.MovementEmission moveEffect, Vec3 movement, BlockPos landingPos, BlockState landingState) { diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 17ab230c95901f0533997ac117d5b3d852fcd467..a9ae3d3210e049b0ce066b47378a3f2024154cfd 100644 +index 17ab230c95901f0533997ac117d5b3d852fcd467..970161efa46b3a71ddae665f9df5966c70fd3471 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -413,6 +413,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT +@@ -413,6 +413,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT } public EntityType(EntityType.EntityFactory<T> factory, MobCategory spawnGroup, boolean saveable, boolean summonable, boolean fireImmune, boolean spawnableFarFromPlayer, ImmutableSet<Block> canSpawnInside, EntityDimensions dimensions, float spawnBoxScale, int maxTrackDistance, int trackTickInterval, String translationKey, Optional<ResourceKey<LootTable>> lootTable, FeatureFlagSet requiredFeatures) { @@ -1359,12 +1359,11 @@ index 17ab230c95901f0533997ac117d5b3d852fcd467..a9ae3d3210e049b0ce066b47378a3f20 + this.inactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "inactiveTick"); + this.passengerTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerTick"); + this.passengerInactiveTickTimer = co.aikar.timings.MinecraftTimings.getEntityTimings(id, "passengerInactiveTick"); -+ this.id = id; + // Paper end this.builtInRegistryHolder = BuiltInRegistries.ENTITY_TYPE.createIntrusiveHolder(this); this.factory = factory; this.category = spawnGroup; -@@ -720,6 +730,13 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT +@@ -720,6 +729,12 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT return this.updateInterval; } @@ -1373,7 +1372,6 @@ index 17ab230c95901f0533997ac117d5b3d852fcd467..a9ae3d3210e049b0ce066b47378a3f20 + public final co.aikar.timings.Timing inactiveTickTimer; + public final co.aikar.timings.Timing passengerTickTimer; + public final co.aikar.timings.Timing passengerInactiveTickTimer; -+ private final String id; + // Paper end public boolean trackDeltas() { return this != EntityType.PLAYER && this != EntityType.LLAMA_SPIT && this != EntityType.WITHER && this != EntityType.BAT && this != EntityType.ITEM_FRAME && this != EntityType.GLOW_ITEM_FRAME && this != EntityType.LEASH_KNOT && this != EntityType.PAINTING && this != EntityType.END_CRYSTAL && this != EntityType.EVOKER_FANGS; diff --git a/patches/server/0166-PreCreatureSpawnEvent.patch b/patches/server/0166-PreCreatureSpawnEvent.patch index 2a845a497c..8c22573ffb 100644 --- a/patches/server/0166-PreCreatureSpawnEvent.patch +++ b/patches/server/0166-PreCreatureSpawnEvent.patch @@ -55,10 +55,10 @@ index e139ed6bc6f2dd07fe546588b31309ba30ed9755..34c3bf85473b3ad89355ebc21b68c59b if (t0 != null) { diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index a9ae3d3210e049b0ce066b47378a3f2024154cfd..47fe53ed2f50f1a7ed9f324adf9fc73a6ecc184a 100644 +index 970161efa46b3a71ddae665f9df5966c70fd3471..5fe268b5c3297de7650f5d1f310cdf8ac231de75 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -507,6 +507,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT +@@ -506,6 +506,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT @Nullable public T spawn(ServerLevel worldserver, @Nullable Consumer<T> consumer, BlockPos blockposition, EntitySpawnReason entityspawnreason, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { // CraftBukkit end diff --git a/patches/server/0278-Fixes-and-additions-to-the-spawn-reason-API.patch b/patches/server/0278-Fixes-and-additions-to-the-spawn-reason-API.patch index 90c8123854..2e0766fbd7 100644 --- a/patches/server/0278-Fixes-and-additions-to-the-spawn-reason-API.patch +++ b/patches/server/0278-Fixes-and-additions-to-the-spawn-reason-API.patch @@ -116,10 +116,10 @@ index 5d551a50e1043e369ebf3ddfe181be1e24cfd068..463d34e7b54efd503c4879d1386b2439 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 47fe53ed2f50f1a7ed9f324adf9fc73a6ecc184a..9fe4027aa16d73d806f51a7c195a5cf0468ebba3 100644 +index 5fe268b5c3297de7650f5d1f310cdf8ac231de75..e5dc6f868f090d1957306a6389d85cf9dbbc444d 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -443,7 +443,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT +@@ -442,7 +442,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT @Nullable public T spawn(ServerLevel world, @Nullable ItemStack stack, @Nullable Player player, BlockPos pos, EntitySpawnReason spawnReason, boolean alignPosition, boolean invertY) { // CraftBukkit start diff --git a/patches/server/0362-Fix-piston-physics-inconsistency-MC-188840.patch b/patches/server/0362-Fix-piston-physics-inconsistency-MC-188840.patch index 60773947a8..aca7ba66df 100644 --- a/patches/server/0362-Fix-piston-physics-inconsistency-MC-188840.patch +++ b/patches/server/0362-Fix-piston-physics-inconsistency-MC-188840.patch @@ -32,7 +32,7 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840 This patch also fixes rail duping and carpet duping. diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -index 0b80940ed23a35e0412957a50d04907b676b0aca..e84501fdce7b94300b1f5d6d20e2db90b175454d 100644 +index 0b80940ed23a35e0412957a50d04907b676b0aca..0c6b517196d48ba4384eac240b7e580adfdbc4d4 100644 --- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java @@ -419,13 +419,25 @@ public class PistonBaseBlock extends DirectionalBlock { @@ -50,12 +50,13 @@ index 0b80940ed23a35e0412957a50d04907b676b0aca..e84501fdce7b94300b1f5d6d20e2db90 map.remove(blockposition3); iblockdata2 = (BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(PistonBaseBlock.FACING, dir); world.setBlock(blockposition3, iblockdata2, 68); +- world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(blockposition3, iblockdata2, (BlockState) list1.get(j), dir, extend, false)); + // Paper start - fix a variety of piston desync dupes + if (!allowDesync) { + iblockdata1 = world.getBlockState(oldPos); + map.replace(oldPos, iblockdata1); + } - world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(blockposition3, iblockdata2, (BlockState) list1.get(j), dir, extend, false)); ++ world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(blockposition3, iblockdata2, allowDesync ? (BlockState) list1.get(j) : iblockdata1, dir, extend, false)); + if (!allowDesync) { + world.setBlock(oldPos, Blocks.AIR.defaultBlockState(), Block.UPDATE_CLIENTS | Block.UPDATE_KNOWN_SHAPE | Block.UPDATE_MOVE_BY_PISTON | 1024); // set air to prevent later physics updates from seeing this block + } diff --git a/patches/server/0477-Expand-EntityUnleashEvent.patch b/patches/server/0477-Expand-EntityUnleashEvent.patch index 8d23e8ce85..09c4e7f7eb 100644 --- a/patches/server/0477-Expand-EntityUnleashEvent.patch +++ b/patches/server/0477-Expand-EntityUnleashEvent.patch @@ -43,7 +43,7 @@ index 07aff05e2e8cd36ebb6b9fb9d2f19b95c5f9bfc4..bb2cfec32b63d3786f9ec255d4beef70 } diff --git a/src/main/java/net/minecraft/world/entity/Leashable.java b/src/main/java/net/minecraft/world/entity/Leashable.java -index dc39ecc3e1aada638337d31bfe68b400c6454af7..1a6448cccf79a94013f9f44c3067d91da3da1f7e 100644 +index dc39ecc3e1aada638337d31bfe68b400c6454af7..b7721ed97305d1cd6725935f965c2effc1bef5a1 100644 --- a/src/main/java/net/minecraft/world/entity/Leashable.java +++ b/src/main/java/net/minecraft/world/entity/Leashable.java @@ -167,8 +167,11 @@ public interface Leashable { @@ -51,10 +51,11 @@ index dc39ecc3e1aada638337d31bfe68b400c6454af7..1a6448cccf79a94013f9f44c3067d91d if (leashable_a != null && leashable_a.leashHolder != null) { if (!entity.isAlive() || !leashable_a.leashHolder.isAlive()) { - world.getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(entity.getBukkitEntity(), (!entity.isAlive()) ? UnleashReason.PLAYER_UNLEASH : UnleashReason.HOLDER_GONE)); // CraftBukkit +- Leashable.dropLeash(entity, true, world.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS) && !entity.pluginRemoved); // CraftBukkit - SPIGOT-7487: Don't drop leash, when the holder was removed by a plugin + // Paper start - Expand EntityUnleashEvent + final EntityUnleashEvent event = new EntityUnleashEvent(entity.getBukkitEntity(), (!entity.isAlive()) ? UnleashReason.PLAYER_UNLEASH : UnleashReason.HOLDER_GONE, world.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS) && !entity.pluginRemoved); + event.callEvent(); - Leashable.dropLeash(entity, true, world.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS) && !entity.pluginRemoved); // CraftBukkit - SPIGOT-7487: Don't drop leash, when the holder was removed by a plugin ++ Leashable.dropLeash(entity, true, event.isDropLeash()); // CraftBukkit - SPIGOT-7487: Don't drop leash, when the holder was removed by a plugin + // Paper end - Expand EntityUnleashEvent } diff --git a/patches/server/0574-Add-BlockBreakBlockEvent.patch b/patches/server/0574-Add-BlockBreakBlockEvent.patch index a5e51ea2aa..4a3af0251e 100644 --- a/patches/server/0574-Add-BlockBreakBlockEvent.patch +++ b/patches/server/0574-Add-BlockBreakBlockEvent.patch @@ -34,7 +34,7 @@ index 43c2b411115d3a8a0e47d3e2277789b2667897af..4d140bd83ca0e1554afad80ec4fc6186 if (world instanceof ServerLevel) { Block.getDrops(state, (ServerLevel) world, pos, blockEntity, entity, tool).forEach((itemstack1) -> { diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -index e84501fdce7b94300b1f5d6d20e2db90b175454d..560797552799f7874133fd4aaf6e421609a54dbf 100644 +index 0c6b517196d48ba4384eac240b7e580adfdbc4d4..4973d75b26880e39d42b5ef533896f43a1f07cba 100644 --- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java @@ -406,7 +406,7 @@ public class PistonBaseBlock extends DirectionalBlock { diff --git a/patches/server/0637-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch b/patches/server/0637-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch index 179f6e1565..b239d74e25 100644 --- a/patches/server/0637-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch +++ b/patches/server/0637-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch @@ -27,7 +27,7 @@ Co-authored-by: Zach Brown <[email protected]> Co-authored-by: Madeline Miller <[email protected]> diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -index 560797552799f7874133fd4aaf6e421609a54dbf..b27cf7d27672ba9ff8ade84b5a8454b19b935607 100644 +index 4973d75b26880e39d42b5ef533896f43a1f07cba..e841fccb8f298ef692677583b468869f56dc722c 100644 --- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java @@ -163,15 +163,15 @@ public class PistonBaseBlock extends DirectionalBlock { diff --git a/patches/server/0678-Add-TameableDeathMessageEvent.patch b/patches/server/0678-Add-TameableDeathMessageEvent.patch index 79f0ebc540..641b0b0e37 100644 --- a/patches/server/0678-Add-TameableDeathMessageEvent.patch +++ b/patches/server/0678-Add-TameableDeathMessageEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add TameableDeathMessageEvent diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java -index cd565d1a8dab8d45196e4d29cab3d93a3ca619eb..550c7f3435cc6c3180769e47f05bf693bdc380e3 100644 +index cd565d1a8dab8d45196e4d29cab3d93a3ca619eb..749ae54ee42229cb32ec5280bc59a88f74fde197 100644 --- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java +++ b/src/main/java/net/minecraft/world/entity/TamableAnimal.java @@ -250,7 +250,12 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { @@ -16,7 +16,7 @@ index cd565d1a8dab8d45196e4d29cab3d93a3ca619eb..550c7f3435cc6c3180769e47f05bf693 + // Paper start - Add TameableDeathMessageEvent + io.papermc.paper.event.entity.TameableDeathMessageEvent event = new io.papermc.paper.event.entity.TameableDeathMessageEvent((org.bukkit.entity.Tameable) getBukkitEntity(), io.papermc.paper.adventure.PaperAdventure.asAdventure(this.getCombatTracker().getDeathMessage())); + if (event.callEvent()) { -+ entityplayer.sendSystemMessage(this.getCombatTracker().getDeathMessage()); ++ entityplayer.sendSystemMessage(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.deathMessage())); + } + // Paper end - Add TameableDeathMessageEvent } diff --git a/patches/server/0683-Allow-changing-the-EnderDragon-podium.patch b/patches/server/0683-Allow-changing-the-EnderDragon-podium.patch index 0102f94453..5cbce2b4ec 100644 --- a/patches/server/0683-Allow-changing-the-EnderDragon-podium.patch +++ b/patches/server/0683-Allow-changing-the-EnderDragon-podium.patch @@ -62,7 +62,7 @@ index a897c994423d7d624df6ff3a67789cc2436f0417..29f4acc2943ce009088c61bb32aed330 } diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java -index 2db996f3528c65f5d719cbcfb8ae587ff59c14c1..b8730a0fc759dbacc9b2e737c3e48d3ff9c5d824 100644 +index 2db996f3528c65f5d719cbcfb8ae587ff59c14c1..8e39cf181993ff284a2b0429577de0c307f3ef16 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java @@ -53,7 +53,7 @@ public class DragonHoldingPatternPhase extends AbstractDragonPhaseInstance { @@ -70,7 +70,7 @@ index 2db996f3528c65f5d719cbcfb8ae587ff59c14c1..b8730a0fc759dbacc9b2e737c3e48d3f private void findNewTarget(ServerLevel world) { if (this.currentPath != null && this.currentPath.isDone()) { - BlockPos blockPos = world.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); -+ BlockPos blockPos = world.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, new BlockPos(this.dragon.getPodium())); // Paper - Allow changing the EnderDragon podium ++ BlockPos blockPos = world.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - Allow changing the EnderDragon podium int i = this.dragon.getDragonFight() == null ? 0 : this.dragon.getDragonFight().getCrystalsAlive(); if (this.dragon.getRandom().nextInt(i + 3) == 0) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.LANDING_APPROACH); diff --git a/patches/server/0750-Add-EntityToggleSitEvent.patch b/patches/server/0750-Add-EntityToggleSitEvent.patch index 965b35e0f4..7bab6af93d 100644 --- a/patches/server/0750-Add-EntityToggleSitEvent.patch +++ b/patches/server/0750-Add-EntityToggleSitEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityToggleSitEvent diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java -index 550c7f3435cc6c3180769e47f05bf693bdc380e3..e9e4d6fd69f9eec25a75b2610e15a19f8326f87b 100644 +index 749ae54ee42229cb32ec5280bc59a88f74fde197..f6a253e063f4a2cf78a036e44431806a0ba270d9 100644 --- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java +++ b/src/main/java/net/minecraft/world/entity/TamableAnimal.java @@ -87,7 +87,7 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { diff --git a/patches/server/0781-config-for-disabling-entity-tag-tags.patch b/patches/server/0781-config-for-disabling-entity-tag-tags.patch index d0d803196a..f1526d5e31 100644 --- a/patches/server/0781-config-for-disabling-entity-tag-tags.patch +++ b/patches/server/0781-config-for-disabling-entity-tag-tags.patch @@ -5,10 +5,10 @@ Subject: [PATCH] config for disabling entity tag tags diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 9fe4027aa16d73d806f51a7c195a5cf0468ebba3..9be3f9b218b28fe8dde6321d8377232fbc634ee3 100644 +index e5dc6f868f090d1957306a6389d85cf9dbbc444d..ca9e63942f3cb8986456410b2a77aafc6541aad2 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -579,6 +579,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT +@@ -578,6 +578,16 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT if (minecraftserver != null && entity != null) { if (world.isClientSide || !entity.onlyOpCanSetNbt() || player != null && minecraftserver.getPlayerList().isOp(player.getGameProfile())) { diff --git a/patches/server/0789-Add-EntityFertilizeEggEvent.patch b/patches/server/0789-Add-EntityFertilizeEggEvent.patch index 5ba280ce96..ea7e33d8b0 100644 --- a/patches/server/0789-Add-EntityFertilizeEggEvent.patch +++ b/patches/server/0789-Add-EntityFertilizeEggEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityFertilizeEggEvent diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -index ed7f5eb9b3b700c2f817d61ee0bf8a6952731510..8e91f930e19a91db44274e4ecd98841362867609 100644 +index ed7f5eb9b3b700c2f817d61ee0bf8a6952731510..9a9ecc3e2c176c6d9700c4c585250b9780b7629b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java @@ -448,6 +448,10 @@ public class Turtle extends Animal { @@ -24,7 +24,7 @@ index ed7f5eb9b3b700c2f817d61ee0bf8a6952731510..8e91f930e19a91db44274e4ecd988413 if (getServerLevel((Level) this.level).getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { - this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), randomsource.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper; -+ if (event.getExperience() > 0) this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), randomsource.nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper - Add EntityFertilizeEggEvent event ++ if (event.getExperience() > 0) this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), event.getExperience(), org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer)); // Paper - Add EntityFertilizeEggEvent event } } diff --git a/patches/server/0831-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/0831-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch index 28dc555f08..c481798890 100644 --- a/patches/server/0831-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch +++ b/patches/server/0831-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch @@ -19,7 +19,7 @@ index a65fba5621c067c453858efb7fee64cbee1e7916..1e77cce428d9e53142aaa2cf780b7f86 @Override diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java -index 08a3c7140867f339dd99a95094ed0fd8ff344fca..9d206bed5b982603f39bc1f70ae23ea38e4d9bc9 100644 +index 08a3c7140867f339dd99a95094ed0fd8ff344fca..a728dcbf956f108f01c966c7531449a506a14a87 100644 --- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java +++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java @@ -120,7 +120,7 @@ public class WanderingTraderSpawner implements CustomSpawner { @@ -27,7 +27,7 @@ index 08a3c7140867f339dd99a95094ed0fd8ff344fca..9d206bed5b982603f39bc1f70ae23ea3 } - WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, blockposition2, EntitySpawnReason.EVENT, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit -+ WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, trader -> trader.setDespawnDelay(48000), blockposition2, EntitySpawnReason.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBu // Paper - set despawnTimer before spawn events calledkkit ++ WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, trader -> trader.setDespawnDelay(48000), blockposition2, EntitySpawnReason.EVENT, false, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit // Paper - set despawnTimer before spawn events called if (entityvillagertrader != null) { for (int i = 0; i < 2; ++i) { diff --git a/patches/server/0899-Don-t-fire-sync-events-during-worldgen.patch b/patches/server/0899-Don-t-fire-sync-events-during-worldgen.patch index bc57e531f9..d3a68412bc 100644 --- a/patches/server/0899-Don-t-fire-sync-events-during-worldgen.patch +++ b/patches/server/0899-Don-t-fire-sync-events-during-worldgen.patch @@ -48,10 +48,10 @@ index e9142414c7d247ae2a27c0bc9ea2be3bb8e3db16..1d66c35b1092b8101f0a803d8c087e5a this.entityData.set(Entity.DATA_POSE, pose); } diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 9be3f9b218b28fe8dde6321d8377232fbc634ee3..d036b02af0a4f63bd1e4e306f1ecd102b3d991fb 100644 +index ca9e63942f3cb8986456410b2a77aafc6541aad2..ccee69813597f45d382268bd1792a49722afebe9 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -659,9 +659,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT +@@ -658,9 +658,15 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT } public static Optional<Entity> create(CompoundTag nbt, Level world, EntitySpawnReason reason) { diff --git a/patches/server/0902-Restore-vanilla-entity-drops-behavior.patch b/patches/server/0902-Restore-vanilla-entity-drops-behavior.patch index 0eede4fd44..74f4887dce 100644 --- a/patches/server/0902-Restore-vanilla-entity-drops-behavior.patch +++ b/patches/server/0902-Restore-vanilla-entity-drops-behavior.patch @@ -150,7 +150,7 @@ index 2bb2b36f793d25b6e49d1a72bb665cfa9f212730..63f02cdc67d9e88cc6998d0ae9d139c8 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index dbef230ae88ee1bfbc20ba53b534434c3ccac985..fb75b7f84575c42ab5dcb7e9c5659cecf439da90 100644 +index dbef230ae88ee1bfbc20ba53b534434c3ccac985..a0455f590d549343d6d8fd7991ba1b87a87acdb8 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -973,19 +973,25 @@ public class CraftEventFactory { @@ -179,7 +179,7 @@ index dbef230ae88ee1bfbc20ba53b534434c3ccac985..fb75b7f84575c42ab5dcb7e9c5659cec CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource); CraftWorld world = (CraftWorld) entity.getWorld(); - EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(world.getHandle(), damageSource.getEntity())); -+ EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, new io.papermc.paper.util.TransformingRandomAccessList<>(drops, Entity.DefaultDrop::stack, FROM_FUNCTION), victim.getExpReward(world.getHandle(), damageSource.getEntity())); // Paper - Restore vanilla drops behavior, victim.getExpReward(world.getHandle(), damageSource.getEntity())); ++ EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, new io.papermc.paper.util.TransformingRandomAccessList<>(drops, Entity.DefaultDrop::stack, FROM_FUNCTION), victim.getExpReward(world.getHandle(), damageSource.getEntity())); // Paper - Restore vanilla drops behavior populateFields(victim, event); // Paper - make cancellable Bukkit.getServer().getPluginManager().callEvent(event); diff --git a/patches/server/0906-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch b/patches/server/0906-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch index 8082b201b8..394a12efc2 100644 --- a/patches/server/0906-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch +++ b/patches/server/0906-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch @@ -39,7 +39,7 @@ index 4b9108e48d052919bca000ddb54f9bf4589c33e6..1c4ec3857c5c3ecf58f842292c280a4a this.teleportTo(to.getX(), to.getY(), to.getZ()); } else { diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java -index e9e4d6fd69f9eec25a75b2610e15a19f8326f87b..7a4cb1d27bfe42f93525232892a59068560cd735 100644 +index f6a253e063f4a2cf78a036e44431806a0ba270d9..332ae836826270507110f1e0438aaa36d6e9deb5 100644 --- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java +++ b/src/main/java/net/minecraft/world/entity/TamableAnimal.java @@ -314,7 +314,7 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { diff --git a/patches/server/0908-Add-drops-to-shear-events.patch b/patches/server/0908-Add-drops-to-shear-events.patch index 899419ccb6..0ae1794dca 100644 --- a/patches/server/0908-Add-drops-to-shear-events.patch +++ b/patches/server/0908-Add-drops-to-shear-events.patch @@ -306,7 +306,7 @@ index 9d416f775fa19ad1978c7c9c9e0d5bc16728879d..18dae37d65552077aa3825c76f433bbd }); } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index fb75b7f84575c42ab5dcb7e9c5659cecf439da90..89109bf9ad85b1859ce6ae0808ac0a1fb2cb6816 100644 +index a0455f590d549343d6d8fd7991ba1b87a87acdb8..e7749a3ef6289d73379649f2f76f4e4fdfac7a8b 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1689,20 +1689,20 @@ public class CraftEventFactory { diff --git a/patches/server/0910-Validate-ResourceLocation-in-NBT-reading.patch b/patches/server/0910-Validate-ResourceLocation-in-NBT-reading.patch index ae571f6c51..5a6790a25d 100644 --- a/patches/server/0910-Validate-ResourceLocation-in-NBT-reading.patch +++ b/patches/server/0910-Validate-ResourceLocation-in-NBT-reading.patch @@ -53,10 +53,10 @@ index 084935138b1484f3d96e99f4e5655a6c04931907..9e357abe13f55bd9ce3a1d5348bcf19a if (nbt.contains("LootTableSeed", 4)) { this.setLootTableSeed(nbt.getLong("LootTableSeed")); diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index d036b02af0a4f63bd1e4e306f1ecd102b3d991fb..97ad6cd38adbe8a7b2ea6e2a5a339bd67b81b5bd 100644 +index ccee69813597f45d382268bd1792a49722afebe9..e56050bef4a5aaa0fca17192dab4cf5e6a55fbae 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -690,7 +690,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT +@@ -689,7 +689,7 @@ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeT } public static Optional<EntityType<?>> by(CompoundTag nbt) { @@ -66,7 +66,7 @@ index d036b02af0a4f63bd1e4e306f1ecd102b3d991fb..97ad6cd38adbe8a7b2ea6e2a5a339bd6 @Nullable diff --git a/src/main/java/net/minecraft/world/entity/Leashable.java b/src/main/java/net/minecraft/world/entity/Leashable.java -index 1a6448cccf79a94013f9f44c3067d91da3da1f7e..06af888e4c3d9d01a462b487742b597184a7a8a6 100644 +index b7721ed97305d1cd6725935f965c2effc1bef5a1..5f880a8809f9c20bc8e8c0b2d48590bab02cf077 100644 --- a/src/main/java/net/minecraft/world/entity/Leashable.java +++ b/src/main/java/net/minecraft/world/entity/Leashable.java @@ -55,7 +55,13 @@ public interface Leashable { diff --git a/patches/server/0934-Fix-DamageSource-API.patch b/patches/server/0934-Fix-DamageSource-API.patch index 306d0de492..f42e69a0af 100644 --- a/patches/server/0934-Fix-DamageSource-API.patch +++ b/patches/server/0934-Fix-DamageSource-API.patch @@ -97,7 +97,7 @@ index aac1d620bf4cd1f18243f8c53cd32ab16fdeb616..5c0d64c70a94d20ff0e72aed490ef297 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -index 8e91f930e19a91db44274e4ecd98841362867609..79e1e911333d4a009c0b4e2462b41a0c146b9a06 100644 +index 9a9ecc3e2c176c6d9700c4c585250b9780b7629b..d6605c15111dbdb6ee61a24822bc0a9aed7198d6 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java @@ -341,7 +341,7 @@ public class Turtle extends Animal { @@ -220,7 +220,7 @@ index 4c6e15535fa40aad8cf1920f392589404f9ba79c..35eb95ef6fb6a0f7ea63351e90741c48 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 89109bf9ad85b1859ce6ae0808ac0a1fb2cb6816..b0e7d1841d71e377d5ad596a22dfafb90d4f80cc 100644 +index e7749a3ef6289d73379649f2f76f4e4fdfac7a8b..96b901d07718d8926a2175925e867b4417c3947c 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1092,7 +1092,7 @@ public class CraftEventFactory { diff --git a/patches/server/0941-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/0941-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index e76c0c9c87..40895c886c 100644 --- a/patches/server/0941-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/patches/server/0941-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -64,7 +64,7 @@ index 9917df070d9815b6915e4a0b022dfe4e5b7861e7..729c3d8279b13d21c65ede89ea50869b public co.aikar.timings.Timing getTiming() { if (timing == null) { diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -index b27cf7d27672ba9ff8ade84b5a8454b19b935607..83bffe2ac011ed0cbd86149e3c803393d30a9e6e 100644 +index e841fccb8f298ef692677583b468869f56dc722c..4b51472502d08ea357da437afeb4b581979e9cff 100644 --- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java @@ -216,6 +216,12 @@ public class PistonBaseBlock extends DirectionalBlock { diff --git a/patches/server/0948-Fix-helmet-damage-reduction-inconsistencies.patch b/patches/server/0948-Fix-helmet-damage-reduction-inconsistencies.patch index 186441aa4d..ef4efc0ef7 100644 --- a/patches/server/0948-Fix-helmet-damage-reduction-inconsistencies.patch +++ b/patches/server/0948-Fix-helmet-damage-reduction-inconsistencies.patch @@ -7,7 +7,7 @@ Affect the falling stalactite damage type where the reduction is not applied like in Vanilla diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index b0e7d1841d71e377d5ad596a22dfafb90d4f80cc..659d38c90f20f744261190c451235dbca8352e38 100644 +index 96b901d07718d8926a2175925e867b4417c3947c..6c60bb4f4d1133844a4232df518c062216847fdc 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1226,7 +1226,7 @@ public class CraftEventFactory { diff --git a/patches/server/0985-Optimize-Bit-Operations-by-inlining.patch b/patches/server/0985-Optimize-Bit-Operations-by-inlining.patch index b9547eb68c..02b75062fb 100644 --- a/patches/server/0985-Optimize-Bit-Operations-by-inlining.patch +++ b/patches/server/0985-Optimize-Bit-Operations-by-inlining.patch @@ -7,7 +7,7 @@ Inline bit operations and reduce instruction count to make these hot operations faster diff --git a/src/main/java/net/minecraft/core/BlockPos.java b/src/main/java/net/minecraft/core/BlockPos.java -index 0d51fb4be8b49e3b57c3c55aff6bcf13d5c78ddd..afbd1651cb29e95b5cc7474f986c52c29676fb8a 100644 +index 0d51fb4be8b49e3b57c3c55aff6bcf13d5c78ddd..a5dab9b1652ac76372d88316e2c165eed6317891 100644 --- a/src/main/java/net/minecraft/core/BlockPos.java +++ b/src/main/java/net/minecraft/core/BlockPos.java @@ -50,15 +50,17 @@ public class BlockPos extends Vec3i { @@ -20,7 +20,7 @@ index 0d51fb4be8b49e3b57c3c55aff6bcf13d5c78ddd..afbd1651cb29e95b5cc7474f986c52c2 - private static final long PACKED_Y_MASK = (1L << PACKED_Y_LENGTH) - 1L; - private static final long PACKED_Z_MASK = (1L << PACKED_HORIZONTAL_LENGTH) - 1L; + // Paper start - Optimize Bit Operations by inlining -+ private static final int PACKED_HORIZONTAL_LENGTH = 26; ++ public static final int PACKED_HORIZONTAL_LENGTH = 26; + public static final int PACKED_Y_LENGTH = 12; + private static final long PACKED_X_MASK = 67108863; + private static final long PACKED_Y_MASK = 4095; |