Cleanup & fix

This commit is contained in:
CocoTheOwner 2021-07-21 18:24:09 +02:00
parent b15b640652
commit 8f37dc8570
2 changed files with 9 additions and 3 deletions

View File

@ -138,7 +138,13 @@ public class TreeManager implements Listener {
@Override @Override
public int getFluidHeight() { public int getFluidHeight() {
return ((Engine)worldAccess.getEngineAccess(event.getLocation().getBlockY())).getDimension().getFluidHeight(); Engine engine;
if (worldAccess.getCompound().getSize() > 1) {
engine = worldAccess.getCompound().getEngine(0);
} else {
engine = (Engine) worldAccess.getCompound().getRootDimension();
}
return engine.getDimension().getFluidHeight();
} }
@Override @Override

View File

@ -150,7 +150,7 @@ public class IrisObjectPlacement {
@Desc("The loot tables to apply to these objects") @Desc("The loot tables to apply to these objects")
private KList<IrisObjectLoot> loot = new KList<>(); private KList<IrisObjectLoot> loot = new KList<>();
@Desc("This objects overrides these trees when they grow...") @Desc("This object / these objects override the following trees when they grow...")
@ArrayType(min = 1, type = IrisTree.class) @ArrayType(min = 1, type = IrisTree.class)
private KList<IrisTree> trees = new KList<>(); private KList<IrisTree> trees = new KList<>();