Pulleys will now work in worlds with non-default world heights

This commit is contained in:
Cael Warner 2021-12-11 18:29:55 -08:00
parent aa4668ef28
commit 51763382d3
Failed to generate hash of commit

View file

@ -207,7 +207,7 @@ public class PulleyTileEntity extends LinearActuatorTileEntity {
@Override
protected int getExtensionRange() {
return Math.max(0, Math.min(AllConfigs.SERVER.kinetics.maxRopeLength.get(), (worldPosition.getY() - 1) + 64));
return Math.max(0, Math.min(AllConfigs.SERVER.kinetics.maxRopeLength.get(), (worldPosition.getY() - 1) - level.getMinBuildHeight()));
}
@Override