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

@@ -18,7 +18,7 @@
super(EntityTypes.SMALL_FIREBALL, entityliving, vec3d, world);
+ // CraftBukkit start
+ if (this.getOwner() != null && this.getOwner() instanceof EntityInsentient) {
+ isIncendiary = this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
+ isIncendiary = (world instanceof WorldServer worldserver) && worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
+ }
+ // CraftBukkit end
}
@@ -39,12 +39,12 @@
+ // CraftBukkit end
DamageSource damagesource = this.damageSources().fireball(this, entity1);
if (!entity.hurt(damagesource, 5.0F)) {
@@ -58,10 +75,10 @@
if (!this.level().isClientSide) {
if (!entity.hurtServer(worldserver, damagesource, 5.0F)) {
@@ -60,10 +77,10 @@
if (world instanceof WorldServer worldserver) {
Entity entity = this.getOwner();
- if (!(entity instanceof EntityInsentient) || this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
- if (!(entity instanceof EntityInsentient) || worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
+ if (isIncendiary) { // CraftBukkit
BlockPosition blockposition = movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection());
@@ -53,7 +53,7 @@
this.level().setBlockAndUpdate(blockposition, BlockFireAbstract.getState(this.level(), blockposition));
}
}
@@ -73,7 +90,7 @@
@@ -75,7 +92,7 @@
protected void onHit(MovingObjectPosition movingobjectposition) {
super.onHit(movingobjectposition);
if (!this.level().isClientSide) {