fixed readme, improved dungeons, new meteor blocks

This commit is contained in:
HbmMods 2020-04-23 21:13:58 +02:00
parent 76a37355c5
commit 7bc36917f1
21 changed files with 271 additions and 12 deletions

View File

@ -18,7 +18,8 @@ compile files('lib/NotEnoughItems-1.7.10-1.0.3.74-dev.jar')
7. Open up the CMD in the main directory and run `gradlew build` on windows or `./gradlew build` on linux
8. Head to `build/libs` and get the jar
9. Open the jar with an archieve manager of your choice and insert the mod's asset folder into the jar's main directory
10. The jar is now done, ready for use!
10. Due to a *tiny* fuckup on my side (i.e. only using the `/main/java` folder in this repository and omitting `/main/resources`) the code in this repo does not include a `mcmod.info` file *which is mandatory, not including it will cause funny things to happen.* In order to fix this, either insert the file from one of my releases into your jar or write your own file, the most important part is including the `modid` kay-value pair (or at least from what i can tell).
11. The jar is now done, ready for use!
If you want to do some changes in the code yourself, start here after 6. and continue with 7. once you are done:
1) Get the IDE of your choice and prepare the workspace (for eclipse, it's `gradlew eclipse` or `./gradlew eclipse`, then use the eclipse folder as workspace directory in eclipse)

View File

@ -2048,6 +2048,8 @@ tile.meteor_brick_mossy.name=Bemooster Meteoritenziegel
tile.meteor_brick_cracked.name=Rissiger Meteoritenziegel
tile.meteor_brick_chiseled.name=Gemeißelter Meteoritenziegel
tile.meteor_pillar.name=Meteoritensäule
tile.meteor_spawner.name=Cyber-Krabben-Konstukteur
tile.meteor_battery.name=Stermenmetall-Elektrostatikgenerator
item.cape_radiation.name=Cape (Radioaktiv)
item.cape_gasmask.name=Cape (Gasmaske)

View File

@ -2048,6 +2048,8 @@ tile.meteor_brick_mossy.name=Mossy Meteor Brick
tile.meteor_brick_cracked.name=Cracked Meteor Brick
tile.meteor_brick_chiseled.name=Chiseled Meteor Brick
tile.meteor_pillar.name=Meteor Pillar
tile.meteor_spawner.name=Cyber Crab Assembler
tile.meteor_battery.name=Starmetal Static Electricity Generator
item.cape_radiation.name=Cape (Radiation)
item.cape_gasmask.name=Cape (Gas Mask)

Binary file not shown.

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

View File

@ -173,6 +173,8 @@ public class ModBlocks {
public static Block meteor_brick_cracked;
public static Block meteor_brick_chiseled;
public static Block meteor_pillar;
public static Block meteor_spawner;
public static Block meteor_battery;
public static Block tape_recorder;
public static Block steel_poles;
@ -883,6 +885,8 @@ public class ModBlocks {
meteor_brick_cracked = new BlockGeneric(Material.rock).setBlockName("meteor_brick_cracked").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setBlockTextureName(RefStrings.MODID + ":meteor_brick_cracked");
meteor_brick_chiseled = new BlockGeneric(Material.rock).setBlockName("meteor_brick_chiseled").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setBlockTextureName(RefStrings.MODID + ":meteor_brick_chiseled");
meteor_pillar = new BlockGenericPillar(Material.rock).setBlockName("meteor_pillar").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F);
meteor_spawner = new BlockCybercrab(Material.rock).setBlockName("meteor_spawner").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F);
meteor_battery = new BlockReactor(Material.rock).setBlockName("meteor_battery").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F);
tape_recorder = new DecoTapeRecorder(Material.rock).setBlockName("tape_recorder").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_tape_recorder");
steel_poles = new DecoSteelPoles(Material.rock).setBlockName("steel_poles").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_beam");
@ -1477,6 +1481,8 @@ public class ModBlocks {
GameRegistry.registerBlock(meteor_brick_cracked, meteor_brick_cracked.getUnlocalizedName());
GameRegistry.registerBlock(meteor_brick_chiseled, meteor_brick_chiseled.getUnlocalizedName());
GameRegistry.registerBlock(meteor_pillar, meteor_pillar.getUnlocalizedName());
GameRegistry.registerBlock(meteor_spawner, meteor_spawner.getUnlocalizedName());
GameRegistry.registerBlock(meteor_battery, ItemBlockLore.class, meteor_battery.getUnlocalizedName());
GameRegistry.registerBlock(tape_recorder, tape_recorder.getUnlocalizedName());
GameRegistry.registerBlock(steel_poles, steel_poles.getUnlocalizedName());
GameRegistry.registerBlock(pole_top, pole_top.getUnlocalizedName());

View File

@ -0,0 +1,52 @@
package com.hbm.blocks.machine;
import java.util.Random;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityCyberCrab;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class BlockCybercrab extends BlockContainer {
@SideOnly(Side.CLIENT)
private IIcon iconTop;
@SideOnly(Side.CLIENT)
private IIcon iconBottom;
public BlockCybercrab(Material mat) {
super(mat);
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":meteor_spawner_top");
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":meteor_polished");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":meteor_spawner_side");
}
@Override
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
return new TileEntityCyberCrab();
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metadata) {
return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon);
}
@Override
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
return null;
}
}

