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

@@ -15,19 +15,19 @@
public EntityLargeFireball(EntityTypes<? extends EntityLargeFireball> entitytypes, World world) {
super(entitytypes, world);
+ isIncendiary = this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit
+ isIncendiary = (world instanceof WorldServer worldserver) && worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit
}
public EntityLargeFireball(World world, EntityLiving entityliving, Vec3D vec3d, int i) {
super(EntityTypes.FIREBALL, entityliving, vec3d, world);
this.explosionPower = i;
+ isIncendiary = this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit
+ isIncendiary = (world instanceof WorldServer worldserver) && worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit
}
@Override
@@ -32,8 +39,16 @@
if (!this.level().isClientSide) {
boolean flag = this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
@@ -34,8 +41,16 @@
if (world instanceof WorldServer worldserver) {
boolean flag = worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
- this.level().explode(this, this.getX(), this.getY(), this.getZ(), (float) this.explosionPower, flag, World.a.MOB);
- this.discard();
@@ -44,7 +44,7 @@
}
}
@@ -63,7 +78,8 @@
@@ -65,7 +80,8 @@
public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
super.readAdditionalSaveData(nbttagcompound);
if (nbttagcompound.contains("ExplosionPower", 99)) {