mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
add nbt vertibird spawning and remove unused meteor dungeon code
This commit is contained in:
parent
c1a2f8d270
commit
8994d2e0b1
@ -7,7 +7,7 @@ public class WorldConfig {
|
||||
public static boolean overworldOre = true;
|
||||
public static boolean netherOre = true;
|
||||
public static boolean endOre = true;
|
||||
|
||||
|
||||
public static int uraniumSpawn = 6;
|
||||
public static int thoriumSpawn = 7;
|
||||
public static int titaniumSpawn = 8;
|
||||
@ -77,7 +77,6 @@ public class WorldConfig {
|
||||
public static int radioStructure = 500;
|
||||
public static int antennaStructure = 250;
|
||||
public static int atomStructure = 500;
|
||||
public static int vertibirdStructure = 500;
|
||||
public static int dungeonStructure = 64;
|
||||
public static int relayStructure = 500;
|
||||
public static int satelliteStructure = 500;
|
||||
@ -88,7 +87,6 @@ public class WorldConfig {
|
||||
public static int geyserWater = 3000;
|
||||
public static int geyserChlorine = 3000;
|
||||
public static int geyserVapor = 500;
|
||||
public static int meteorStructure = 15000;
|
||||
public static int capsuleStructure = 100;
|
||||
public static int arcticStructure = 500;
|
||||
public static int jungleStructure = 2000;
|
||||
@ -115,15 +113,15 @@ public class WorldConfig {
|
||||
public static float craterBiomeInnerRad = 25F;
|
||||
public static float craterBiomeOuterRad = 0.5F;
|
||||
public static float craterBiomeWaterMult = 5F;
|
||||
|
||||
|
||||
public static void loadFromConfig(Configuration config) {
|
||||
|
||||
final String CATEGORY_OREGEN = CommonConfig.CATEGORY_ORES;
|
||||
|
||||
|
||||
overworldOre = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.D00_overworldOres", "General switch for whether overworld ores should be generated. Does not include special structures like oil.", true);
|
||||
netherOre = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.D01_netherOres", "General switch for whether nether ores should be generated.", true);
|
||||
endOre = CommonConfig.createConfigBool(config, CATEGORY_OREGEN, "2.D02_endOres", "General switch for whether end ores should be generated. Does not include special structures like trixite crystals.", true);
|
||||
|
||||
|
||||
uraniumSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.00_uraniumSpawnrate", "Amount of uranium ore veins per chunk", 7);
|
||||
titaniumSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.01_titaniumSpawnrate", "Amount of titanium ore veins per chunk", 8);
|
||||
sulfurSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.02_sulfurSpawnrate", "Amount of sulfur ore veins per chunk", 5);
|
||||
@ -195,7 +193,6 @@ public class WorldConfig {
|
||||
radioStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.00_radioSpawn", "Spawn radio station on every nTH chunk", 500);
|
||||
antennaStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.01_antennaSpawn", "Spawn antenna on every nTH chunk", 250);
|
||||
atomStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.02_atomSpawn", "Spawn power plant on every nTH chunk", 500);
|
||||
vertibirdStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.03_vertibirdSpawn", "Spawn vertibird on every nTH chunk", 500);
|
||||
dungeonStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.04_dungeonSpawn", "Spawn library dungeon on every nTH chunk", 64);
|
||||
relayStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.05_relaySpawn", "Spawn relay on every nTH chunk", 500);
|
||||
satelliteStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.06_satelliteSpawn", "Spawn satellite dish on every nTH chunk", 500);
|
||||
@ -210,7 +207,6 @@ public class WorldConfig {
|
||||
geyserWater = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.17_geyserWaterSpawn", "Spawn water geyser on every nTH chunk", 3000);
|
||||
geyserChlorine = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.18_geyserChlorineSpawn", "Spawn poison geyser on every nTH chunk", 3000);
|
||||
geyserVapor = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.19_geyserVaporSpawn", "Spawn vapor geyser on every nTH chunk", 500);
|
||||
meteorStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.20_meteorSpawn", "Spawn meteor dungeon on every nTH chunk", 15000);
|
||||
capsuleStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.21_capsuleSpawn", "Spawn landing capsule on every nTH chunk", 100);
|
||||
arcticStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.22_arcticVaultSpawn", "Spawn arctic code vault on every nTH chunk", 500);
|
||||
jungleStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.23_jungleDungeonSpawn", "Spawn jungle dungeon on every nTH chunk", 2000);
|
||||
@ -238,7 +234,6 @@ public class WorldConfig {
|
||||
radioStructure = CommonConfig.setDefZero(radioStructure, 1000);
|
||||
antennaStructure = CommonConfig.setDefZero(antennaStructure, 1000);
|
||||
atomStructure = CommonConfig.setDefZero(atomStructure, 1000);
|
||||
vertibirdStructure = CommonConfig.setDefZero(vertibirdStructure, 1000);
|
||||
dungeonStructure = CommonConfig.setDefZero(dungeonStructure, 1000);
|
||||
relayStructure = CommonConfig.setDefZero(relayStructure, 1000);
|
||||
satelliteStructure = CommonConfig.setDefZero(satelliteStructure, 1000);
|
||||
@ -253,11 +248,10 @@ public class WorldConfig {
|
||||
minefreq = CommonConfig.setDefZero(minefreq, 1000);
|
||||
radfreq = CommonConfig.setDefZero(radfreq, 1000);
|
||||
vaultfreq = CommonConfig.setDefZero(vaultfreq, 1000);
|
||||
meteorStructure = CommonConfig.setDefZero(meteorStructure, 15000);
|
||||
jungleStructure = CommonConfig.setDefZero(jungleStructure, 1000);
|
||||
capsuleStructure = CommonConfig.setDefZero(capsuleStructure, 100);
|
||||
arcticStructure = CommonConfig.setDefZero(arcticStructure, 500);
|
||||
|
||||
|
||||
meteorStrikeChance = CommonConfig.setDef(meteorStrikeChance, 1000);
|
||||
meteorShowerChance = CommonConfig.setDef(meteorShowerChance, 1000);
|
||||
}
|
||||
|
||||
@ -28,7 +28,6 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.tileentity.TileEntitySkull;
|
||||
import net.minecraft.util.WeightedRandom;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
@ -260,23 +259,6 @@ public class HbmWorldGen implements IWorldGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
if(!biome.canSpawnLightningBolt() && biome.temperature >= 2F) {
|
||||
if(WorldConfig.vertibirdStructure > 0 && rand.nextInt(WorldConfig.vertibirdStructure) == 0) {
|
||||
for(int a = 0; a < 1; a++) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int z = j + rand.nextInt(16);
|
||||
int y = world.getHeightValue(x, z);
|
||||
|
||||
if(rand.nextInt(2) == 0) {
|
||||
new Vertibird().generate(world, rand, x, y, z);
|
||||
} else {
|
||||
new CrashedVertibird().generate(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(WorldConfig.dungeonStructure > 0 && rand.nextInt(WorldConfig.dungeonStructure) == 0) {
|
||||
int x = i + rand.nextInt(16);
|
||||
int y = rand.nextInt(256);
|
||||
|
||||
@ -1,426 +0,0 @@
|
||||
//Schematic to java Structure by jajo_11 | inspired by "MITHION'S .SCHEMATIC TO JAVA CONVERTINGTOOL"
|
||||
|
||||
package com.hbm.world.dungeon;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.itempool.ItemPool;
|
||||
import com.hbm.itempool.ItemPoolsLegacy;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class CrashedVertibird extends WorldGenerator
|
||||
{
|
||||
Block Block1 = ModBlocks.deco_steel;
|
||||
Block Block2 = ModBlocks.deco_tungsten;
|
||||
Block Block3 = ModBlocks.reinforced_glass;
|
||||
Block Block4 = ModBlocks.deco_titanium;
|
||||
|
||||
protected Block[] GetValidSpawnBlocks()
|
||||
{
|
||||
return new Block[]
|
||||
{
|
||||
Blocks.sand,
|
||||
Blocks.sandstone,
|
||||
};
|
||||
}
|
||||
|
||||
public boolean LocationIsValidSpawn(World world, int x, int y, int z)
|
||||
{
|
||||
|
||||
Block checkBlock = world.getBlock(x, y - 1, z);
|
||||
Block blockAbove = world.getBlock(x, y , z);
|
||||
Block blockBelow = world.getBlock(x, y - 2, z);
|
||||
|
||||
for (Block i : GetValidSpawnBlocks())
|
||||
{
|
||||
if (blockAbove != Blocks.air)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (checkBlock == i)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (checkBlock == Blocks.snow_layer && blockBelow == i)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (checkBlock.getMaterial() == Material.plants && blockBelow == i)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean generate(World world, Random rand, int x, int y, int z)
|
||||
{
|
||||
int i = rand.nextInt(1);
|
||||
|
||||
if(i == 0)
|
||||
{
|
||||
generate_r0(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public boolean generate_r0(World world, Random rand, int x, int y, int z)
|
||||
{
|
||||
int yOffset = 8 + rand.nextInt(4);
|
||||
|
||||
if(!LocationIsValidSpawn(world, x + 9, y, z + 9))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
world.setBlock(x + 4, y + 0 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 0 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 0 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 0 - yOffset, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 1 - yOffset, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 1 - yOffset, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 1 - yOffset, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 1 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 1 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 1 - yOffset, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 1 - yOffset, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 1 - yOffset, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 1 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 1 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 1 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 1 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 1 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 2 - yOffset, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 5, y + 2 - yOffset, z + 0, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 2 - yOffset, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 7, y + 2 - yOffset, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 2 - yOffset, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 2 - yOffset, z + 2, Blocks.stone_stairs, 2, 3);
|
||||
world.setBlock(x + 6, y + 2 - yOffset, z + 2, Blocks.stone_stairs, 2, 3);
|
||||
world.setBlock(x + 7, y + 2 - yOffset, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 2 - yOffset, z + 3, Block4, 0, 3);
|
||||
world.setBlock(x + 3, y + 2 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 2 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 2 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 2 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 2 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 3, y + 2 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 2 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 2 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 2 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 2 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 2 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 6, y + 2 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 3 - yOffset, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 3 - yOffset, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 3 - yOffset, z + 0, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 3 - yOffset, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 3 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 3 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 3 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 3 - yOffset, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 3 - yOffset, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 3 - yOffset, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 3 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 3 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 3 - yOffset, z + 4, Block4, 0, 3);
|
||||
world.setBlock(x + 2, y + 3 - yOffset, z + 5, Block4, 0, 3);
|
||||
world.setBlock(x + 7, y + 3 - yOffset, z + 5, Block4, 0, 3);
|
||||
world.setBlock(x + 4, y + 3 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 3 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 3 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 3 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 3 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 3 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 3 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 4 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 4 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 4 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 4 - yOffset, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 4 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 4 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 4 - yOffset, z + 5, Block4, 0, 3);
|
||||
world.setBlock(x + 2, y + 4 - yOffset, z + 6, Block4, 0, 3);
|
||||
world.setBlock(x + 3, y + 4 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 4 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + 4 - yOffset, z + 7, Block4, 0, 3);
|
||||
world.setBlock(x + 3, y + 4 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 4 - yOffset, z + 7, Blocks.chest, 2, 3);
|
||||
if(world.getBlock(x + 6, y + 4 - yOffset, z + 7) == Blocks.chest)
|
||||
{
|
||||
WeightedRandomChestContent.generateChestContents(rand, ItemPool.getPool(ItemPoolsLegacy.POOL_VERTIBIRD), (TileEntityChest)world.getTileEntity(x + 6, y + 4 - yOffset, z + 7), 8);
|
||||
}
|
||||
world.setBlock(x + 7, y + 4 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 4 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 4 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 4 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 4 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 4 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 4 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 5 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 5 - yOffset, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 5 - yOffset, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 5 - yOffset, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 5 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 5 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 5 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 5 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 5 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 5 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 5 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 5 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + 5 - yOffset, z + 6, Block4, 0, 3);
|
||||
world.setBlock(x + 3, y + 5 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 5 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + 5 - yOffset, z + 7, Block4, 0, 3);
|
||||
world.setBlock(x + 3, y + 5 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 5 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 5 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 5 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 5 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 5 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 5 - yOffset, z + 9, Block4, 0, 3);
|
||||
world.setBlock(x + 6, y + 5 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 6 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 6 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 6 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 6 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 6 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 6 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 0, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 8, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 9, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 10, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 6 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 6 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 6 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 6 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 6 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 6 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 6 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 6 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 6 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 6 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 6 - yOffset, z + 8, ModBlocks.machine_battery, 2, 3);
|
||||
world.setBlock(x + 6, y + 6 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 6 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 6 - yOffset, z + 9, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 6 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 6 - yOffset, z + 10, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 6 - yOffset, z + 10, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 6 - yOffset, z + 10, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 6 - yOffset, z + 11, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 6 - yOffset, z + 11, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 7 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 7 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 7 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 7 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 7 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 1, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 2, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 8, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 9, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 10, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 11, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 12, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 13, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 7 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 3, y + 7 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 7 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 7 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 7 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 7 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 7 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 7 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 7 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 7 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 7 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 7 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 7 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 7 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 7 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 7 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 7 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 7 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 7 - yOffset, z + 9, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 5, y + 7 - yOffset, z + 9, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 7 - yOffset, z + 9, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 7, y + 7 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 7 - yOffset, z + 10, Block4, 0, 3);
|
||||
world.setBlock(x + 6, y + 7 - yOffset, z + 10, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 7 - yOffset, z + 11, Block4, 0, 3);
|
||||
world.setBlock(x + 6, y + 7 - yOffset, z + 11, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 8 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 8 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 8 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 8 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 8 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 13, y + 8 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 8 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 8 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 8 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 8 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 8 - yOffset, z + 6, Blocks.chest, 2, 3);
|
||||
if(world.getBlock(x + 5, y + 8 - yOffset, z + 6) == Blocks.chest)
|
||||
{
|
||||
WeightedRandomChestContent.generateChestContents(rand, ItemPool.getPool(ItemPoolsLegacy.POOL_EXPENSIVE), (TileEntityChest)world.getTileEntity(x + 5, y + 8 - yOffset, z + 6), 8);
|
||||
}
|
||||
world.setBlock(x + 6, y + 8 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 8 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 8 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 8 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 8 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 8 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 8 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 8 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 8 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 8 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 8 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 8 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 8 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 8 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 8 - yOffset, z + 9, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 5, y + 8 - yOffset, z + 9, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 8 - yOffset, z + 9, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 7, y + 8 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 8 - yOffset, z + 10, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 5, y + 8 - yOffset, z + 10, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 8 - yOffset, z + 10, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 7, y + 8 - yOffset, z + 10, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 8 - yOffset, z + 11, Block4, 0, 3);
|
||||
world.setBlock(x + 6, y + 8 - yOffset, z + 11, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 8 - yOffset, z + 11, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 8 - yOffset, z + 12, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 9 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 13, y + 9 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 9 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 9 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 9 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 9 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 9 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 9 - yOffset, z + 6, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 9 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 9 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 9 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 9 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 9 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 9 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 9 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 9 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 9 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 9 - yOffset, z + 9, Block4, 0, 3);
|
||||
world.setBlock(x + 6, y + 9 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 9 - yOffset, z + 10, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 5, y + 9 - yOffset, z + 10, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 9 - yOffset, z + 10, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 7, y + 9 - yOffset, z + 10, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 9 - yOffset, z + 11, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 9 - yOffset, z + 11, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 9 - yOffset, z + 12, Block4, 0, 3);
|
||||
world.setBlock(x + 6, y + 9 - yOffset, z + 12, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 9 - yOffset, z + 12, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 9 - yOffset, z + 13, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 9 - yOffset, z + 13, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 10 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 10 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 10 - yOffset, z + 8, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 10 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 10, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 10 - yOffset, z + 10, Block4, 0, 3);
|
||||
world.setBlock(x + 6, y + 10 - yOffset, z + 10, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 11, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 10 - yOffset, z + 11, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 10 - yOffset, z + 11, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 12, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 10 - yOffset, z + 12, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 10 - yOffset, z + 12, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 13, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 10 - yOffset, z + 13, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 10 - yOffset, z + 13, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 10 - yOffset, z + 14, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 10 - yOffset, z + 15, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 10 - yOffset, z + 17, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 10 - yOffset, z + 18, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 11 - yOffset, z + 4, Block4, 0, 3);
|
||||
world.setBlock(x + 12, y + 11 - yOffset, z + 5, Block4, 0, 3);
|
||||
world.setBlock(x + 13, y + 11 - yOffset, z + 5, Block4, 0, 3);
|
||||
world.setBlock(x + 14, y + 11 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 11 - yOffset, z + 5, Block4, 0, 3);
|
||||
world.setBlock(x + 16, y + 11 - yOffset, z + 5, Block4, 0, 3);
|
||||
world.setBlock(x + 17, y + 11 - yOffset, z + 5, Block4, 0, 3);
|
||||
world.setBlock(x + 14, y + 11 - yOffset, z + 6, Block4, 0, 3);
|
||||
world.setBlock(x + 14, y + 11 - yOffset, z + 7, Block4, 0, 3);
|
||||
world.setBlock(x + 5, y + 11 - yOffset, z + 10, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 11 - yOffset, z + 11, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 11 - yOffset, z + 12, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 11 - yOffset, z + 12, Block1, 0, 3);
|
||||
world.setBlock(x + 6, y + 11 - yOffset, z + 12, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 11 - yOffset, z + 13, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 11 - yOffset, z + 14, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 11 - yOffset, z + 14, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 11 - yOffset, z + 14, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 11 - yOffset, z + 15, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 11 - yOffset, z + 15, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 11 - yOffset, z + 15, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 11 - yOffset, z + 16, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 11 - yOffset, z + 17, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 11 - yOffset, z + 18, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 12 - yOffset, z + 14, Block1, 0, 3);
|
||||
world.setBlock(x + 3, y + 12 - yOffset, z + 16, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 12 - yOffset, z + 16, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 12 - yOffset, z + 16, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 12 - yOffset, z + 16, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 12 - yOffset, z + 16, Block1, 0, 3);
|
||||
world.setBlock(x + 8, y + 12 - yOffset, z + 16, Block1, 0, 3);
|
||||
world.setBlock(x + 9, y + 12 - yOffset, z + 16, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 12 - yOffset, z + 17, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 12 - yOffset, z + 17, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 6, y + 12 - yOffset, z + 17, Block1, 0, 3);
|
||||
world.setBlock(x + 7, y + 12 - yOffset, z + 17, Block1, 0, 3);
|
||||
world.setBlock(x + 8, y + 12 - yOffset, z + 17, Block1, 0, 3);
|
||||
world.setBlock(x + 9, y + 12 - yOffset, z + 17, Block1, 0, 3);
|
||||
world.setBlock(x + 10, y + 12 - yOffset, z + 17, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 13 - yOffset, z + 17, Block1, 0, 3);
|
||||
|
||||
generate_r02_last(world, rand, x, y, z, yOffset);
|
||||
return true;
|
||||
|
||||
}
|
||||
public boolean generate_r02_last(World world, Random rand, int x, int y, int z, int yOffset)
|
||||
{
|
||||
|
||||
world.setBlock(x + 4, y + 1 - yOffset, z + 1, Blocks.lever, 3, 3);
|
||||
world.setBlock(x + 6, y + 1 - yOffset, z + 1, Blocks.lever, 3, 3);
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned crashed Vertibird at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,514 +0,0 @@
|
||||
//Schematic to java Structure by jajo_11 | inspired by "MITHION'S .SCHEMATIC TO JAVA CONVERTINGTOOL"
|
||||
|
||||
package com.hbm.world.dungeon;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.itempool.ItemPool;
|
||||
import com.hbm.itempool.ItemPoolsLegacy;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.util.WeightedRandomChestContent;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class Vertibird extends WorldGenerator
|
||||
{
|
||||
Block Block2 = ModBlocks.deco_steel;
|
||||
Block Block1 = ModBlocks.deco_tungsten;
|
||||
Block Block4 = ModBlocks.reinforced_glass;
|
||||
Block Block3 = ModBlocks.deco_titanium;
|
||||
|
||||
protected Block[] GetValidSpawnBlocks()
|
||||
{
|
||||
return new Block[]
|
||||
{
|
||||
Blocks.sand,
|
||||
Blocks.sandstone,
|
||||
};
|
||||
}
|
||||
|
||||
public boolean LocationIsValidSpawn(World world, int x, int y, int z)
|
||||
{
|
||||
|
||||
Block checkBlock = world.getBlock(x, y - 1, z);
|
||||
Block blockAbove = world.getBlock(x, y , z);
|
||||
Block blockBelow = world.getBlock(x, y - 2, z);
|
||||
|
||||
for (Block i : GetValidSpawnBlocks())
|
||||
{
|
||||
if (blockAbove != Blocks.air)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (checkBlock == i)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (checkBlock == Blocks.snow_layer && blockBelow == i)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (checkBlock.getMaterial() == Material.plants && blockBelow == i)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean generate(World world, Random rand, int x, int y, int z)
|
||||
{
|
||||
int i = rand.nextInt(1);
|
||||
|
||||
if(i == 0)
|
||||
{
|
||||
generate_r0(world, rand, x, y, z);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public boolean generate_r0(World world, Random rand, int x, int y, int z)
|
||||
{
|
||||
int yOffset = 3 + rand.nextInt(4);
|
||||
|
||||
if(!LocationIsValidSpawn(world, x + 13, y, z + 10))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
world.setBlock(x + 13, y + 0 - yOffset, z + 2, Block1, 0, 3);
|
||||
world.setBlock(x + 12, y + 0 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 0 - yOffset, z + 7, Block1, 0, 3);
|
||||
world.setBlock(x + 13, y + 0 - yOffset, z + 9, Block1, 0, 3);
|
||||
world.setBlock(x + 12, y + 1 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 1 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 1 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 1 - yOffset, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 1 - yOffset, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 1 - yOffset, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 1 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 12, y + 1 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 1 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 1 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 1 - yOffset, z + 3, Block1, 0, 3);
|
||||
world.setBlock(x + 11, y + 1 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 12, y + 1 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 1 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 1 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 1 - yOffset, z + 4, Block1, 0, 3);
|
||||
world.setBlock(x + 11, y + 1 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 12, y + 1 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 1 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 1 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 1 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 12, y + 1 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 1 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 1 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 1 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 1 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 1 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 1 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 1 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 1 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 1 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 1 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 1 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 2 - yOffset, z + 0, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 2 - yOffset, z + 0, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 2 - yOffset, z + 0, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 2 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 2 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 2 - yOffset, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 2 - yOffset, z + 2, Blocks.stone_stairs, 2, 3);
|
||||
world.setBlock(x + 14, y + 2 - yOffset, z + 2, Blocks.stone_stairs, 2, 3);
|
||||
world.setBlock(x + 15, y + 2 - yOffset, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 2 - yOffset, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 15, y + 2 - yOffset, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 10, y + 2 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 15, y + 2 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 10, y + 2 - yOffset, z + 6, Block3, 0, 3);
|
||||
world.setBlock(x + 11, y + 2 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 2 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 10, y + 2 - yOffset, z + 7, Block3, 0, 3);
|
||||
world.setBlock(x + 11, y + 2 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 2 - yOffset, z + 7, Blocks.chest, 2, 3);
|
||||
if(world.getBlock(x + 14, y + 2 - yOffset, z + 7) == Blocks.chest)
|
||||
{
|
||||
WeightedRandomChestContent.generateChestContents(rand, ItemPool.getPool(ItemPoolsLegacy.POOL_VERTIBIRD), (TileEntityChest)world.getTileEntity(x + 14, y + 2 - yOffset, z + 7), 8);
|
||||
}
|
||||
world.setBlock(x + 15, y + 2 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 2 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 2 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 2 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 2 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 2 - yOffset, z + 9, Block3, 0, 3);
|
||||
world.setBlock(x + 14, y + 2 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 2 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 2 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 2 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 2 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 2 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 2 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 2 - yOffset, z + 18, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 3 - yOffset, z + 0, Block4, 0, 3);
|
||||
world.setBlock(x + 13, y + 3 - yOffset, z + 0, Block4, 0, 3);
|
||||
world.setBlock(x + 14, y + 3 - yOffset, z + 0, Block4, 0, 3);
|
||||
world.setBlock(x + 11, y + 3 - yOffset, z + 1, Block4, 0, 3);
|
||||
world.setBlock(x + 15, y + 3 - yOffset, z + 1, Block4, 0, 3);
|
||||
world.setBlock(x + 11, y + 3 - yOffset, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 3 - yOffset, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 3 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 3 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 3 - yOffset, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 15, y + 3 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 10, y + 3 - yOffset, z + 6, Block3, 0, 3);
|
||||
world.setBlock(x + 11, y + 3 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 3 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 10, y + 3 - yOffset, z + 7, Block3, 0, 3);
|
||||
world.setBlock(x + 11, y + 3 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 3 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 3 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 3 - yOffset, z + 8, ModBlocks.machine_battery, 2, 3);
|
||||
world.setBlock(x + 14, y + 3 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 3 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 3 - yOffset, z + 9, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 3 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 3 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 3 - yOffset, z + 10, Block3, 0, 3);
|
||||
world.setBlock(x + 14, y + 3 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 3 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 3 - yOffset, z + 11, Block3, 0, 3);
|
||||
world.setBlock(x + 14, y + 3 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 3 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 3 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 3 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 3 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 3 - yOffset, z + 18, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 4 - yOffset, z + 0, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 0, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 4 - yOffset, z + 0, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 1, Block4, 0, 3);
|
||||
world.setBlock(x + 12, y + 4 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 4 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 1, Block4, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 2, Block4, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 2, Block4, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 4 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 4 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 4 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 4 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 4 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 4 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 4 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 4 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 4 - yOffset, z + 9, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 9, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 4 - yOffset, z + 9, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 4 - yOffset, z + 10, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 10, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 4 - yOffset, z + 10, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 4 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 11, Block3, 0, 3);
|
||||
world.setBlock(x + 14, y + 4 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 4 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 4 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 12, Block3, 0, 3);
|
||||
world.setBlock(x + 14, y + 4 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 4 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 4 - yOffset, z + 13, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 13, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 4 - yOffset, z + 13, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 14, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 15, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 16, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 4 - yOffset, z + 18, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 1, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 2, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 5 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 5 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 5 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 5 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 5 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 5 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 3, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 5 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 8, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 9, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 10, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 16, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 17, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 18, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 21, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 5 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 23, y + 5 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 5 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 5 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 5 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 5 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 5 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 5 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 5 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 5 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 5 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 9, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 9, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 9, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 15, y + 5 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 5 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 10, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 10, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 10, ModBlocks.block_electrical_scrap, 0, 3);
|
||||
world.setBlock(x + 15, y + 5 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 11, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 12, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 13, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 13, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 13, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 14, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 14, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 14, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 15, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 15, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 15, Block2, 0, 3);
|
||||
world.setBlock(x + 9, y + 5 - yOffset, z + 16, Block2, 0, 3);
|
||||
world.setBlock(x + 10, y + 5 - yOffset, z + 16, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 5 - yOffset, z + 16, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 16, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 16, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 16, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 5 - yOffset, z + 16, Block2, 0, 3);
|
||||
world.setBlock(x + 16, y + 5 - yOffset, z + 16, Block2, 0, 3);
|
||||
world.setBlock(x + 17, y + 5 - yOffset, z + 16, Block2, 0, 3);
|
||||
world.setBlock(x + 8, y + 5 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 9, y + 5 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 10, y + 5 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 5 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 17, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 5 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 16, y + 5 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 17, y + 5 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 18, y + 5 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 5 - yOffset, z + 18, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 18, ModBlocks.red_wire_coated, 0, 3);
|
||||
world.setBlock(x + 14, y + 5 - yOffset, z + 18, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 5 - yOffset, z + 19, Block1, 0, 3);
|
||||
world.setBlock(x + 12, y + 6 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 1, Block1, 0, 3);
|
||||
world.setBlock(x + 12, y + 6 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 3, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 6 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 6 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 6 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 6 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 6 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 3, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 6, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 7, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 8, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 9, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 10, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 16, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 17, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 18, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 19, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 20, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 21, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 6 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 23, y + 6 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 6 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 6 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 6 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 6, Blocks.chest, 2, 3);
|
||||
if(world.getBlock(x + 13, y + 6 - yOffset, z + 6) == Blocks.chest)
|
||||
{
|
||||
WeightedRandomChestContent.generateChestContents(rand, ItemPool.getPool(ItemPoolsLegacy.POOL_VERTIBIRD), (TileEntityChest)world.getTileEntity(x + 13, y + 6 - yOffset, z + 6), 8);
|
||||
}
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 6 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 6 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 6 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 6 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 6 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 11, y + 6 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 6 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 15, y + 6 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 6 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 9, Block3, 0, 3);
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 6 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 10, Block3, 0, 3);
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 6 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 6 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 6 - yOffset, z + 12, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 13, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 14, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 17, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 6 - yOffset, z + 18, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 7 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 7 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 7 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 3, y + 7 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 7 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 7 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 7 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 7 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 21, y + 7 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 7 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 23, y + 7 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 7 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 7 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 7 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 7 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 7 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 7 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 7 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 7 - yOffset, z + 7, Block2, 0, 3);
|
||||
world.setBlock(x + 12, y + 7 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 7 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 14, y + 7 - yOffset, z + 8, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 7 - yOffset, z + 9, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 7 - yOffset, z + 10, Block2, 0, 3);
|
||||
world.setBlock(x + 13, y + 7 - yOffset, z + 11, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 8 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 8 - yOffset, z + 4, Block2, 0, 3);
|
||||
world.setBlock(x + 3, y + 8 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 8 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 8 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 21, y + 8 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 8 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 23, y + 8 - yOffset, z + 5, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 8 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 22, y + 8 - yOffset, z + 6, Block2, 0, 3);
|
||||
world.setBlock(x + 4, y + 9 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 22, y + 9 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 22, y + 10 - yOffset, z + 1, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 22, y + 10 - yOffset, z + 2, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 22, y + 10 - yOffset, z + 3, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 22, y + 10 - yOffset, z + 4, Block3, 0, 3);
|
||||
world.setBlock(x + 0, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 1, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 2, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 3, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 5, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 6, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 7, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 8, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 18, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 19, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 20, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 21, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 22, y + 10 - yOffset, z + 5, Block1, 0, 3);
|
||||
world.setBlock(x + 23, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 24, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 25, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 26, y + 10 - yOffset, z + 5, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 6, Block3, 0, 3);
|
||||
world.setBlock(x + 22, y + 10 - yOffset, z + 6, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 7, Block3, 0, 3);
|
||||
world.setBlock(x + 22, y + 10 - yOffset, z + 7, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 8, Block3, 0, 3);
|
||||
world.setBlock(x + 22, y + 10 - yOffset, z + 8, Block3, 0, 3);
|
||||
world.setBlock(x + 4, y + 10 - yOffset, z + 9, Block3, 0, 3);
|
||||
world.setBlock(x + 22, y + 10 - yOffset, z + 9, Block3, 0, 3);
|
||||
|
||||
generate_r02_last(world, rand, x, y, z, yOffset);
|
||||
return true;
|
||||
|
||||
}
|
||||
public boolean generate_r02_last(World world, Random rand, int x, int y, int z, int yOffset)
|
||||
{
|
||||
|
||||
world.setBlock(x + 12, y + 2 - yOffset, z + 1, Blocks.lever, 3, 3);
|
||||
world.setBlock(x + 14, y + 2 - yOffset, z + 1, Blocks.lever, 3, 3);
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] Successfully spawned Vertibird at " + x + " " + y +" " + z + "\n");
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -49,6 +49,18 @@ public class NTMWorldGenerator implements IWorldGenerator {
|
||||
spawnWeight = 1;
|
||||
}});
|
||||
|
||||
NBTStructure.registerStructure(0, new SpawnCondition() {{
|
||||
canSpawn = biome -> !biome.canSpawnLightningBolt() && biome.temperature >= 2F;
|
||||
structure = new JigsawPiece("vertibird", StructureManager.vertibird);
|
||||
spawnWeight = 3;
|
||||
}});
|
||||
|
||||
NBTStructure.registerStructure(0, new SpawnCondition() {{
|
||||
canSpawn = biome -> !biome.canSpawnLightningBolt() && biome.temperature >= 2F;
|
||||
structure = new JigsawPiece("crashed_vertibird", StructureManager.crashed_vertibird);
|
||||
spawnWeight = 3;
|
||||
}});
|
||||
|
||||
Map<Block, BlockSelector> bricks = new HashMap<Block, BlockSelector>() {{
|
||||
put(ModBlocks.meteor_brick, new MeteorBricks());
|
||||
}};
|
||||
|
||||
@ -2,24 +2,12 @@ package com.hbm.world.generator;
|
||||
|
||||
import com.hbm.world.generator.room.*;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class CellularDungeonFactory {
|
||||
|
||||
public static CellularDungeon meteor;
|
||||
public static CellularDungeon jungle;
|
||||
|
||||
|
||||
public static void init() {
|
||||
|
||||
meteor = new TestDungeon(11, 7, 11, 11, 150, 3);
|
||||
meteor.rooms.add(new TestDungeonRoom1(meteor));
|
||||
meteor.rooms.add(new TestDungeonRoom2(meteor));
|
||||
meteor.rooms.add(new TestDungeonRoom3(meteor));
|
||||
meteor.rooms.add(new TestDungeonRoom4(meteor, new TestDungeonRoom5(meteor), ForgeDirection.NORTH));
|
||||
meteor.rooms.add(new TestDungeonRoom6(meteor));
|
||||
meteor.rooms.add(new TestDungeonRoom7(meteor));
|
||||
meteor.rooms.add(new TestDungeonRoom8(meteor));
|
||||
|
||||
|
||||
jungle = new JungleDungeon(5, 5, 25, 25, 700, 6);
|
||||
for(int i = 0; i < 10; i++) jungle.rooms.add(new JungleDungeonRoom(jungle));
|
||||
jungle.rooms.add(new JungleDungeonRoomArrow(jungle));
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
package com.hbm.world.generator;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.RecipesCommon.MetaBlock;
|
||||
|
||||
public class TestDungeon extends CellularDungeon {
|
||||
|
||||
public TestDungeon(int width, int height, int dimX, int dimZ, int tries, int branches) {
|
||||
super(width, height, dimX, dimZ, tries, branches);
|
||||
|
||||
this.floor.add(new MetaBlock(ModBlocks.meteor_polished));
|
||||
this.wall.add(new MetaBlock(ModBlocks.meteor_brick));
|
||||
this.wall.add(new MetaBlock(ModBlocks.meteor_brick));
|
||||
this.wall.add(new MetaBlock(ModBlocks.meteor_brick_mossy));
|
||||
this.wall.add(new MetaBlock(ModBlocks.meteor_brick_cracked));
|
||||
this.ceiling.add(new MetaBlock(ModBlocks.block_meteor_broken));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
package com.hbm.world.generator.room;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.world.generator.CellularDungeon;
|
||||
import com.hbm.world.generator.CellularDungeonRoom;
|
||||
import com.hbm.world.generator.DungeonToolbox;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TestDungeonRoom1 extends CellularDungeonRoom {
|
||||
|
||||
public TestDungeonRoom1(CellularDungeon parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
public void generateMain(World world, int x, int y, int z) {
|
||||
|
||||
super.generateMain(world, x, y, z);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 - 3, y + 1, z + parent.width / 2 - 3, 1, parent.height - 2, 1, ModBlocks.meteor_pillar);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 + 3, y + 1, z + parent.width / 2 - 3, 1, parent.height - 2, 1, ModBlocks.meteor_pillar);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 + 3, y + 1, z + parent.width / 2 + 3, 1, parent.height - 2, 1, ModBlocks.meteor_pillar);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 - 3, y + 1, z + parent.width / 2 + 3, 1, parent.height - 2, 1, ModBlocks.meteor_pillar);
|
||||
world.setBlock(x + parent.width / 2 - 3, y + 3, z + parent.width / 2 - 3, ModBlocks.meteor_brick_chiseled, 0, 2);
|
||||
world.setBlock(x + parent.width / 2 + 3, y + 3, z + parent.width / 2 - 3, ModBlocks.meteor_brick_chiseled, 0, 2);
|
||||
world.setBlock(x + parent.width / 2 + 3, y + 3, z + parent.width / 2 + 3, ModBlocks.meteor_brick_chiseled, 0, 2);
|
||||
world.setBlock(x + parent.width / 2 - 3, y + 3, z + parent.width / 2 + 3, ModBlocks.meteor_brick_chiseled, 0, 2);
|
||||
world.setBlock(x + parent.width / 2, y + 1, z + parent.width / 2, ModBlocks.meteor_pillar, 0, 2);
|
||||
world.setBlock(x + parent.width / 2, y + 2, z + parent.width / 2, Blocks.glowstone, 0, 3);
|
||||
|
||||
/*world.setBlock(x + parent.width / 2, y, z + parent.width / 2, Blocks.mob_spawner, 0, 2);
|
||||
TileEntityMobSpawner tileentitymobspawner2 = (TileEntityMobSpawner)world.getTileEntity(x + parent.width / 2, y, z + parent.width / 2);
|
||||
|
||||
if (tileentitymobspawner2 != null)
|
||||
{
|
||||
tileentitymobspawner2.func_145881_a().setEntityName("entity_cyber_crab");
|
||||
}*/
|
||||
}
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
package com.hbm.world.generator.room;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.world.generator.CellularDungeon;
|
||||
import com.hbm.world.generator.CellularDungeonRoom;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TestDungeonRoom2 extends CellularDungeonRoom {
|
||||
|
||||
public TestDungeonRoom2(CellularDungeon parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
public void generateMain(World world, int x, int y, int z) {
|
||||
|
||||
super.generateMain(world, x, y, z);
|
||||
|
||||
int j = world.rand.nextInt(2) + 2;
|
||||
int k = world.rand.nextInt(3) + 2;
|
||||
|
||||
for(int i = 0; i < j; i++) {
|
||||
int dx = world.rand.nextInt(parent.width - 6) + 3;
|
||||
int dz = world.rand.nextInt(parent.width - 6) + 3;
|
||||
world.setBlock(x + dx, y + 1, z + dz, ModBlocks.crate_ammo, 0, 2);
|
||||
}
|
||||
|
||||
for(int i = 0; i < k; i++) {
|
||||
int dx = world.rand.nextInt(parent.width - 6) + 3;
|
||||
int dz = world.rand.nextInt(parent.width - 6) + 3;
|
||||
world.setBlock(x + dx, y + 1, z + dz, ModBlocks.crate_can, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
package com.hbm.world.generator.room;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.world.generator.CellularDungeon;
|
||||
import com.hbm.world.generator.CellularDungeonRoom;
|
||||
import com.hbm.world.generator.DungeonToolbox;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntityMobSpawner;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TestDungeonRoom3 extends CellularDungeonRoom {
|
||||
|
||||
public TestDungeonRoom3(CellularDungeon parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
public void generateMain(World world, int x, int y, int z) {
|
||||
|
||||
super.generateMain(world, x, y, z);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 - 2, y + 1, z + parent.width / 2 - 2, 5, 4, 5, ModBlocks.deco_lead);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 - 1, y + 1, z + parent.width / 2 - 1, 3, 3, 3, ModBlocks.toxic_block);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 - 1, y + 4, z + parent.width / 2 - 1, 3, 1, 3, Blocks.air);
|
||||
|
||||
world.setBlock(x + parent.width / 2, y + 1, z + parent.width / 2, Blocks.mob_spawner, 0, 2);
|
||||
TileEntityMobSpawner tileentitymobspawner2 = (TileEntityMobSpawner)world.getTileEntity(x + parent.width / 2, y + 1, z + parent.width / 2);
|
||||
|
||||
if (tileentitymobspawner2 != null)
|
||||
{
|
||||
tileentitymobspawner2.func_145881_a().setEntityName("entity_cyber_crab");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,43 +0,0 @@
|
||||
package com.hbm.world.generator.room;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.RecipesCommon.MetaBlock;
|
||||
import com.hbm.world.generator.CellularDungeon;
|
||||
import com.hbm.world.generator.CellularDungeonRoom;
|
||||
import com.hbm.world.generator.DungeonToolbox;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TestDungeonRoom4 extends CellularDungeonRoom {
|
||||
|
||||
public TestDungeonRoom4(CellularDungeon parent, CellularDungeonRoom daisyChain, ForgeDirection dir) {
|
||||
super(parent);
|
||||
this.daisyChain = daisyChain;
|
||||
this.daisyDirection = dir;
|
||||
}
|
||||
|
||||
public void generateMain(World world, int x, int y, int z) {
|
||||
|
||||
super.generateMain(world, x, y, z);
|
||||
DungeonToolbox.generateBox(world, x, y + parent.height - 2, z, parent.width, 1, parent.width, new ArrayList() {{ add(new MetaBlock(Blocks.air)); add(new MetaBlock(Blocks.web)); }});
|
||||
|
||||
DungeonToolbox.generateBox(world, x + 1, y, z + 1, parent.width - 2, 1, parent.width - 2, new ArrayList() {{
|
||||
add(new MetaBlock(ModBlocks.meteor_polished));
|
||||
add(new MetaBlock(ModBlocks.meteor_polished));
|
||||
add(new MetaBlock(ModBlocks.meteor_polished));
|
||||
add(new MetaBlock(ModBlocks.meteor_polished));
|
||||
add(new MetaBlock(ModBlocks.meteor_polished));
|
||||
add(new MetaBlock(ModBlocks.meteor_spawner));
|
||||
}});
|
||||
}
|
||||
|
||||
public void generateWall(World world, int x, int y, int z, ForgeDirection wall, boolean door) {
|
||||
|
||||
if(wall != ForgeDirection.NORTH)
|
||||
super.generateWall(world, x, y, z, wall, door);
|
||||
}
|
||||
}
|
||||
@ -1,40 +0,0 @@
|
||||
package com.hbm.world.generator.room;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.RecipesCommon.MetaBlock;
|
||||
import com.hbm.world.generator.CellularDungeon;
|
||||
import com.hbm.world.generator.CellularDungeonRoom;
|
||||
import com.hbm.world.generator.DungeonToolbox;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TestDungeonRoom5 extends CellularDungeonRoom {
|
||||
|
||||
public TestDungeonRoom5(CellularDungeon parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
public void generateMain(World world, int x, int y, int z) {
|
||||
|
||||
super.generateMain(world, x, y, z);
|
||||
DungeonToolbox.generateBox(world, x, y + parent.height - 2, z, parent.width, 1, parent.width, new ArrayList() {{ add(new MetaBlock(Blocks.air)); add(new MetaBlock(Blocks.web)); }});
|
||||
|
||||
DungeonToolbox.generateBox(world, x + 1, y, z + 1, parent.width - 2, 1, parent.width - 2, new ArrayList() {{
|
||||
add(new MetaBlock(ModBlocks.meteor_polished));
|
||||
add(new MetaBlock(ModBlocks.meteor_polished));
|
||||
add(new MetaBlock(ModBlocks.meteor_polished));
|
||||
add(new MetaBlock(ModBlocks.meteor_polished));
|
||||
add(new MetaBlock(ModBlocks.meteor_polished));
|
||||
add(new MetaBlock(ModBlocks.meteor_spawner)); }});
|
||||
}
|
||||
|
||||
public void generateWall(World world, int x, int y, int z, ForgeDirection wall, boolean door) {
|
||||
|
||||
if(wall != ForgeDirection.SOUTH)
|
||||
super.generateWall(world, x, y, z, wall, door);
|
||||
}
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
package com.hbm.world.generator.room;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.world.generator.CellularDungeon;
|
||||
import com.hbm.world.generator.CellularDungeonRoom;
|
||||
import com.hbm.world.generator.DungeonToolbox;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TestDungeonRoom6 extends CellularDungeonRoom {
|
||||
|
||||
public TestDungeonRoom6(CellularDungeon parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
public void generateMain(World world, int x, int y, int z) {
|
||||
|
||||
super.generateMain(world, x, y, z);
|
||||
DungeonToolbox.generateBox(world, x + 1, y, z + 1, parent.width - 2, 1, parent.width - 2, ModBlocks.toxic_block);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 - 1, y, z + parent.width / 2 - 1, 3, 1, 3, ModBlocks.meteor_brick_chiseled);
|
||||
world.setBlock(x + parent.width / 2, y, z + parent.width / 2, ModBlocks.meteor_polished);
|
||||
|
||||
world.setBlock(x + 1, y, z + parent.width / 2, ModBlocks.meteor_polished);
|
||||
world.setBlock(x + parent.width / 2, y, z + 1, ModBlocks.meteor_polished);
|
||||
|
||||
world.setBlock(x + parent.width - 2, y, z + parent.width / 2, ModBlocks.meteor_polished);
|
||||
world.setBlock(x + parent.width / 2, y, z + parent.width - 2, ModBlocks.meteor_polished);
|
||||
}
|
||||
|
||||
public void generateWall(World world, int x, int y, int z, ForgeDirection wall, boolean door) {
|
||||
|
||||
super.generateWall(world, x, y, z, wall, door);
|
||||
|
||||
if(!door)
|
||||
return;
|
||||
|
||||
if(wall == ForgeDirection.NORTH) {
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2, y, z + 1, 1, 1, parent.width / 2 - 2, ModBlocks.meteor_polished);
|
||||
}
|
||||
|
||||
if(wall == ForgeDirection.SOUTH) {
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2, y, z + parent.width / 2 + 2, 1, 1, parent.width / 2 - 2, ModBlocks.meteor_polished);
|
||||
}
|
||||
|
||||
if(wall == ForgeDirection.WEST) {
|
||||
DungeonToolbox.generateBox(world, x + 1, y, z + parent.width / 2, parent.width / 2 - 2, 1, 1, ModBlocks.meteor_polished);
|
||||
}
|
||||
|
||||
if(wall == ForgeDirection.EAST) {
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 + 2, y, z + parent.width / 2, parent.width / 2 - 2, 1, 1, ModBlocks.meteor_polished);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package com.hbm.world.generator.room;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.world.generator.CellularDungeon;
|
||||
import com.hbm.world.generator.CellularDungeonRoom;
|
||||
import com.hbm.world.generator.DungeonToolbox;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TestDungeonRoom7 extends CellularDungeonRoom {
|
||||
|
||||
public TestDungeonRoom7(CellularDungeon parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
public void generateMain(World world, int x, int y, int z) {
|
||||
|
||||
super.generateMain(world, x, y, z);
|
||||
|
||||
DungeonToolbox.generateBox(world, x, y, z, parent.width, 1, parent.width, ModBlocks.meteor_polished);
|
||||
DungeonToolbox.generateBox(world, x + 2, y, z + 2, parent.width - 4, 1, parent.width - 4, ModBlocks.deco_red_copper);
|
||||
DungeonToolbox.generateBox(world, x + 3, y, z + 3, parent.width - 6, 1, parent.width - 6, ModBlocks.meteor_polished);
|
||||
DungeonToolbox.generateBox(world, x + 4, y, z + 4, parent.width - 8, 1, parent.width - 8, ModBlocks.deco_red_copper);
|
||||
|
||||
world.setBlock(x + parent.width / 2, y, z + parent.width / 2, ModBlocks.meteor_battery);
|
||||
world.setBlock(x + parent.width / 2, y + 1, z + parent.width / 2, ModBlocks.tesla);
|
||||
}
|
||||
}
|
||||
@ -1,225 +0,0 @@
|
||||
package com.hbm.world.generator.room;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.crafting.handlers.MKUCraftingHandler;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemBookLore;
|
||||
import com.hbm.tileentity.machine.storage.TileEntitySafe;
|
||||
import com.hbm.world.generator.CellularDungeon;
|
||||
import com.hbm.world.generator.CellularDungeonRoom;
|
||||
import com.hbm.world.generator.DungeonToolbox;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TestDungeonRoom8 extends CellularDungeonRoom {
|
||||
|
||||
public TestDungeonRoom8(CellularDungeon parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
public void generateMain(World world, int x, int y, int z) {
|
||||
|
||||
super.generateMain(world, x, y, z);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 - 3, y + 1, z + parent.width / 2 - 3, 1, parent.height - 2, 1, ModBlocks.meteor_pillar);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 + 3, y + 1, z + parent.width / 2 - 3, 1, parent.height - 2, 1, ModBlocks.meteor_pillar);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 + 3, y + 1, z + parent.width / 2 + 3, 1, parent.height - 2, 1, ModBlocks.meteor_pillar);
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 - 3, y + 1, z + parent.width / 2 + 3, 1, parent.height - 2, 1, ModBlocks.meteor_pillar);
|
||||
world.setBlock(x + parent.width / 2 - 3, y + 3, z + parent.width / 2 - 3, ModBlocks.meteor_brick_chiseled, 0, 2);
|
||||
world.setBlock(x + parent.width / 2 + 3, y + 3, z + parent.width / 2 - 3, ModBlocks.meteor_brick_chiseled, 0, 2);
|
||||
world.setBlock(x + parent.width / 2 + 3, y + 3, z + parent.width / 2 + 3, ModBlocks.meteor_brick_chiseled, 0, 2);
|
||||
world.setBlock(x + parent.width / 2 - 3, y + 3, z + parent.width / 2 + 3, ModBlocks.meteor_brick_chiseled, 0, 2);
|
||||
|
||||
DungeonToolbox.generateBox(world, x + 4, y + 1, z + 4, parent.width - 8, 1, parent.width - 8, ModBlocks.meteor_polished);
|
||||
|
||||
int i = world.rand.nextInt(8);
|
||||
|
||||
switch(i) {
|
||||
case 0: world.setBlock(x + parent.width / 2, y + 2, z + parent.width / 2, ModBlocks.meteor_brick_chiseled, 0, 3); break;
|
||||
case 1: world.setBlock(x + parent.width / 2, y + 2, z + parent.width / 2, ModBlocks.ntm_dirt, 0, 3); break;
|
||||
case 2: world.setBlock(x + parent.width / 2, y + 2, z + parent.width / 2, ModBlocks.block_starmetal, 0, 3); break;
|
||||
case 3: world.setBlock(x + parent.width / 2, y + 2, z + parent.width / 2, ModBlocks.statue_elb_f, 0, 3); break;
|
||||
case 4: world.setBlock(x + parent.width / 2, y + 2, z + parent.width / 2, ModBlocks.crate_red, 0, 3); break;
|
||||
case 5: world.setBlock(x + parent.width / 2, y + 2, z + parent.width / 2, ModBlocks.balefire, 0, 3); break;
|
||||
case 6: world.setBlock(x + parent.width / 2, y + 2, z + parent.width / 2, ModBlocks.block_meteor, 0, 3); break;
|
||||
case 7:
|
||||
world.setBlock(x + parent.width / 2, y + 2, z + parent.width / 2, ModBlocks.safe, 0, 3);
|
||||
if(world.getTileEntity(x + parent.width / 2, y + 2, z + parent.width / 2) instanceof TileEntitySafe) {
|
||||
|
||||
int r = world.rand.nextInt(10);
|
||||
|
||||
if(r == 0) {
|
||||
((TileEntitySafe)world.getTileEntity(x + parent.width / 2, y + 2, z + parent.width / 2)).setInventorySlotContents(7, new ItemStack(ModItems.book_of_));
|
||||
} else if(r < 4) {
|
||||
TileEntitySafe safe = (TileEntitySafe) world.getTileEntity(x + parent.width / 2, y + 2, z + parent.width / 2);
|
||||
safe.setInventorySlotContents(5, generateBook(world));
|
||||
safe.setInventorySlotContents(7, new ItemStack(ModItems.stamp_book, 1, world.rand.nextInt(8)));
|
||||
safe.setInventorySlotContents(9, new ItemStack(ModItems.stamp_book, 1, world.rand.nextInt(8)));
|
||||
} else {
|
||||
TileEntitySafe safe = (TileEntitySafe) world.getTileEntity(x + parent.width / 2, y + 2, z + parent.width / 2);
|
||||
safe.setInventorySlotContents(5, new ItemStack(Items.book));
|
||||
safe.setInventorySlotContents(7, new ItemStack(ModItems.stamp_book, 1, world.rand.nextInt(8)));
|
||||
safe.setInventorySlotContents(9, new ItemStack(ModItems.stamp_book, 1, world.rand.nextInt(8)));
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static ItemStack generateBook(World world) {
|
||||
MKUCraftingHandler.generateRecipe(world);
|
||||
ItemStack[] recipe = MKUCraftingHandler.MKURecipe;
|
||||
|
||||
if(recipe == null) return new ItemStack(ModItems.flame_pony);
|
||||
|
||||
String key;
|
||||
int pages;
|
||||
Item item;
|
||||
switch(world.rand.nextInt(6)) {
|
||||
case 0:
|
||||
key = "book_iodine"; pages = 3;
|
||||
item = ModItems.powder_iodine; break;
|
||||
case 1:
|
||||
key = "book_phosphorous"; pages = 2;
|
||||
item = ModItems.powder_fire; break;
|
||||
case 2:
|
||||
key = "book_dust"; pages = 3;
|
||||
item = ModItems.dust; break;
|
||||
case 3:
|
||||
key = "book_mercury"; pages = 2;
|
||||
item = ModItems.ingot_mercury; break;
|
||||
case 4:
|
||||
key = "book_flower"; pages = 2;
|
||||
item = ModItems.morning_glory; break;
|
||||
case 5:
|
||||
key = "book_syringe"; pages = 2;
|
||||
item = ModItems.syringe_metal_empty; break;
|
||||
default:
|
||||
return new ItemStack(ModItems.flame_pony);
|
||||
}
|
||||
|
||||
int s = 1;
|
||||
for(int i = 0; i < 9; i++) {
|
||||
if(recipe[i] != null && recipe[i].getItem() == item) {
|
||||
s = i + 1; break;
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack book = ItemBookLore.createBook(key, pages, 0x271E44, 0xFBFFF4);
|
||||
ItemBookLore.addArgs(book, pages - 1, String.valueOf(s));
|
||||
|
||||
return book;
|
||||
}
|
||||
|
||||
/*public static ItemStack genetateMKU(World world) {
|
||||
|
||||
ItemStack book = new ItemStack(Items.written_book);
|
||||
book.stackTagCompound = new NBTTagCompound();
|
||||
book.stackTagCompound.setString("author", "Dave");
|
||||
book.stackTagCompound.setString("title", "Note");
|
||||
NBTTagList nbt = new NBTTagList();
|
||||
|
||||
String[] pages = generatePages(world);
|
||||
|
||||
for(String s : pages) {
|
||||
nbt.appendTag(new NBTTagString(s));
|
||||
}
|
||||
|
||||
book.stackTagCompound.setTag("pages", nbt);
|
||||
|
||||
return book;
|
||||
}
|
||||
|
||||
private static String[] bookIodine = new String[] {
|
||||
"alright you will not believe this, but old man weathervane finally managed to show up again since he left two weeks ago",
|
||||
"and what's more surprising is the fact that he actually decided to spill the beans on what they were doing in the canyon:",
|
||||
"apparently the morons form R&D discovered a compound that is mostly inorganic, pretty much like a toxin in nature, but get",
|
||||
"this: the dying cells will reproduce said toxin and excete it through the skin, creating an aerosol that is highly contageous.",
|
||||
"it's just like a virus, but not a virus. the composition is weird, you can mix it in any household bottle but you do have to",
|
||||
"get the order right. the doc told me that the first ingredient which is just powdered iodine crystals goes into slot #"
|
||||
};
|
||||
private static String[] bookPhosphorous = new String[] {
|
||||
"heyo, it's me again. i assume you got my last memo, the doc wasn't too happy about it. i'll have to do this quick, the",
|
||||
"dunderheads from R&D are currently moaning again, probably over money. again. anyway, doc weathervane found that the second",
|
||||
"ingredient is red phosphorous, whihc has to be mixed into slot #"
|
||||
};
|
||||
private static String[] bookDust = new String[] {
|
||||
"the doc was furious when he found out that the R&D dorks kept the one remaining sample, ranting about gross negligence this",
|
||||
"and a doomsday scenario that. i told him to chill for a minute, getting all worked up isn't good for his blood pressure, not",
|
||||
"that he has much blood left to begin with. one of the R&D morons slipped some more info into last week's circular, they call their",
|
||||
"little concoction \"MKU\" whatever that means, and that it contains actual household lint. can you believe that? one of the most",
|
||||
"dangerous inventions of theirs and it contains dust. strangely they also mentioned that it goes into slot #"
|
||||
};
|
||||
private static String[] bookMercury = new String[] {
|
||||
"well that settles that. not counting the vomitting blood part, the toxicological report mostly resembles that of mercury",
|
||||
"poisoning. why? because our little mix also contains mercury! i just wonder where all that stuff comes from when being",
|
||||
"replicated by the body? whatever, the mercury goes into slot #"
|
||||
};
|
||||
private static String[] bookFlower = new String[] {
|
||||
"remember when i mentioned in my first memo that the compound is mostly anorganic? well guess what, the old man shared the fourth",
|
||||
"ingredient: ipomoea nil, a genus of flower. morning glory! it might be due to its low sulfur content, whatever might be the case,",
|
||||
"it does not work with other flowers. the morning glory goes into slot #"
|
||||
};
|
||||
private static String[] bookSyringe = new String[] {
|
||||
"a little addendum to my fifth message, obviously you have to store this MKU stuff in a container. the R&D nuts used regular",
|
||||
"metal syringes that they got from medical. surplus ware i presume, they got thousands of needles just lying around. the metal",
|
||||
"syringe goes into slot #"
|
||||
};
|
||||
|
||||
public static String[] generatePages(World world) {
|
||||
|
||||
String[] orig;
|
||||
Item ingred;
|
||||
int r = world.rand.nextInt(6);
|
||||
|
||||
if(r == 0) {
|
||||
orig = bookIodine;
|
||||
ingred = ModItems.powder_iodine;
|
||||
} else if(r == 1) {
|
||||
orig = bookPhosphorous;
|
||||
ingred = ModItems.powder_fire;
|
||||
} else if(r == 2) {
|
||||
orig = bookDust;
|
||||
ingred = ModItems.dust;
|
||||
} else if(r == 3) {
|
||||
orig = bookMercury;
|
||||
ingred = ModItems.ingot_mercury;
|
||||
} else if(r == 4) {
|
||||
orig = bookFlower;
|
||||
ingred = ModItems.morning_glory;
|
||||
} else {
|
||||
orig = bookSyringe;
|
||||
ingred = ModItems.syringe_metal_empty;
|
||||
}
|
||||
|
||||
String[] copy = new String[orig.length];
|
||||
|
||||
for(int i = 0; i < orig.length; i++) {
|
||||
copy[i] = orig[i] + ""; //Strings are reference types and i'm really not counting on my luck here
|
||||
}
|
||||
|
||||
copy[copy.length - 1] += getSlot(world, ingred);
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
public static int getSlot(World world, Item item) {
|
||||
|
||||
MKUCraftingHandler.generateRecipe(world);
|
||||
ItemStack[] recipe = MKUCraftingHandler.MKURecipe;
|
||||
|
||||
if(recipe == null) //take no chances
|
||||
return -2;
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
|
||||
if(recipe[i] != null && recipe[i].getItem() == item) {
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}*/
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user