fix to handle invalid structures with invalid boxes.
This commit is contained in:
1 parent
6206753198
commit
45e3abf19c
3 files changed
+28
-14
No files matched your search
@@ -1128,7 +1128,17 @@ public class WorldAccess {
|
||||
Map<Value, Value> ret = new HashMap<>();
|
||||
for(StructureFeature<?> str : StructureFeature.STRUCTURES.values())
|
||||
{
|
||||
StructureStart start = FeatureGenerator.shouldStructureStartAt(world, pos, str, needSize);
|
||||
StructureStart<?> start;
|
||||
try
|
||||
{
|
||||
start = FeatureGenerator.shouldStructureStartAt(world, pos, str, needSize);
|
||||
}
|
||||
catch (NullPointerException npe)
|
||||
{
|
||||
CarpetSettings.LOG.error("Failed to detect structure: "+str.getName());
|
||||
start = null;
|
||||
}
|
||||
|
||||
if (start == null) continue;
|
||||
|
||||
Value key = new StringValue(NBTSerializableValue.nameFromRegistryId(Registry.STRUCTURE_FEATURE.getId(str)));
|
||||
|
||||
Reference in new issue
Block a user