mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 23:47:38 +01:00
Merge pull request #2525 from The-Vowels/mc1.18/dev
Fix a gantry carriage crash with Starlight 🙃
This commit is contained in:
commit
1bae455045
2 changed files with 7 additions and 3 deletions
|
@ -46,7 +46,8 @@ public class ContraptionWorld extends WrappedWorld {
|
|||
world.playLocalSound(x, y, z, p_184134_7_, p_184134_8_, p_184134_9_, p_184134_10_, p_184134_11_);
|
||||
}
|
||||
|
||||
// Calculate lazily to avoid issues on load when the bounds are yet to be determined.
|
||||
// Ensure that we provide accurate information about ContraptionWorld height to mods (such as Starlight) which
|
||||
// expect Levels to only have blocks located in chunks within their height range.
|
||||
|
||||
@Override
|
||||
public int getHeight() {
|
||||
|
@ -55,6 +56,6 @@ public class ContraptionWorld extends WrappedWorld {
|
|||
|
||||
@Override
|
||||
public int getMinBuildHeight() {
|
||||
return - (int) contraption.bounds.getYsize() + 1;
|
||||
return - (int) contraption.bounds.getYsize();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -200,7 +200,10 @@ public class WrappedWorld extends Level {
|
|||
return entityGetter;
|
||||
}
|
||||
|
||||
// Intentionally copied from LevelHeightAccessor. Lithium overrides these methods so we need to, too.
|
||||
// Intentionally copied from LevelHeightAccessor. Workaround for issues caused when other mods (such as Lithium)
|
||||
// override the vanilla implementations in ways which cause WrappedWorlds to return incorrect, default height info.
|
||||
// WrappedWorld subclasses should implement their own getMinBuildHeight and getHeight overrides where they deviate
|
||||
// from the defaults for their dimension.
|
||||
|
||||
@Override
|
||||
public int getMaxBuildHeight() {
|
||||
|
|
Loading…
Reference in a new issue