mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Fix some explosion damage not scaling with difficulty (#8767)
Fixes https://github.com/PaperMC/Paper/issues/8735
This commit is contained in:
parent
fd465d949c
commit
bf239d382f
@ -40,6 +40,10 @@ https://bugs.mojang.com/browse/MC-257875
|
||||
by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
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: 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
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
|
Loading…
Reference in New Issue
Block a user