mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
fix rare crash when generating structures
This commit is contained in:
parent
dfd5d2c2a6
commit
20bd424cd4
@ -1075,7 +1075,7 @@ public class NBTStructure {
|
|||||||
|
|
||||||
if(!fromComponent.isInsideIgnoringSelf(components, checkPos.getX(), checkPos.getY(), checkPos.getZ())) {
|
if(!fromComponent.isInsideIgnoringSelf(components, checkPos.getX(), checkPos.getY(), checkPos.getZ())) {
|
||||||
nextComponent = buildNextComponent(rand, spawn, spawn.pools.get(nextPool.fallback), fromComponent, fromConnection);
|
nextComponent = buildNextComponent(rand, spawn, spawn.pools.get(nextPool.fallback), fromComponent, fromConnection);
|
||||||
if(nextComponent != null) addComponent(nextComponent, fromConnection.placementPriority); // don't add to queued list, we don't want to try continue from fallback
|
addComponent(nextComponent, fromConnection.placementPriority); // don't add to queued list, we don't want to try continue from fallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1097,6 +1097,7 @@ public class NBTStructure {
|
|||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
private void addComponent(Component component, int placementPriority) {
|
private void addComponent(Component component, int placementPriority) {
|
||||||
|
if(component == null) return;
|
||||||
components.add(component);
|
components.add(component);
|
||||||
|
|
||||||
component.parent = this;
|
component.parent = this;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user