diff --git a/paper-server/patches/unapplied/net/minecraft/world/entity/animal/frog/ShootTongue.java.patch b/paper-server/patches/unapplied/net/minecraft/world/entity/animal/frog/ShootTongue.java.patch deleted file mode 100644 index 354d8a45c5..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/entity/animal/frog/ShootTongue.java.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- a/net/minecraft/world/entity/animal/frog/ShootTongue.java -+++ b/net/minecraft/world/entity/animal/frog/ShootTongue.java -@@ -19,6 +19,9 @@ - import net.minecraft.world.entity.player.Player; - import net.minecraft.world.level.pathfinder.Path; - import net.minecraft.world.phys.Vec3; -+// CraftBukkit start -+import org.bukkit.event.entity.EntityRemoveEvent; -+// CraftBukkit end - - public class ShootTongue extends Behavior { - -@@ -64,7 +67,7 @@ - - BehaviorUtils.lookAtEntity(frog, entityliving); - frog.setTongueTarget(entityliving); -- frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new WalkTarget(entityliving.position(), 2.0F, 0))); -+ frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new WalkTarget(entityliving.position(), 2.0F, 0))); // CraftBukkit - decompile error - this.calculatePathCounter = 10; - this.state = ShootTongue.State.MOVE_TO_TARGET; - } -@@ -85,7 +88,7 @@ - if (entity.isAlive()) { - frog.doHurtTarget(world, entity); - if (!entity.isAlive()) { -- entity.remove(Entity.RemovalReason.KILLED); -+ entity.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause - } - } - } -@@ -106,7 +109,7 @@ - this.eatAnimationTimer = 0; - this.state = ShootTongue.State.CATCH_ANIMATION; - } else if (this.calculatePathCounter <= 0) { -- frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new WalkTarget(entityliving.position(), 2.0F, 0))); -+ frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new WalkTarget(entityliving.position(), 2.0F, 0))); // CraftBukkit - decompile error - this.calculatePathCounter = 10; - } else { - --this.calculatePathCounter; diff --git a/paper-server/patches/unapplied/net/minecraft/world/entity/animal/frog/Tadpole.java.patch b/paper-server/patches/unapplied/net/minecraft/world/entity/animal/frog/Tadpole.java.patch deleted file mode 100644 index 636405ea80..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/entity/animal/frog/Tadpole.java.patch +++ /dev/null @@ -1,87 +0,0 @@ ---- a/net/minecraft/world/entity/animal/frog/Tadpole.java -+++ b/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -50,6 +50,7 @@ - public int age; - protected static final ImmutableList>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_PLAYERS, SensorType.HURT_BY, SensorType.FROG_TEMPTATIONS); - protected static final ImmutableList> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.LOOK_TARGET, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.NEAREST_VISIBLE_ADULT, MemoryModuleType.TEMPTATION_COOLDOWN_TICKS, MemoryModuleType.IS_TEMPTED, MemoryModuleType.TEMPTING_PLAYER, MemoryModuleType.BREED_TARGET, MemoryModuleType.IS_PANICKING); -+ public boolean ageLocked; // Paper - - public Tadpole(EntityType type, Level world) { - super(type, world); -@@ -74,7 +75,7 @@ - - @Override - public Brain getBrain() { -- return super.getBrain(); -+ return (Brain) super.getBrain(); // CraftBukkit - decompile error - } - - @Override -@@ -102,7 +103,7 @@ - @Override - public void aiStep() { - super.aiStep(); -- if (!this.level().isClientSide) { -+ if (!this.level().isClientSide && !this.ageLocked) { // Paper - this.setAge(this.age + 1); - } - -@@ -112,12 +113,14 @@ - public void addAdditionalSaveData(CompoundTag nbt) { - super.addAdditionalSaveData(nbt); - nbt.putInt("Age", this.age); -+ nbt.putBoolean("AgeLocked", this.ageLocked); // Paper - } - - @Override - public void readAdditionalSaveData(CompoundTag nbt) { - super.readAdditionalSaveData(nbt); - this.setAge(nbt.getInt("Age")); -+ this.ageLocked = nbt.getBoolean("AgeLocked"); // Paper - } - - @Nullable -@@ -169,6 +172,7 @@ - Bucketable.saveDefaultDataToBucketTag(this, stack); - CustomData.update(DataComponents.BUCKET_ENTITY_DATA, stack, (nbttagcompound) -> { - nbttagcompound.putInt("Age", this.getAge()); -+ nbttagcompound.putBoolean("AgeLocked", this.ageLocked); // Paper - }); - } - -@@ -179,6 +183,7 @@ - this.setAge(nbt.getInt("Age")); - } - -+ this.ageLocked = nbt.getBoolean("AgeLocked"); // Paper - } - - @Override -@@ -210,6 +215,7 @@ - } - - private void ageUp(int seconds) { -+ if (this.ageLocked) return; // Paper - this.setAge(this.age + seconds * 20); - } - -@@ -225,12 +231,17 @@ - Level world = this.level(); - - if (world instanceof ServerLevel worldserver) { -- this.convertTo(EntityType.FROG, ConversionParams.single(this, false, false), (frog) -> { -+ Frog converted = this.convertTo(EntityType.FROG, ConversionParams.single(this, false, false), (frog) -> { // CraftBukkit - frog.finalizeSpawn(worldserver, this.level().getCurrentDifficultyAt(frog.blockPosition()), EntitySpawnReason.CONVERSION, (SpawnGroupData) null); - frog.setPersistenceRequired(); - frog.fudgePositionAfterSizeChange(this.getDimensions(this.getPose())); - this.playSound(SoundEvents.TADPOLE_GROW_UP, 0.15F, 1.0F); -- }); -+ // CraftBukkit start -+ }, org.bukkit.event.entity.EntityTransformEvent.TransformReason.METAMORPHOSIS, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.METAMORPHOSIS); -+ if (converted == null) { -+ this.setAge(0); // Sets the age to 0 for avoid a loop if the event is canceled -+ } -+ // CraftBukkit end - } - - } diff --git a/paper-server/patches/unapplied/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java.patch b/paper-server/patches/unapplied/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java.patch deleted file mode 100644 index d96bdd56da..0000000000 --- a/paper-server/patches/unapplied/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- a/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java -+++ b/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java -@@ -30,6 +30,11 @@ - import net.minecraft.world.level.gameevent.PositionSource; - import net.minecraft.world.phys.HitResult; - import net.minecraft.world.phys.Vec3; -+// CraftBukkit start -+import org.bukkit.craftbukkit.CraftGameEvent; -+import org.bukkit.craftbukkit.block.CraftBlock; -+import org.bukkit.event.block.BlockReceiveGameEvent; -+// CraftBukkit end - - public interface VibrationSystem { - -@@ -233,7 +238,8 @@ - if (callback.requiresAdjacentChunksToBeTicking() && !Ticker.areAdjacentChunksTicking(world, blockposition1)) { - return false; - } else { -- callback.onReceiveVibration(world, blockposition, vibration.gameEvent(), (Entity) vibration.getEntity(world).orElse((Object) null), (Entity) vibration.getProjectileOwner(world).orElse((Object) null), VibrationSystem.Listener.distanceBetweenInBlocks(blockposition, blockposition1)); -+ // CraftBukkit - decompile error -+ callback.onReceiveVibration(world, blockposition, vibration.gameEvent(), (Entity) vibration.getEntity(world).orElse(null), (Entity) vibration.getProjectileOwner(world).orElse(null), VibrationSystem.Listener.distanceBetweenInBlocks(blockposition, blockposition1)); - listenerData.setCurrentVibration((VibrationInfo) null); - return true; - } -@@ -288,8 +294,14 @@ - return false; - } else { - Vec3 vec3d1 = (Vec3) optional.get(); -- -- if (!vibrationsystem_d.canReceiveVibration(world, BlockPos.containing(emitterPos), event, emitter)) { -+ // CraftBukkit start -+ boolean defaultCancel = !vibrationsystem_d.canReceiveVibration(world, BlockPos.containing(emitterPos), event, emitter); -+ Entity entity = emitter.sourceEntity(); -+ BlockReceiveGameEvent event1 = new BlockReceiveGameEvent(CraftGameEvent.minecraftToBukkit(event.value()), CraftBlock.at(world, BlockPos.containing(vec3d1)), (entity == null) ? null : entity.getBukkitEntity()); -+ event1.setCancelled(defaultCancel); -+ world.getCraftServer().getPluginManager().callEvent(event1); -+ if (event1.isCancelled()) { -+ // CraftBukkit end - return false; - } else if (Listener.isOccluded(world, emitterPos, vec3d1)) { - return false; -@@ -341,8 +353,8 @@ - public static Codec CODEC = RecordCodecBuilder.create((instance) -> { - return instance.group(VibrationInfo.CODEC.lenientOptionalFieldOf("event").forGetter((vibrationsystem_a) -> { - return Optional.ofNullable(vibrationsystem_a.currentVibration); -- }), VibrationSelector.CODEC.fieldOf("selector").forGetter(VibrationSystem.Data::getSelectionStrategy), ExtraCodecs.NON_NEGATIVE_INT.fieldOf("event_delay").orElse(0).forGetter(VibrationSystem.Data::getTravelTimeInTicks)).apply(instance, (optional, vibrationselector, integer) -> { -- return new VibrationSystem.Data((VibrationInfo) optional.orElse((Object) null), vibrationselector, integer, true); -+ }), VibrationSelector.CODEC.optionalFieldOf("selector").xmap(o -> o.orElseGet(VibrationSelector::new), Optional::of).forGetter(VibrationSystem.Data::getSelectionStrategy), ExtraCodecs.NON_NEGATIVE_INT.fieldOf("event_delay").orElse(0).forGetter(VibrationSystem.Data::getTravelTimeInTicks)).apply(instance, (optional, vibrationselector, integer) -> { // Paper - fix MapLike spam for missing "selector" in 1.19.2 -+ return new VibrationSystem.Data((VibrationInfo) optional.orElse(null), vibrationselector, integer, true); // CraftBukkit - decompile error - }); - }); - public static final String NBT_TAG_KEY = "listener";