1.16.2-pre1
This commit is contained in:
1 parent
28857815e0
commit
bab49be81e
10 files changed
+29
-22
No files matched your search
@@ -17,6 +17,7 @@ import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.SpawnHelper;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.SpawnSettings;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -34,7 +35,7 @@ public class PerimeterDiagnostics
|
||||
samples = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
private Biome.SpawnEntry sle;
|
||||
private SpawnSettings.SpawnEntry sle;
|
||||
private ServerWorld worldServer;
|
||||
private SpawnGroup ctype;
|
||||
private MobEntity el;
|
||||
@@ -161,7 +162,7 @@ public class PerimeterDiagnostics
|
||||
if (sle == null || !worldServer.getChunkManager().getChunkGenerator().getEntitySpawnList(worldServer.getBiome(pos), worldServer.getStructureAccessor(), ctype, pos).contains(sle))
|
||||
{
|
||||
sle = null;
|
||||
for (Biome.SpawnEntry sle: worldServer.getChunkManager().getChunkGenerator().getEntitySpawnList(worldServer.getBiome(pos), worldServer.getStructureAccessor(), ctype, pos))
|
||||
for (SpawnSettings.SpawnEntry sle: worldServer.getChunkManager().getChunkGenerator().getEntitySpawnList(worldServer.getBiome(pos), worldServer.getStructureAccessor(), ctype, pos))
|
||||
{
|
||||
if (el.getType() == sle.type)
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ import net.minecraft.world.Heightmap;
|
||||
import net.minecraft.world.SpawnHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.SpawnSettings;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.gen.StructureAccessor;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
@@ -415,7 +416,7 @@ public class SpawnReporter
|
||||
}
|
||||
|
||||
// yeeted from SpawnHelper - temporary fix
|
||||
private static List<Biome.SpawnEntry> method_29950(ServerWorld serverWorld, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, SpawnGroup spawnGroup, BlockPos blockPos, /*@Nullable*/ Biome biome) {
|
||||
private static List<SpawnSettings.SpawnEntry> method_29950(ServerWorld serverWorld, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, SpawnGroup spawnGroup, BlockPos blockPos, /*@Nullable*/ Biome biome) {
|
||||
return spawnGroup == SpawnGroup.MONSTER && serverWorld.getBlockState(blockPos.down()).getBlock() == Blocks.NETHER_BRICKS && structureAccessor.getStructureAt(blockPos, false, StructureFeature.FORTRESS).hasChildren() ? StructureFeature.FORTRESS.getMonsterSpawns() : chunkGenerator.getEntitySpawnList(biome != null ? biome : serverWorld.getBiome(blockPos), structureAccessor, spawnGroup, blockPos);
|
||||
}
|
||||
|
||||
@@ -432,10 +433,10 @@ public class SpawnReporter
|
||||
for (SpawnGroup enumcreaturetype : SpawnGroup.values())
|
||||
{
|
||||
String type_code = String.format("%s", enumcreaturetype).substring(0, 3);
|
||||
List<Biome.SpawnEntry> lst = method_29950(worldIn, worldIn.getStructureAccessor(), worldIn.getChunkManager().getChunkGenerator(), enumcreaturetype, pos, worldIn.getBiome(pos) );// ((ChunkGenerator)worldIn.getChunkManager().getChunkGenerator()).getEntitySpawnList(, worldIn.getStructureAccessor(), enumcreaturetype, pos);
|
||||
List<SpawnSettings.SpawnEntry> lst = method_29950(worldIn, worldIn.getStructureAccessor(), worldIn.getChunkManager().getChunkGenerator(), enumcreaturetype, pos, worldIn.getBiome(pos) );// ((ChunkGenerator)worldIn.getChunkManager().getChunkGenerator()).getEntitySpawnList(, worldIn.getStructureAccessor(), enumcreaturetype, pos);
|
||||
if (lst != null && !lst.isEmpty())
|
||||
{
|
||||
for (Biome.SpawnEntry spawnEntry : lst)
|
||||
for (SpawnSettings.SpawnEntry spawnEntry : lst)
|
||||
{
|
||||
if (SpawnRestriction.getLocation(spawnEntry.type)==null)
|
||||
continue; // vanilla bug
|
||||
|
||||
Reference in new issue
Block a user