Fix misaligned patch causing monsters to not spawn in nether fortresses correctly.

This commit is contained in:
LexManos committed 2021-08-21 18:30:13 -07:00
1 parent aa97ddad8b
commit 559b801cc4
9 files changed
+65 -25

No files matched your search

@@ -25,7 +25,9 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.minecraft.world.entity.MobCategory;
import net.minecraft.world.level.SpawnData;
import net.minecraft.world.level.biome.MobSpawnSettings;
import net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData;
import net.minecraft.world.level.levelgen.feature.StructureFeature;
import net.minecraftforge.eventbus.api.Event;
@@ -55,8 +57,12 @@ public class StructureSpawnListGatherEvent extends Event
{
this.structure = structure;
this.insideOnly = this.structure.getDefaultRestrictsSpawnsToInside();
addEntitySpawns(MobCategory.MONSTER, this.structure.getDefaultSpawnList());
addEntitySpawns(MobCategory.CREATURE, this.structure.getDefaultCreatureSpawnList());
for (MobCategory cat : MobCategory.values()) {
List<SpawnerData> lst = this.structure.getDefaultSpawnList(cat);
if (!lst.isEmpty())
addEntitySpawns(cat, lst);
}
}
/**