Stop minor worldgen chunk generation runaway from iridium

This commit is contained in:
mezz 2017-02-15 20:52:41 -08:00
parent 3854f98535
commit 6e98c7e0bc

View file

@ -227,8 +227,10 @@ public class TechRebornWorldGen implements IWorldGenerator {
zPos = chunkZ * 16 + random.nextInt(16);
BlockPos pos = new BlockPos(xPos, yPos, zPos);
if(ore.blockNiceName.equalsIgnoreCase("iridium")){ //Work around for iridium
if(world.getBlockState(pos).getBlock().isReplaceableOreGen(world.getBlockState(pos), world, pos, predicate)){
world.setBlockState(pos, ore.state);
BlockPos iridiumPos = pos.add(8, 0, 8); // standard worldgen offset is added here like in WorldGenMinable#generate
IBlockState blockState = world.getBlockState(iridiumPos);
if(blockState.getBlock().isReplaceableOreGen(blockState, world, iridiumPos, predicate)){
world.setBlockState(iridiumPos, ore.state, 2);
}
} else {