Fixed issues with new world height

- Pulleys are now able to extend below Y=0
- Super Glue can now be placed above Y=256, all the way up to the new world height limit of 320
- Fixes #2421, fixes #2426, fixes #2427
This commit is contained in:
Cael Warner 2021-12-11 17:44:03 -08:00
parent 1e9c94303e
commit aa4668ef28
No known key found for this signature in database
GPG Key ID: F70FD7559CCDFC48
2 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ public class SuperGlueEntity extends Entity
public boolean onValidSurface() {
BlockPos pos = hangingPosition;
BlockPos pos2 = hangingPosition.relative(getFacingDirection().getOpposite());
if (pos2.getY() >= 256)
if (level.isOutsideBuildHeight(pos2))
return false;
if (!level.isAreaLoaded(pos, 0) || !level.isAreaLoaded(pos2, 0))
return true;

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));
return Math.max(0, Math.min(AllConfigs.SERVER.kinetics.maxRopeLength.get(), (worldPosition.getY() - 1) + 64));
}
@Override