View File

@ -105,6 +105,11 @@ public class BlockReactor extends Block {
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":block_fiberglass_top");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_fiberglass_side");
}
if(this == ModBlocks.meteor_battery)
{
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":meteor_power");
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":meteor_spawner_side");
}
}
@Override

View File

@ -46,6 +46,10 @@ public class ItemBlockLore extends ItemBlock {
list.add("Can store corrosive fluids");
list.add("Can store antimatter");
}
if(this.field_150939_a == ModBlocks.meteor_battery) {
list.add("Provides infinite charge to tesla coils");
}
}
}

View File

@ -38,7 +38,6 @@ import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
@ -1300,16 +1299,9 @@ public class Library {
public static boolean isObstructed(World world, double x, double y, double z, double a, double b, double c) {
Vec3 vector = Vec3.createVectorHelper(a - x, b - y, c - z);
double length = vector.lengthVector();
Vec3 nVec = vector.normalize();
MovingObjectPosition pos = world.rayTraceBlocks(Vec3.createVectorHelper(x, y, z), Vec3.createVectorHelper(a, b, c));
for(float i = 0; i < length; i += 0.25F)
if(world.getBlock((int) Math.round(x + (nVec.xCoord * i)), (int) Math.round(y + (nVec.yCoord * i)), (int) Math.round(z + (nVec.zCoord * i))) != Blocks.air &&
world.getBlock((int) Math.round(x + (nVec.xCoord * i)), (int) Math.round(y + (nVec.yCoord * i)), (int) Math.round(z + (nVec.zCoord * i))).isNormalCube())
return true;
return false;
return pos != null;
}
public static int getFirstNullIndex(int start, Object[] array) {

View File

@ -738,6 +738,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModBlocks.meteor_brick, 4), new Object[] { "CC", "CC", 'C', ModBlocks.meteor_polished });
GameRegistry.addRecipe(new ItemStack(ModBlocks.meteor_brick_mossy, 8), new Object[] { "CCC", "CVC", "CCC", 'C', ModBlocks.meteor_brick, 'V', Blocks.vine });
GameRegistry.addRecipe(new ItemStack(ModBlocks.meteor_brick_cracked, 6), new Object[] { " C " , "C C", " C ", 'C', ModBlocks.meteor_brick });
GameRegistry.addRecipe(new ItemStack(ModBlocks.meteor_battery, 1), new Object[] { "MSM", "MWM", "MSM", 'M', ModBlocks.meteor_polished, 'S', ModBlocks.block_starmetal, 'W', ModItems.wire_schrabidium });
//GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.cmb_brick), 4), new Object[] { "PPP", "PIP", "PPP", 'P', ModItems.plate_combine_steel, 'I', ModItems.ingot_combine_steel });
//GameRegistry.addRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.cmb_brick_reinforced), 8), new Object[] { "TBT", "BCB", "TBT", 'T', ModBlocks.block_magnetized_tungsten, 'B', ModBlocks.brick_concrete, 'C', ModBlocks.cmb_brick });
@ -922,7 +923,7 @@ public class CraftingManager {
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_44_star, 4), new Object[] { " B ", "BAB", " B ", 'B', ModItems.ammo_44_du, 'A', ModItems.ingot_starmetal });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_44_pip, 1), new Object[] { " B ", "BAB", " B ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_44_bj, 1), new Object[] { " C ", "BAB", " C ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic, 'C', "dustDesh" }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_44_bj, 1), new Object[] { " C ", "BAB", " C ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic, 'C', ModItems.ingot_starmetal });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_44_silver, 1), new Object[] { " C ", "BAB", " C ", 'A', ModItems.ammo_44, 'B', ModItems.powder_magic, 'C', ModItems.ingot_starmetal });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_5mm_explosive, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_5mm, 'A', Blocks.tnt });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_5mm_du, 8), new Object[] { "BBB", "BAB", "BBB", 'B', ModItems.ammo_5mm, 'A', ModItems.ingot_u238 });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_5mm_star, 4), new Object[] { " B ", "BAB", " B ", 'B', ModItems.ammo_5mm_du, 'A', ModItems.ingot_starmetal });

View File

@ -542,6 +542,7 @@ public class MainRegistry
GameRegistry.registerTileEntity(TileEntitySoyuzLauncher.class, "tileentity_soyuz_launcher");
GameRegistry.registerTileEntity(TileEntityTesla.class, "tileentity_tesla_coil");
GameRegistry.registerTileEntity(TileEntityBarrel.class, "tileentity_fluid_barrel");
GameRegistry.registerTileEntity(TileEntityCyberCrab.class, "tileentity_crabs");
EntityRegistry.registerModEntity(EntityRocket.class, "entity_rocket", 0, this, 250, 1, true);
EntityRegistry.registerModEntity(EntityNukeExplosion.class, "entity_nuke_explosion", 1, this, 250, 1, true);

View File

@ -0,0 +1,37 @@
package com.hbm.tileentity.machine;
import java.util.List;
import com.hbm.entity.mob.EntityCyberCrab;
import net.minecraft.entity.Entity;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
public class TileEntityCyberCrab extends TileEntity {
int age = 0;
@Override
public void updateEntity() {
if (!this.worldObj.isRemote) {
age++;
if(age > 200) {
List<Entity> entities = this.worldObj.getEntitiesWithinAABB(EntityCyberCrab.class,
AxisAlignedBB.getBoundingBox(this.xCoord - 5, this.yCoord - 2, this.zCoord - 5, this.xCoord + 6,
this.yCoord + 4, this.zCoord + 6));
if(entities.size() < 5) {
EntityCyberCrab crab = new EntityCyberCrab(worldObj);
crab.setPosition(this.xCoord + 0.5, this.yCoord + 1, this.zCoord + 0.5);
worldObj.spawnEntityInWorld(crab);
}
age = 0;
}
}
}
}

View File

@ -3,6 +3,7 @@ package com.hbm.tileentity.machine;
import java.util.ArrayList;
import java.util.List;
import com.hbm.blocks.ModBlocks;
import com.hbm.interfaces.IConsumer;
import com.hbm.lib.Library;
import com.hbm.lib.ModDamageSource;
@ -45,6 +46,9 @@ public class TileEntityTesla extends TileEntityMachineBase implements IConsumer
this.targets.clear();
if(worldObj.getBlock(xCoord, yCoord - 1, zCoord) == ModBlocks.meteor_battery)
power = maxPower;
if(power >= 5000) {
power -= 5000;
@ -63,6 +67,9 @@ public class TileEntityTesla extends TileEntityMachineBase implements IConsumer
if(vec.lengthVector() > range)
continue;
if(Library.isObstructed(worldObj, xCoord + 0.5, yCoord + offset, zCoord + 0.5, e.posX, e.posY + e.height / 2, e.posZ))
continue;
if(!(e instanceof EntityPlayer && Library.checkForFaraday((EntityPlayer)e)))
if(e.attackEntityFrom(ModDamageSource.electricity, MathHelper.clamp_float(e.getMaxHealth() * 0.5F, 3, 20) / (float)targets.size()))

View File

@ -15,6 +15,9 @@ public class CellularDungeonFactory {
test.rooms.add(new TestDungeonRoom2(test));
test.rooms.add(new TestDungeonRoom3(test));
test.rooms.add(new TestDungeonRoom4(test, new TestDungeonRoom5(test), ForgeDirection.NORTH));
test.rooms.add(new TestDungeonRoom6(test));
test.rooms.add(new TestDungeonRoom7(test));
test.rooms.add(new TestDungeonRoom8(test));
}
}

View File

@ -2,6 +2,7 @@ package com.hbm.world.generator.room;
import java.util.ArrayList;
import com.hbm.blocks.ModBlocks;
import com.hbm.world.generator.CellularDungeon;
import com.hbm.world.generator.CellularDungeonRoom;
import com.hbm.world.generator.DungeonToolbox;
@ -22,6 +23,8 @@ public class TestDungeonRoom4 extends CellularDungeonRoom {
super.generateMain(world, x, y, z);
DungeonToolbox.generateBox(world, x, y + parent.height - 2, z, parent.width, 1, parent.width, new ArrayList() {{ add(Blocks.air); add(Blocks.web); }});
DungeonToolbox.generateBox(world, x + 1, y, z + 1, parent.width - 2, 1, parent.width - 2, new ArrayList() {{ add(ModBlocks.meteor_polished); add(ModBlocks.meteor_polished); add(ModBlocks.meteor_polished); add(ModBlocks.meteor_polished); add(ModBlocks.meteor_polished); add(ModBlocks.meteor_spawner); }});
}
public void generateWall(World world, int x, int y, int z, ForgeDirection wall, boolean door) {

View File

@ -2,6 +2,7 @@ package com.hbm.world.generator.room;
import java.util.ArrayList;
import com.hbm.blocks.ModBlocks;
import com.hbm.world.generator.CellularDungeon;
import com.hbm.world.generator.CellularDungeonRoom;
import com.hbm.world.generator.DungeonToolbox;
@ -20,6 +21,8 @@ public class TestDungeonRoom5 extends CellularDungeonRoom {
super.generateMain(world, x, y, z);
DungeonToolbox.generateBox(world, x, y + parent.height - 2, z, parent.width, 1, parent.width, new ArrayList() {{ add(Blocks.air); add(Blocks.web); }});
DungeonToolbox.generateBox(world, x + 1, y, z + 1, parent.width - 2, 1, parent.width - 2, new ArrayList() {{ add(ModBlocks.meteor_polished); add(ModBlocks.meteor_polished); add(ModBlocks.meteor_polished); add(ModBlocks.meteor_polished); add(ModBlocks.meteor_polished); add(ModBlocks.meteor_spawner); }});
}
public void generateWall(World world, int x, int y, int z, ForgeDirection wall, boolean door) {

View File

@ -0,0 +1,54 @@
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);
}
}
}

View File

@ -0,0 +1,28 @@
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);
}
}

View File

@ -0,0 +1,58 @@
package com.hbm.world.generator.room;
import com.hbm.blocks.ModBlocks;
import com.hbm.items.ModItems;
import com.hbm.tileentity.machine.TileEntitySafe;
import com.hbm.world.generator.CellularDungeon;
import com.hbm.world.generator.CellularDungeonRoom;
import com.hbm.world.generator.DungeonToolbox;
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)
((TileEntitySafe)world.getTileEntity(x + parent.width / 2, y + 2, z + parent.width / 2)).setInventorySlotContents(7, new ItemStack(ModItems.book_of_));
break;
}
/*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");
}*/
}
}