mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Fix tree NPE
This commit is contained in:
parent
dc851d856d
commit
3a090d7c1d
@ -83,6 +83,16 @@ public class TreeManager implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (worldAccess.getCompound() == null) {
|
||||
Iris.debug(this.getClass().getName() + " passed off to vanilla because dimension compound is null");
|
||||
Iris.reportError(new NullPointerException(event.getWorld().getName() + " is accessible but does not have compound"));
|
||||
}
|
||||
|
||||
if (worldAccess.getCompound().getRootDimension() == null) {
|
||||
Iris.debug(this.getClass().getName() + " passed off to vanilla because compound's root dimension is null");
|
||||
Iris.reportError(new NullPointerException(event.getWorld().getName() + " is accessible & has compound but has no root dimension"));
|
||||
}
|
||||
|
||||
if (!worldAccess.getCompound().getRootDimension().getTreeSettings().isEnabled()) {
|
||||
Iris.debug(this.getClass().getName() + " cancelled because tree overrides are disabled");
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user