Configurable sculk sensor listener range
== AT == public-f net.minecraft.world.level.gameevent.vibrations.VibrationListener listenerRange
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user