Configurable sculk sensor listener range

== AT ==
public-f net.minecraft.world.level.gameevent.vibrations.VibrationListener listenerRange
This commit is contained in:
Jake Potrebic
2021-08-19 18:45:42 -07:00
parent 2a974d288d
commit c21f27243d
3 changed files with 85 additions and 0 deletions

View File

@@ -36,4 +36,17 @@ public class CraftSculkSensor<T extends SculkSensorBlockEntity> extends CraftBlo
public CraftSculkSensor<T> copy(Location location) {
return new CraftSculkSensor<>(this, location);
}
// Paper start
@Override
public int getListenerRange() {
return this.getSnapshot().getListener().getListenerRadius();
}
@Override
public void setListenerRange(int range) {
Preconditions.checkArgument(range > 0, "Vibration listener range must be greater than 0");
this.getSnapshot().rangeOverride = range;
}
// Paper end
}