Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 2c4beb962b
commit d3a23f42c3
522 changed files with 8501 additions and 6477 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/monster/EntityRavager.java
+++ b/net/minecraft/world/entity/monster/EntityRavager.java
@@ -43,6 +43,10 @@
@@ -45,6 +45,10 @@
import net.minecraft.world.phys.AxisAlignedBB;
import net.minecraft.world.phys.Vec3D;
@@ -10,16 +10,16 @@
+
public class EntityRavager extends EntityRaider {
private static final Predicate<Entity> NO_RAVAGER_AND_ALIVE = (entity) -> {
@@ -147,6 +151,11 @@
Block block = iblockdata.getBlock();
private static final Predicate<Entity> ROAR_TARGET_WITH_GRIEFING = (entity) -> {
@@ -161,6 +165,11 @@
Block block = iblockdata.getBlock();
if (block instanceof BlockLeaves) {
+ // CraftBukkit start
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState())) {
+ continue;
+ }
+ // CraftBukkit end
flag = this.level().destroyBlock(blockposition, true, this) || flag;
if (block instanceof BlockLeaves) {
+ // CraftBukkit start
+ if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState())) {
+ continue;
+ }
+ // CraftBukkit end
flag = worldserver.destroyBlock(blockposition, true, this) || flag;
}
}
}