Fixed a NPE when placing chunk loaders in 1.8/1.12 (#61)

This commit is contained in:
OmerBenGera 2022-10-08 15:45:44 +03:00
parent db2b49fbde
commit a891a18ee9
2 changed files with 6 additions and 2 deletions

View File

@ -71,7 +71,9 @@ public final class ChunkLoaderNPC extends EntityPlayer implements com.bgsoftware
@Override
public AxisAlignedBB getBoundingBox() {
return this.boundingBox;
// boundingBox is null on initialization of the class, which fixes:
// https://github.com/BG-Software-LLC/WildLoaders/issues/61
return this.boundingBox == null ? super.getBoundingBox() : this.boundingBox;
}
@Override

View File

@ -74,7 +74,9 @@ public final class ChunkLoaderNPC extends EntityPlayer implements com.bgsoftware
@Override
public AxisAlignedBB getBoundingBox() {
return this.boundingBox;
// boundingBox is null on initialization of the class, which fixes:
// https://github.com/BG-Software-LLC/WildLoaders/issues/61
return this.boundingBox == null ? super.getBoundingBox() : this.boundingBox;
}
@Override