mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 20:22:28 +00:00
Fix misaligned patch causing monsters to not spawn in nether fortresses correctly.
This commit is contained in:
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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user