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/windcharge/AbstractWindCharge.java
+++ b/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
@@ -22,6 +22,10 @@
import net.minecraft.world.phys.MovingObjectPositionBlock;
@@ -25,6 +25,10 @@
import net.minecraft.world.phys.MovingObjectPositionEntity;
import net.minecraft.world.phys.Vec3D;
+// CraftBukkit start
+import org.bukkit.event.entity.EntityRemoveEvent;
@@ -10,17 +10,17 @@
+
public abstract class AbstractWindCharge extends EntityFireball implements ItemSupplier {
public static final AbstractWindCharge.a EXPLOSION_DAMAGE_CALCULATOR = new AbstractWindCharge.a();
@@ -95,7 +99,7 @@
super.onHitBlock(movingobjectpositionblock);
if (!this.level().isClientSide) {
this.explode();
public static final ExplosionDamageCalculator EXPLOSION_DAMAGE_CALCULATOR = new SimpleExplosionDamageCalculator(true, false, Optional.empty(), BuiltInRegistries.BLOCK.getTag(TagsBlock.BLOCKS_WIND_CHARGE_EXPLOSIONS).map(Function.identity()));
@@ -113,7 +117,7 @@
Vec3D vec3d1 = movingobjectpositionblock.getLocation().add(vec3d);
this.explode(vec3d1);
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
}
@@ -104,7 +108,7 @@
@@ -122,7 +126,7 @@
protected void onHit(MovingObjectPosition movingobjectposition) {
super.onHit(movingobjectposition);
if (!this.level().isClientSide) {
@@ -29,10 +29,10 @@
}
}
@@ -139,7 +143,7 @@
@@ -157,7 +161,7 @@
public void tick() {
if (!this.level().isClientSide && this.getBlockY() > this.level().getMaxBuildHeight() + 30) {
this.explode();
this.explode(this.position());
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.OUT_OF_WORLD); // CraftBukkit - add Bukkit remove cause
} else {