diff options
author | Nassim Jahnke <[email protected]> | 2024-12-18 10:27:19 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-12-18 10:27:19 +0100 |
commit | 9d837fe4b66ebf71171465055d57c3fc7aaabc36 (patch) | |
tree | 0c42e1607af1e86dfe2095c69a7cddb0cc0aa472 | |
parent | e97bf6933c23580d51ec355264b76f873bde2be0 (diff) | |
download | Paper-9d837fe4b66ebf71171465055d57c3fc7aaabc36.tar.gz Paper-9d837fe4b66ebf71171465055d57c3fc7aaabc36.zip |
Cat has luckily since stopped singing
2 files changed, 9 insertions, 16 deletions
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/item/FallingBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/item/FallingBlockEntity.java.patch index 5b8f2129c4..397795f3c0 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/item/FallingBlockEntity.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/item/FallingBlockEntity.java.patch @@ -1,10 +1,7 @@ --- a/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -47,8 +_,14 @@ - import net.minecraft.world.phys.BlockHitResult; - import net.minecraft.world.phys.HitResult; +@@ -49,6 +_,11 @@ import net.minecraft.world.phys.Vec3; -+import org.bukkit.event.entity.CreatureSpawnEvent; import org.slf4j.Logger; +// CraftBukkit start; @@ -28,20 +25,23 @@ public static FallingBlockEntity fall(Level level, BlockPos pos, BlockState blockState) { + // CraftBukkit start -+ return FallingBlockEntity.fall(level, pos, blockState, CreatureSpawnEvent.SpawnReason.DEFAULT); ++ return FallingBlockEntity.fall(level, pos, blockState, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT); + } -+ public static FallingBlockEntity fall(Level level, BlockPos pos, BlockState blockState, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { ++ public static FallingBlockEntity fall(Level level, BlockPos pos, BlockState blockState, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason creatureSpawnReason) { FallingBlockEntity fallingBlockEntity = new FallingBlockEntity( level, pos.getX() + 0.5, -@@ -89,6 +_,7 @@ +@@ -89,8 +_,9 @@ ? blockState.setValue(BlockStateProperties.WATERLOGGED, Boolean.valueOf(false)) : blockState ); + if (!CraftEventFactory.callEntityChangeBlockEvent(fallingBlockEntity, pos, blockState.getFluidState().createLegacyBlock())) return fallingBlockEntity; // CraftBukkit level.setBlock(pos, blockState.getFluidState().createLegacyBlock(), 3); - level.addFreshEntity(fallingBlockEntity); +- level.addFreshEntity(fallingBlockEntity); ++ level.addFreshEntity(fallingBlockEntity, creatureSpawnReason); // CraftBukkit return fallingBlockEntity; + } + @@ -139,13 +_,22 @@ @Override public void tick() { diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch index 504d509667..1178c733ba 100644 --- a/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch @@ -63,7 +63,7 @@ } @VisibleForDebug -@@ -325,11 +_,16 @@ +@@ -325,7 +_,9 @@ @Override protected void finishConversion(ServerLevel serverLevel) { PiglinAi.cancelAdmiring(serverLevel, this); @@ -73,13 +73,6 @@ super.finishConversion(serverLevel); } -+ - private ItemStack createSpawnWeapon() { -+ // Food time for 10 minutes WOOP WOOP -+ // Please send help cat started singing - return this.random.nextFloat() < 0.5 ? new ItemStack(Items.CROSSBOW) : new ItemStack(Items.GOLDEN_SWORD); - } - @@ -400,7 +_,7 @@ } |