Update to Minecraft 1.21

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-06-14 01:05:00 +10:00
parent 7c6204e1a9
commit eed041d629
255 changed files with 3585 additions and 3261 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/world/entity/projectile/EntityWitherSkull.java
+++ b/net/minecraft/world/entity/projectile/EntityWitherSkull.java
@@ -21,6 +21,11 @@
import net.minecraft.world.phys.MovingObjectPosition;
@@ -24,6 +24,11 @@
import net.minecraft.world.phys.MovingObjectPositionEntity;
import net.minecraft.world.phys.Vec3D;
+// CraftBukkit start
+import org.bukkit.event.entity.EntityRemoveEvent;
@@ -12,16 +12,16 @@
public class EntityWitherSkull extends EntityFireball {
private static final DataWatcherObject<Boolean> DATA_DANGEROUS = DataWatcher.defineId(EntityWitherSkull.class, DataWatcherRegistry.BOOLEAN);
@@ -64,7 +69,7 @@
@@ -69,7 +74,7 @@
if (entity.isAlive()) {
this.doEnchantDamageEffects(entityliving, entity);
EnchantmentManager.doPostAttackEffects(worldserver, entity, damagesource);
} else {
- entityliving.heal(5.0F);
+ entityliving.heal(5.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.WITHER); // CraftBukkit
}
}
} else {
@@ -82,7 +87,7 @@
@@ -86,7 +91,7 @@
}
if (b0 > 0) {
@@ -30,7 +30,7 @@
}
}
@@ -93,8 +98,16 @@
@@ -97,8 +102,16 @@
protected void onHit(MovingObjectPosition movingobjectposition) {
super.onHit(movingobjectposition);
if (!this.level().isClientSide) {