Cleanup damage source a bit (#12106)
This commit is contained in:
@@ -459,7 +459,7 @@
|
||||
+ // CraftBukkit end
|
||||
if (this.level() instanceof ServerLevel serverLevel
|
||||
- && this.hurtServer(serverLevel, this.damageSources().lava(), 4.0F)
|
||||
+ && this.hurtServer(serverLevel, this.damageSources().lava().directBlock(this.level, this.lastLavaContact), 4.0F) // CraftBukkit - we also don't throw an event unless the object in lava is living, to save on some event calls
|
||||
+ && this.hurtServer(serverLevel, this.damageSources().lava().eventBlockDamager(this.level, this.lastLavaContact), 4.0F) // CraftBukkit - we also don't throw an event unless the object in lava is living, to save on some event calls
|
||||
&& this.shouldPlayLavaHurtSound()
|
||||
&& !this.isSilent()) {
|
||||
serverLevel.playSound(
|
||||
@@ -1300,7 +1300,7 @@
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (!this.hurtServer(level, this.damageSources().lightningBolt().customEventDamager(lightning), 5.0F)) { // Paper - fix DamageSource API
|
||||
+ if (!this.hurtServer(level, this.damageSources().lightningBolt().eventEntityDamager(lightning), 5.0F)) { // Paper - fix DamageSource API
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
Reference in New Issue
Block a user