From a0a2e7287cc0013a5564e86b80dba5f16559f673 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 8 Jun 2023 16:56:02 -0700 Subject: [PATCH] fix sculk npe --- .../0788-Configurable-sculk-sensor-listener-range.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0788-Configurable-sculk-sensor-listener-range.patch b/patches/server/0788-Configurable-sculk-sensor-listener-range.patch index 2cbe4542b..f3a0edca2 100644 --- a/patches/server/0788-Configurable-sculk-sensor-listener-range.patch +++ b/patches/server/0788-Configurable-sculk-sensor-listener-range.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Configurable sculk sensor listener range public-f net.minecraft.world.level.gameevent.vibrations.VibrationListener listenerRange diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java -index a6c226da995eecc323d69a3eff1f8d202410e069..ce42474501b4e168b7877df4d071c5f2eca549ea 100644 +index a6c226da995eecc323d69a3eff1f8d202410e069..4db0227e24cb5afd9f34307ff9ff920c67be0489 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SculkSensorBlockEntity.java @@ -48,9 +48,11 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList @@ -26,7 +26,7 @@ index a6c226da995eecc323d69a3eff1f8d202410e069..ce42474501b4e168b7877df4d071c5f2 VibrationSystem.Data.CODEC.encodeStart(NbtOps.INSTANCE, this.vibrationData).resultOrPartial(LOGGER::error).ifPresent((listenerNbt) -> { nbt.put("listener", listenerNbt); }); -+ if (this.getListener().rangeOverride != null || this.getListener().rangeOverride != VibrationUser.LISTENER_RANGE) nbt.putInt(PAPER_LISTENER_RANGE_NBT_KEY, this.getListener().rangeOverride); // Paper - only save if it's different from the default ++ if (this.getListener().rangeOverride != null && this.getListener().rangeOverride != VibrationUser.LISTENER_RANGE) nbt.putInt(PAPER_LISTENER_RANGE_NBT_KEY, this.getListener().rangeOverride); // Paper - only save if it's different from the default } @Override