call the right damage event for conduit damages

This commit is contained in:
Lulu13022002 2024-12-15 18:57:22 +01:00
parent a5b1875b2d
commit 56e3949c61
No known key found for this signature in database
GPG key ID: 491C8F0B8ACDEB01

View file

@ -56,7 +56,7 @@
- if (blockEntity.destroyTarget != null) {
+ if (damageTarget && blockEntity.destroyTarget != null) { // CraftBukkit
+ if (blockEntity.destroyTarget.hurtServer((net.minecraft.server.level.ServerLevel) level, level.damageSources().magic(), 4.0F)) // CraftBukkit
+ if (blockEntity.destroyTarget.hurtServer((net.minecraft.server.level.ServerLevel) level, level.damageSources().magic().directBlock(level, pos), 4.0F)) // CraftBukkit
level.playSound(
null,
blockEntity.destroyTarget.getX(),