Skip to content

Commit 63078f4

Browse files
committed
Simplify diff in ConduitBlockEntity
1 parent 5b507f5 commit 63078f4

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

paper-server/patches/sources/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,12 @@
4343
EntityReference<LivingEntity> newDestroyTarget = updateDestroyTarget(entity.destroyTarget, level, worldPosition, isActive);
4444
LivingEntity targetEntity = EntityReference.getLivingEntity(newDestroyTarget, level);
4545
- if (targetEntity != null) {
46-
- level.playSound(
47-
- null, targetEntity.getX(), targetEntity.getY(), targetEntity.getZ(), SoundEvents.CONDUIT_ATTACK_TARGET, SoundSource.BLOCKS, 1.0F, 1.0F
48-
- );
49-
- targetEntity.hurtServer(level, level.damageSources().magic(), 4.0F);
5046
+ if (damageTarget && targetEntity != null) { // CraftBukkit
5147
+ if (targetEntity.hurtServer(level, level.damageSources().magic().eventBlockDamager(level, worldPosition), 4.0F)) // CraftBukkit - move up
52-
+ level.playSound(
53-
+ null, targetEntity.getX(), targetEntity.getY(), targetEntity.getZ(), SoundEvents.CONDUIT_ATTACK_TARGET, SoundSource.BLOCKS, 1.0F, 1.0F
54-
+ );
48+
level.playSound(
49+
null, targetEntity.getX(), targetEntity.getY(), targetEntity.getZ(), SoundEvents.CONDUIT_ATTACK_TARGET, SoundSource.BLOCKS, 1.0F, 1.0F
50+
);
51+
- targetEntity.hurtServer(level, level.damageSources().magic(), 4.0F);
5552
}
5653

5754
if (!Objects.equals(newDestroyTarget, entity.destroyTarget)) {

0 commit comments

Comments
 (0)