mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
Fix some explosion damage not scaling with difficulty (#8767)
Fixes https://github.com/PaperMC/Paper/issues/8735
This commit is contained in:
@@ -40,6 +40,10 @@ https://bugs.mojang.com/browse/MC-257875
|
|||||||
by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
Fixes server not consuming fire charges when igniting a creeper
|
Fixes server not consuming fire charges when igniting a creeper
|
||||||
|
|
||||||
|
https://bugs.mojang.com/browse/MC-258535
|
||||||
|
by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
Fixes certain explosion damage not scaling with difficulty
|
||||||
|
|
||||||
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
|
Co-authored-by: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||||
Co-authored-by: MelnCat <melncatuwu@gmail.com>
|
Co-authored-by: MelnCat <melncatuwu@gmail.com>
|
||||||
|
|
||||||
@@ -82,6 +86,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/world/damagesource/EntityDamageSource.java b/src/main/java/net/minecraft/world/damagesource/EntityDamageSource.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/damagesource/EntityDamageSource.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/damagesource/EntityDamageSource.java
|
||||||
|
@@ -0,0 +0,0 @@ public class EntityDamageSource extends DamageSource {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean scalesWithDifficulty() {
|
||||||
|
- return this.entity instanceof LivingEntity && !(this.entity instanceof Player);
|
||||||
|
+ return super.scalesWithDifficulty() || this.entity instanceof LivingEntity && !(this.entity instanceof Player); // Paper - fix MC-258535 - respect the scalesWithDifficulty override
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
|
Reference in New Issue
Block a user