Fixed more world gen to work with new Config

This commit is contained in:
Francesco Macagno 2015-07-26 17:06:52 -07:00
parent 5871316b00
commit 5ebf98008d
2 changed files with 24 additions and 25 deletions

View file

@ -177,29 +177,29 @@ public final class EntitySphereGen extends Entity {
continue;
if (generateOres)
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, defaultMeta, true);
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, true);
// Add blocks to memory
addBlock(new JumpBlock(block, defaultMeta, xCoord + x, yCoord + y, zCoord + z));
if (generateOres)
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, defaultMeta, true);
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, true);
addBlock(new JumpBlock(block, defaultMeta, xCoord - x, yCoord + y, zCoord + z));
if (generateOres)
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, defaultMeta, true);
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, true);
addBlock(new JumpBlock(block, defaultMeta, xCoord + x, yCoord - y, zCoord + z));
if (generateOres)
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, defaultMeta, true);
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, true);
addBlock(new JumpBlock(block, defaultMeta, xCoord + x, yCoord + y, zCoord - z));
if (generateOres)
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, defaultMeta, true);
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, true);
addBlock(new JumpBlock(block, defaultMeta, xCoord - x, yCoord - y, zCoord + z));
if (generateOres)
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, defaultMeta, true);
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, true);
addBlock(new JumpBlock(block, defaultMeta, xCoord + x, yCoord - y, zCoord - z));
if (generateOres)
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, defaultMeta, true);
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, true);
addBlock(new JumpBlock(block, defaultMeta, xCoord - x, yCoord + y, zCoord - z));
if (generateOres)
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, defaultMeta, true);
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, true);
addBlock(new JumpBlock(block, defaultMeta, xCoord - x, yCoord - y, zCoord - z));
}
}

View file

@ -11,6 +11,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityChest;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;
import appeng.api.AEApi;
import cr0s.warpdrive.WarpDrive;
import cr0s.warpdrive.WarpDriveConfig;
@ -218,7 +219,7 @@ public class WorldGenSmallShip extends WorldGenerator {
world.setBlock(i + 7, j + 6, k + 3, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 7, j + 6, k + 4, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 7, j + 6, k + 6, Block.getBlockFromItem(cableType.getItem()), cableType.getItemDamage(), 0);
world.setBlock(i + 7, j + 6, k + 7, Block.getBlockFromItem(WarpDriveConfig.ASP), solarType, 0);
world.setBlock(i + 7, j + 6, k + 7, Block.getBlockFromItem(WarpDriveConfig.ASP.getItem()), solarType, 0);
world.setBlock(i + 7, j + 6, k + 10, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 7, j + 6, k + 11, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 7, j + 7, k + 5, WorldGenStructure.getStoneBlock(corrupted, rand));
@ -251,7 +252,7 @@ public class WorldGenSmallShip extends WorldGenerator {
world.setBlock(i + 8, j + 6, k + 3, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 8, j + 6, k + 4, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 8, j + 6, k + 6, Block.getBlockFromItem(cableType.getItem()), cableType.getItemDamage(), 0);
world.setBlock(i + 8, j + 6, k + 7, Block.getBlockFromItem(WarpDriveConfig.ASP), solarType, 0);
world.setBlock(i + 8, j + 6, k + 7, Block.getBlockFromItem(WarpDriveConfig.ASP.getItem()), solarType, 0);
world.setBlock(i + 8, j + 6, k + 10, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 8, j + 6, k + 11, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 8, j + 7, k + 4, WorldGenStructure.getStoneBlock(corrupted, rand));
@ -286,7 +287,7 @@ public class WorldGenSmallShip extends WorldGenerator {
world.setBlock(i + 9, j + 6, k + 3, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 9, j + 6, k + 4, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 9, j + 6, k + 6, Block.getBlockFromItem(cableType.getItem()), cableType.getItemDamage(), 0);
world.setBlock(i + 9, j + 6, k + 7, Block.getBlockFromItem(WarpDriveConfig.ASP), solarType, 0);
world.setBlock(i + 9, j + 6, k + 7, Block.getBlockFromItem(WarpDriveConfig.ASP.getItem()), solarType, 0);
// Placing air generator
world.setBlock(i + 9, j + 5, k + 7, WarpDrive.airgenBlock, 0, 0);
world.setBlock(i + 9, j + 6, k + 10, WorldGenStructure.getStoneBlock(corrupted, rand));
@ -326,7 +327,7 @@ public class WorldGenSmallShip extends WorldGenerator {
world.setBlock(i + 10, j + 6, k + 3, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 10, j + 6, k + 4, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 10, j + 6, k + 6, Block.getBlockFromItem(cableType.getItem()), cableType.getItemDamage(), 0);
world.setBlock(i + 10, j + 6, k + 7, Block.getBlockFromItem(WarpDriveConfig.ASP), solarType, 0);
world.setBlock(i + 10, j + 6, k + 7, Block.getBlockFromItem(WarpDriveConfig.ASP.getItem()), solarType, 0);
// Placing air generator
world.setBlock(i + 10, j + 5, k + 7, WarpDrive.airgenBlock, 0, 0);
world.setBlock(i + 10, j + 6, k + 10, WorldGenStructure.getStoneBlock(corrupted, rand));
@ -382,7 +383,7 @@ public class WorldGenSmallShip extends WorldGenerator {
world.setBlock(i + 11, j + 6, k + 3, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 11, j + 6, k + 4, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 11, j + 6, k + 6, Block.getBlockFromItem(cableType.getItem()), cableType.getItemDamage(), 0);
world.setBlock(i + 11, j + 6, k + 7, Block.getBlockFromItem(WarpDriveConfig.ASP), solarType, 0);
world.setBlock(i + 11, j + 6, k + 7, Block.getBlockFromItem(WarpDriveConfig.ASP.getItem()), solarType, 0);
world.setBlock(i + 11, j + 6, k + 10, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 11, j + 6, k + 11, WorldGenStructure.getStoneBlock(corrupted, rand));
world.setBlock(i + 11, j + 7, k + 4, WorldGenStructure.getStoneBlock(corrupted, rand));
@ -633,8 +634,7 @@ public class WorldGenSmallShip extends WorldGenerator {
// AE Quarz
case 9:
if (WarpDriveConfig.isAppliedEnergisticsLoaded) {
res = WarpDriveConfig.getAEMaterial("matQuartz").copy();
res.stackSize = 2 + rand.nextInt(22);
res = AEApi.instance().definitions().materials().fluixCrystal().maybeStack(2 + rand.nextInt(22)).get();
isDone = true;
}
@ -643,8 +643,7 @@ public class WorldGenSmallShip extends WorldGenerator {
// AE improved processor
case 10:
if (WarpDriveConfig.isAppliedEnergisticsLoaded) {
res = WarpDriveConfig.getAEMaterial("matProcessorAdvanced").copy();
res.stackSize = 1 + rand.nextInt(3);
res = AEApi.instance().definitions().materials().advCard().maybeStack(res.stackSize = 1 + rand.nextInt(3)).get();
isDone = true;
}
break;
@ -672,7 +671,7 @@ public class WorldGenSmallShip extends WorldGenerator {
// Advanced solar panels
case 13:
if (WarpDriveConfig.isAdvSolPanelLoaded) {
res = new ItemStack(WarpDriveConfig.ASP, rand.nextInt(3), solarType).copy();
res = new ItemStack(WarpDriveConfig.ASP.getItem(), rand.nextInt(3), solarType).copy();
isDone = true;
}
break;