mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Re-add missing default spawn lists in features (#8285)
Fixes #8265 Fixes #8301
This commit is contained in:
1 parent
0320c185b5
commit
7259887176
6 files changed
+67
-10
No files matched your search
@@ -98,8 +98,14 @@ public class StructureSpawnManager
|
||||
StructureFeature<?> structure = entry.getKey();
|
||||
StructureSpawnInfo spawnInfo = entry.getValue();
|
||||
//Note: We check if the structure has spawns for a type first before looking at the world as it should be a cheaper check
|
||||
if (spawnInfo.spawns.containsKey(classification) && structureManager.getStructureAt(pos, structure).isValid())
|
||||
return spawnInfo.spawns.get(classification);
|
||||
if (spawnInfo.spawns.containsKey(classification))
|
||||
{
|
||||
boolean valid = spawnInfo.insideOnly
|
||||
? structureManager.getStructureWithPieceAt(pos, structure).isValid()
|
||||
: structureManager.getStructureAt(pos, structure).isValid();
|
||||
if (valid)
|
||||
return spawnInfo.spawns.get(classification);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user