Fixed more world gen to work with new Config
This commit is contained in:
parent
5871316b00
commit
5ebf98008d
2 changed files with 24 additions and 25 deletions
|
@ -177,29 +177,29 @@ public final class EntitySphereGen extends Entity {
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (generateOres)
|
if (generateOres)
|
||||||
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, defaultMeta, true);
|
block = WarpDriveConfig.getRandomSurfaceBlock(worldObj.rand, defaultBlock, true);
|
||||||
// Add blocks to memory
|
// Add blocks to memory
|
||||||
addBlock(new JumpBlock(block, defaultMeta, xCoord + x, yCoord + y, zCoord + z));
|
addBlock(new JumpBlock(block, defaultMeta, xCoord + x, yCoord + y, zCoord + z));
|
||||||
if (generateOres)
|
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));
|
addBlock(new JumpBlock(block, defaultMeta, xCoord - x, yCoord + y, zCoord + z));
|
||||||
if (generateOres)
|
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));
|
addBlock(new JumpBlock(block, defaultMeta, xCoord + x, yCoord - y, zCoord + z));
|
||||||
if (generateOres)
|
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));
|
addBlock(new JumpBlock(block, defaultMeta, xCoord + x, yCoord + y, zCoord - z));
|
||||||
if (generateOres)
|
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));
|
addBlock(new JumpBlock(block, defaultMeta, xCoord - x, yCoord - y, zCoord + z));
|
||||||
if (generateOres)
|
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));
|
addBlock(new JumpBlock(block, defaultMeta, xCoord + x, yCoord - y, zCoord - z));
|
||||||
if (generateOres)
|
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));
|
addBlock(new JumpBlock(block, defaultMeta, xCoord - x, yCoord + y, zCoord - z));
|
||||||
if (generateOres)
|
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));
|
addBlock(new JumpBlock(block, defaultMeta, xCoord - x, yCoord - y, zCoord - z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityChest;
|
import net.minecraft.tileentity.TileEntityChest;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||||
|
import appeng.api.AEApi;
|
||||||
import cr0s.warpdrive.WarpDrive;
|
import cr0s.warpdrive.WarpDrive;
|
||||||
import cr0s.warpdrive.WarpDriveConfig;
|
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 + 3, WorldGenStructure.getStoneBlock(corrupted, rand));
|
||||||
world.setBlock(i + 7, j + 6, k + 4, 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 + 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 + 10, WorldGenStructure.getStoneBlock(corrupted, rand));
|
||||||
world.setBlock(i + 7, j + 6, k + 11, 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));
|
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 + 3, WorldGenStructure.getStoneBlock(corrupted, rand));
|
||||||
world.setBlock(i + 8, j + 6, k + 4, 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 + 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 + 10, WorldGenStructure.getStoneBlock(corrupted, rand));
|
||||||
world.setBlock(i + 8, j + 6, k + 11, 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));
|
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 + 3, WorldGenStructure.getStoneBlock(corrupted, rand));
|
||||||
world.setBlock(i + 9, j + 6, k + 4, 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 + 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
|
// Placing air generator
|
||||||
world.setBlock(i + 9, j + 5, k + 7, WarpDrive.airgenBlock, 0, 0);
|
world.setBlock(i + 9, j + 5, k + 7, WarpDrive.airgenBlock, 0, 0);
|
||||||
world.setBlock(i + 9, j + 6, k + 10, WorldGenStructure.getStoneBlock(corrupted, rand));
|
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 + 3, WorldGenStructure.getStoneBlock(corrupted, rand));
|
||||||
world.setBlock(i + 10, j + 6, k + 4, 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 + 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
|
// Placing air generator
|
||||||
world.setBlock(i + 10, j + 5, k + 7, WarpDrive.airgenBlock, 0, 0);
|
world.setBlock(i + 10, j + 5, k + 7, WarpDrive.airgenBlock, 0, 0);
|
||||||
world.setBlock(i + 10, j + 6, k + 10, WorldGenStructure.getStoneBlock(corrupted, rand));
|
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 + 3, WorldGenStructure.getStoneBlock(corrupted, rand));
|
||||||
world.setBlock(i + 11, j + 6, k + 4, 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 + 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 + 10, WorldGenStructure.getStoneBlock(corrupted, rand));
|
||||||
world.setBlock(i + 11, j + 6, k + 11, 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));
|
world.setBlock(i + 11, j + 7, k + 4, WorldGenStructure.getStoneBlock(corrupted, rand));
|
||||||
|
@ -633,8 +634,7 @@ public class WorldGenSmallShip extends WorldGenerator {
|
||||||
// AE Quarz
|
// AE Quarz
|
||||||
case 9:
|
case 9:
|
||||||
if (WarpDriveConfig.isAppliedEnergisticsLoaded) {
|
if (WarpDriveConfig.isAppliedEnergisticsLoaded) {
|
||||||
res = WarpDriveConfig.getAEMaterial("matQuartz").copy();
|
res = AEApi.instance().definitions().materials().fluixCrystal().maybeStack(2 + rand.nextInt(22)).get();
|
||||||
res.stackSize = 2 + rand.nextInt(22);
|
|
||||||
isDone = true;
|
isDone = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -643,8 +643,7 @@ public class WorldGenSmallShip extends WorldGenerator {
|
||||||
// AE improved processor
|
// AE improved processor
|
||||||
case 10:
|
case 10:
|
||||||
if (WarpDriveConfig.isAppliedEnergisticsLoaded) {
|
if (WarpDriveConfig.isAppliedEnergisticsLoaded) {
|
||||||
res = WarpDriveConfig.getAEMaterial("matProcessorAdvanced").copy();
|
res = AEApi.instance().definitions().materials().advCard().maybeStack(res.stackSize = 1 + rand.nextInt(3)).get();
|
||||||
res.stackSize = 1 + rand.nextInt(3);
|
|
||||||
isDone = true;
|
isDone = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -672,7 +671,7 @@ public class WorldGenSmallShip extends WorldGenerator {
|
||||||
// Advanced solar panels
|
// Advanced solar panels
|
||||||
case 13:
|
case 13:
|
||||||
if (WarpDriveConfig.isAdvSolPanelLoaded) {
|
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;
|
isDone = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue