gon_alert1.wav
BIN
src/main/java/assets/hbm/sounds/music/jungleDrums.ogg
Normal file
|
After Width: | Height: | Size: 679 B |
|
After Width: | Height: | Size: 717 B |
|
After Width: | Height: | Size: 683 B |
|
After Width: | Height: | Size: 683 B |
|
After Width: | Height: | Size: 670 B |
|
After Width: | Height: | Size: 688 B |
|
After Width: | Height: | Size: 653 B |
|
After Width: | Height: | Size: 741 B |
|
After Width: | Height: | Size: 644 B |
|
After Width: | Height: | Size: 693 B |
|
After Width: | Height: | Size: 688 B |
|
After Width: | Height: | Size: 688 B |
|
After Width: | Height: | Size: 657 B |
|
After Width: | Height: | Size: 681 B |
|
After Width: | Height: | Size: 668 B |
|
After Width: | Height: | Size: 740 B |
BIN
src/main/java/assets/hbm/textures/blocks/brick_jungle_lava.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
@ -0,0 +1,5 @@
|
||||
{
|
||||
"animation": {
|
||||
"frametime": 4
|
||||
}
|
||||
}
|
||||
BIN
src/main/java/assets/hbm/textures/blocks/crate_jungle.png
Normal file
|
After Width: | Height: | Size: 643 B |
BIN
src/main/java/assets/hbm/textures/items/blades_desh.png
Normal file
|
After Width: | Height: | Size: 253 B |
@ -7,6 +7,7 @@ import com.hbm.blocks.machine.*;
|
||||
import com.hbm.blocks.network.*;
|
||||
import com.hbm.blocks.test.*;
|
||||
import com.hbm.items.block.ItemBlockLore;
|
||||
import com.hbm.items.block.ItemGlyphBlock;
|
||||
import com.hbm.items.block.ItemTaintBlock;
|
||||
import com.hbm.items.bomb.ItemPrototypeBlock;
|
||||
import com.hbm.items.special.ItemOreBlock;
|
||||
@ -207,6 +208,9 @@ public class ModBlocks {
|
||||
|
||||
public static Block brick_jungle;
|
||||
public static Block brick_jungle_cracked;
|
||||
public static Block brick_jungle_lava;
|
||||
public static Block brick_jungle_trap;
|
||||
public static Block brick_jungle_glyph;
|
||||
|
||||
public static Block tape_recorder;
|
||||
public static Block steel_poles;
|
||||
@ -285,6 +289,7 @@ public class ModBlocks {
|
||||
public static Block crate_red;
|
||||
public static Block crate_can;
|
||||
public static Block crate_ammo;
|
||||
public static Block crate_jungle;
|
||||
|
||||
public static Block boxcar;
|
||||
public static Block boat;
|
||||
@ -978,6 +983,9 @@ public class ModBlocks {
|
||||
|
||||
brick_jungle = new BlockGeneric(Material.rock).setBlockName("brick_jungle").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setBlockTextureName(RefStrings.MODID + ":brick_jungle");
|
||||
brick_jungle_cracked = new BlockGeneric(Material.rock).setBlockName("brick_jungle_cracked").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setBlockTextureName(RefStrings.MODID + ":brick_jungle_cracked");
|
||||
brick_jungle_lava = new BlockGeneric(Material.rock).setBlockName("brick_jungle_lava").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setLightLevel(5F/15F).setBlockTextureName(RefStrings.MODID + ":brick_jungle_lava");
|
||||
brick_jungle_trap = new BlockGeneric(Material.rock).setBlockName("brick_jungle_trap").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(900.0F).setBlockTextureName(RefStrings.MODID + ":brick_jungle_trap");
|
||||
brick_jungle_glyph = new BlockGlyph(Material.rock).setBlockName("brick_jungle_glyph").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");
|
||||
@ -1290,7 +1298,8 @@ public class ModBlocks {
|
||||
crate_metal = new BlockCrate(Material.iron).setBlockName("crate_metal").setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate_metal");
|
||||
crate_red = new BlockCrate(Material.iron).setBlockName("crate_red").setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":crate_red");
|
||||
crate_can = new BlockCanCrate(Material.wood).setBlockName("crate_can").setStepSound(Block.soundTypeWood).setHardness(1.0F).setResistance(2.5F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate_can");
|
||||
crate_ammo = new BlockAmmoCrate(Material.wood).setBlockName("crate_ammo").setStepSound(Block.soundTypeMetal).setHardness(1.0F).setResistance(2.5F).setCreativeTab(MainRegistry.consumableTab);
|
||||
crate_ammo = new BlockAmmoCrate(Material.iron).setBlockName("crate_ammo").setStepSound(Block.soundTypeMetal).setHardness(1.0F).setResistance(2.5F).setCreativeTab(MainRegistry.consumableTab);
|
||||
crate_jungle = new BlockJungleCrate(Material.rock).setBlockName("crate_jungle").setStepSound(Block.soundTypeStone).setHardness(1.0F).setResistance(2.5F).setCreativeTab(MainRegistry.consumableTab).setBlockTextureName(RefStrings.MODID + ":crate_jungle");
|
||||
crate_iron = new BlockStorageCrate(Material.iron).setBlockName("crate_iron").setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
crate_steel = new BlockStorageCrate(Material.iron).setBlockName("crate_steel").setStepSound(Block.soundTypeMetal).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
safe = new BlockStorageCrate(Material.iron).setBlockName("safe").setStepSound(Block.soundTypeMetal).setHardness(7.5F).setResistance(10000.0F).setCreativeTab(MainRegistry.machineTab);
|
||||
@ -1630,6 +1639,9 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(meteor_battery, ItemBlockLore.class, meteor_battery.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_jungle, brick_jungle.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_jungle_cracked, brick_jungle_cracked.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_jungle_lava, brick_jungle_lava.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_jungle_trap, brick_jungle_trap.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(brick_jungle_glyph, ItemGlyphBlock.class, brick_jungle_glyph.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(tape_recorder, tape_recorder.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(steel_poles, steel_poles.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(pole_top, pole_top.getUnlocalizedName());
|
||||
@ -1990,6 +2002,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(crate_red, crate_red.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(crate_can, crate_can.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(crate_ammo, crate_ammo.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(crate_jungle, crate_jungle.getUnlocalizedName());
|
||||
|
||||
//ElB
|
||||
GameRegistry.registerBlock(statue_elb, statue_elb.getUnlocalizedName());
|
||||
|
||||
57
src/main/java/com/hbm/blocks/generic/BlockGlyph.java
Normal file
@ -0,0 +1,57 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BlockGlyph extends Block {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] glyphIcons;
|
||||
|
||||
public BlockGlyph(Material material) {
|
||||
super(material);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":brick_jungle");
|
||||
|
||||
this.glyphIcons = new IIcon[16];
|
||||
|
||||
for(int i = 0; i < 16; i++)
|
||||
this.glyphIcons[i] = iconRegister.registerIcon(RefStrings.MODID + ":brick_jungle_glyph_" + i);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return side == 1 ? this.blockIcon : (side == 0 ? this.blockIcon : (this.glyphIcons[metadata]));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int p_149692_1_)
|
||||
{
|
||||
return p_149692_1_;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item p_149666_1_, CreativeTabs p_149666_2_, List p_149666_3_)
|
||||
{
|
||||
for (int i = 0; i < 16; ++i)
|
||||
{
|
||||
p_149666_3_.add(new ItemStack(p_149666_1_, 1, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
31
src/main/java/com/hbm/blocks/generic/BlockJungleCrate.java
Normal file
@ -0,0 +1,31 @@
|
||||
package com.hbm.blocks.generic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockJungleCrate extends Block {
|
||||
|
||||
public BlockJungleCrate(Material material) {
|
||||
super(material);
|
||||
}
|
||||
|
||||
Random rand = new Random();
|
||||
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
|
||||
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
||||
|
||||
ret.add(new ItemStack(ModItems.cap_nuka, 12 + rand.nextInt(21)));
|
||||
ret.add(new ItemStack(ModItems.syringe_metal_stimpak, 1 + rand.nextInt(3)));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
47
src/main/java/com/hbm/items/block/ItemGlyphBlock.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.hbm.items.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.generic.RedBarrel;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemGlyphBlock extends ItemBlock {
|
||||
|
||||
public ItemGlyphBlock(Block p_i45328_1_) {
|
||||
super(p_i45328_1_);
|
||||
this.setMaxDamage(0);
|
||||
this.setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
|
||||
|
||||
switch(itemstack.getItemDamage()) {
|
||||
case 0: list.add("Hourglass"); break;
|
||||
case 1: list.add("Eye"); break;
|
||||
case 2: list.add("'Pillar'"); break;
|
||||
case 3: list.add("IOI"); break;
|
||||
case 4: list.add("Delta"); break;
|
||||
case 5: list.add("VTPC"); break;
|
||||
case 6: list.add("Cool S"); break;
|
||||
case 7: list.add("Trefoil"); break;
|
||||
case 8: list.add("Pony"); break;
|
||||
case 9: list.add("Sparkle"); break;
|
||||
case 10: list.add("PiP"); break;
|
||||
case 11: list.add("Triangles"); break;
|
||||
case 12: list.add("Linux Mint"); break;
|
||||
case 13: list.add("13"); break;
|
||||
case 14: list.add("Digamma"); break;
|
||||
case 15: list.add("Celestial Altar"); break;
|
||||
}
|
||||
}
|
||||
|
||||
public int getMetadata(int p_77647_1_)
|
||||
{
|
||||
return p_77647_1_;
|
||||
}
|
||||
}
|
||||
@ -32,29 +32,25 @@ public class ItemModRecord extends ItemRecord {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_,
|
||||
int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) {
|
||||
if (p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_) == Blocks.jukebox
|
||||
&& p_77648_3_.getBlockMetadata(p_77648_4_, p_77648_5_, p_77648_6_) == 0) {
|
||||
if (p_77648_3_.isRemote) {
|
||||
public boolean onItemUse(ItemStack p_77648_1_, EntityPlayer p_77648_2_, World p_77648_3_, int p_77648_4_, int p_77648_5_, int p_77648_6_, int p_77648_7_, float p_77648_8_, float p_77648_9_, float p_77648_10_) {
|
||||
|
||||
if(p_77648_3_.getBlock(p_77648_4_, p_77648_5_, p_77648_6_) == Blocks.jukebox && p_77648_3_.getBlockMetadata(p_77648_4_, p_77648_5_, p_77648_6_) == 0) {
|
||||
|
||||
if(p_77648_3_.isRemote) {
|
||||
return true;
|
||||
|
||||
} else {
|
||||
((BlockJukebox) Blocks.jukebox).func_149926_b(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_,
|
||||
p_77648_1_);
|
||||
p_77648_3_.playAuxSFXAtEntity((EntityPlayer) null, 1005, p_77648_4_, p_77648_5_, p_77648_6_,
|
||||
Item.getIdFromItem(this));
|
||||
((BlockJukebox) Blocks.jukebox).func_149926_b(p_77648_3_, p_77648_4_, p_77648_5_, p_77648_6_, p_77648_1_);
|
||||
p_77648_3_.playAuxSFXAtEntity((EntityPlayer) null, 1005, p_77648_4_, p_77648_5_, p_77648_6_, Item.getIdFromItem(this));
|
||||
--p_77648_1_.stackSize;
|
||||
return true;
|
||||
}
|
||||
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* allows items to add custom lines of information to the mouseover
|
||||
* description
|
||||
*/
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack p_77624_1_, EntityPlayer p_77624_2_, List p_77624_3_, boolean p_77624_4_) {
|
||||
@ -82,17 +78,10 @@ public class ItemModRecord extends ItemRecord {
|
||||
public static ItemRecord getRecord(String p_150926_0_) {
|
||||
return (ItemRecord) modRecords.get(p_150926_0_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the resource location of the sound to play for this record.
|
||||
*
|
||||
* @param name
|
||||
* The name of the record to play
|
||||
* @return The resource location for the audio, null to use default.
|
||||
*/
|
||||
|
||||
@Override
|
||||
public ResourceLocation getRecordResource(String name) {
|
||||
|
||||
|
||||
String s = "";
|
||||
|
||||
if(name.equals("records.lc"))
|
||||
@ -103,15 +92,14 @@ public class ItemModRecord extends ItemRecord {
|
||||
s = RefStrings.MODID + ":music.recordVortalCombat";
|
||||
if(name.equals("records.glass"))
|
||||
s = RefStrings.MODID + ":music.transmission";
|
||||
|
||||
|
||||
return new ResourceLocation(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack p_77653_1_)
|
||||
{
|
||||
String s = (StatCollector.translateToLocal(Items.record_11.getUnlocalizedName() + ".name")).trim();
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack p_77653_1_) {
|
||||
String s = (StatCollector.translateToLocal(Items.record_11.getUnlocalizedName() + ".name")).trim();
|
||||
|
||||
return s;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,8 +28,10 @@ public class ItemWandD extends Item {
|
||||
int y = world.getHeightValue(x, z);
|
||||
|
||||
//new Ruin001().generate_r0(world, world.rand, x, y - 8, z);
|
||||
|
||||
|
||||
CellularDungeonFactory.jungle.generate(world, x, y, z, world.rand);
|
||||
CellularDungeonFactory.jungle.generate(world, x, y + 4, z, world.rand);
|
||||
CellularDungeonFactory.jungle.generate(world, x, y + 8, z, world.rand);
|
||||
}
|
||||
|
||||
return stack;
|
||||
|
||||
@ -764,5 +764,10 @@ public class ClientProxy extends ServerProxy {
|
||||
audio.updatePosition(x, y, z);
|
||||
return audio;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void playSound(String sound, Object data) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ import com.hbm.packet.RadSurveyPacket;
|
||||
import com.hbm.saveddata.AuxSavedData;
|
||||
import com.hbm.saveddata.RadiationSavedData;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.world.generator.TimedGenerator;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||
@ -372,6 +373,7 @@ public class ModEventHandler
|
||||
if(event.phase == Phase.START) {
|
||||
RadiationWorldHandler.handleWorldDestruction(event.world);
|
||||
BossSpawnHandler.rollTheDice(event.world);
|
||||
TimedGenerator.automaton(event.world, 100);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -21,4 +21,6 @@ public class ServerProxy {
|
||||
public void registerMissileItems() { }
|
||||
|
||||
public AudioWrapper getLoopedSound(String sound, float x, float y, float z, float volume, float pitch) { return null; }
|
||||
|
||||
public void playSound(String sound, Object data) { }
|
||||
}
|
||||
@ -20,7 +20,7 @@ public class CellularDungeonFactory {
|
||||
meteor.rooms.add(new TestDungeonRoom7(meteor));
|
||||
meteor.rooms.add(new TestDungeonRoom8(meteor));
|
||||
|
||||
jungle = new JungleDungeon(5, 5, 21, 21, 500, 5);
|
||||
jungle = new JungleDungeon(5, 5, 25, 25, 700, 6);
|
||||
jungle.rooms.add(new JungleDungeonRoom(jungle));
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,24 @@ import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DungeonToolbox {
|
||||
|
||||
|
||||
public static void generateBoxTimed(World world, int x, int y, int z, int sx, int sy, int sz, List<Block> blocks) {
|
||||
|
||||
if(blocks.isEmpty())
|
||||
return;
|
||||
|
||||
for(int i = x; i < x + sx; i++) {
|
||||
|
||||
for(int j = y; j < y + sy; j++) {
|
||||
|
||||
for(int k = z; k < z + sz; k++) {
|
||||
|
||||
Block b = getRandom(blocks, world.rand);
|
||||
TimedGenerator.addOp(world, i, j, k, b, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void generateBox(World world, int x, int y, int z, int sx, int sy, int sz, List<Block> blocks) {
|
||||
|
||||
@ -42,6 +59,20 @@ public class DungeonToolbox {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void generateBoxTimed(World world, int x, int y, int z, int sx, int sy, int sz, Block block) {
|
||||
|
||||
for(int i = x; i < x + sx; i++) {
|
||||
|
||||
for(int j = y; j < y + sy; j++) {
|
||||
|
||||
for(int k = z; k < z + sz; k++) {
|
||||
|
||||
TimedGenerator.addOp(world, i, j, k, block, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//now with vectors to provide handy rotations
|
||||
public static void generateBox(World world, int x, int y, int z, Vec3 size, List<Block> blocks) {
|
||||
|
||||
47
src/main/java/com/hbm/world/generator/TimedGenerator.java
Normal file
@ -0,0 +1,47 @@
|
||||
package com.hbm.world.generator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TimedGenerator {
|
||||
|
||||
private static final HashMap<Integer, ArrayList<Object[]>> operations = new HashMap();
|
||||
|
||||
public static void automaton(World world, int amount) {
|
||||
|
||||
ArrayList<Object[]> list = operations.get(world.provider.dimensionId);
|
||||
|
||||
if(list == null)
|
||||
return;
|
||||
|
||||
long start = System.currentTimeMillis();
|
||||
|
||||
while(start + 15 > System.currentTimeMillis()) {
|
||||
|
||||
if(list.isEmpty())
|
||||
return;
|
||||
|
||||
Object[] entry = list.get(0);
|
||||
list.remove(0);
|
||||
|
||||
world.setBlock((Integer)entry[0], (Integer)entry[1], (Integer)entry[2], (Block)entry[3], (Integer)entry[4], (Integer)entry[5]);
|
||||
|
||||
//amount --;
|
||||
}
|
||||
}
|
||||
|
||||
public static void addOp(World world, int x, int y, int z, Block b, int meta, int flags) {
|
||||
|
||||
ArrayList<Object[]> list = operations.get(world.provider.dimensionId);
|
||||
|
||||
if(list == null) {
|
||||
list = new ArrayList();
|
||||
operations.put(world.provider.dimensionId, list);
|
||||
}
|
||||
|
||||
list.add(new Object[] {x, y, z, b, meta, flags});
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,12 @@
|
||||
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;
|
||||
import com.hbm.world.generator.TimedGenerator;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
@ -13,35 +17,51 @@ public class JungleDungeonRoom extends CellularDungeonRoom {
|
||||
public JungleDungeonRoom(CellularDungeon parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
public void generateMain(World world, int x, int y, int z) {
|
||||
|
||||
DungeonToolbox.generateBoxTimed(world, x, y, z, parent.width, 1, parent.width, parent.floor);
|
||||
DungeonToolbox.generateBoxTimed(world, x, y + 1, z, parent.width, parent.height - 1, parent.width, Blocks.air);
|
||||
DungeonToolbox.generateBoxTimed(world, x, y + parent.height - 1, z, parent.width, 1, parent.width, parent.ceiling);
|
||||
|
||||
int rtd = world.rand.nextInt(10);
|
||||
|
||||
if(rtd == 0) {
|
||||
DungeonToolbox.generateBoxTimed(world, x + parent.width / 2 - 1, y, z + parent.width / 2 - 1, 3, 1, 3, new ArrayList() {{ add(ModBlocks.brick_jungle_cracked); add(ModBlocks.brick_jungle_lava); }});
|
||||
|
||||
} else if(rtd == 1) {
|
||||
TimedGenerator.addOp(world, x + 1 + world.rand.nextInt(parent.width - 1), y + 1, z + world.rand.nextInt(parent.width - 1), ModBlocks.crate_jungle, 0, 2);
|
||||
}
|
||||
}
|
||||
|
||||
public void generateWall(World world, int x, int y, int z, ForgeDirection wall, boolean door) {
|
||||
|
||||
if(wall == ForgeDirection.NORTH) {
|
||||
DungeonToolbox.generateBox(world, x, y + 1, z, parent.width, parent.height - 2, 1, parent.wall);
|
||||
DungeonToolbox.generateBoxTimed(world, x, y + 1, z, parent.width, parent.height - 2, 1, parent.wall);
|
||||
|
||||
if(door)
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 - 1, y + 1, z, 3, 3, 1, Blocks.air);
|
||||
DungeonToolbox.generateBoxTimed(world, x + parent.width / 2 - 1, y + 1, z, 3, 3, 1, Blocks.air);
|
||||
}
|
||||
|
||||
if(wall == ForgeDirection.SOUTH) {
|
||||
DungeonToolbox.generateBox(world, x, y + 1, z + parent.width - 1, parent.width, parent.height - 2, 1, parent.wall);
|
||||
DungeonToolbox.generateBoxTimed(world, x, y + 1, z + parent.width - 1, parent.width, parent.height - 2, 1, parent.wall);
|
||||
|
||||
if(door)
|
||||
DungeonToolbox.generateBox(world, x + parent.width / 2 - 1, y + 1, z + parent.width - 1, 3, 3, 1, Blocks.air);
|
||||
DungeonToolbox.generateBoxTimed(world, x + parent.width / 2 - 1, y + 1, z + parent.width - 1, 3, 3, 1, Blocks.air);
|
||||
}
|
||||
|
||||
if(wall == ForgeDirection.WEST) {
|
||||
DungeonToolbox.generateBox(world, x, y + 1, z, 1, parent.height - 2, parent.width, parent.wall);
|
||||
DungeonToolbox.generateBoxTimed(world, x, y + 1, z, 1, parent.height - 2, parent.width, parent.wall);
|
||||
|
||||
if(door)
|
||||
DungeonToolbox.generateBox(world, x, y + 1, z + parent.width / 2 - 1, 1, 3, 3, Blocks.air);
|
||||
DungeonToolbox.generateBoxTimed(world, x, y + 1, z + parent.width / 2 - 1, 1, 3, 3, Blocks.air);
|
||||
}
|
||||
|
||||
if(wall == ForgeDirection.EAST) {
|
||||
DungeonToolbox.generateBox(world, x + parent.width - 1, y + 1, z, 1, parent.height - 2, parent.width, parent.wall);
|
||||
DungeonToolbox.generateBoxTimed(world, x + parent.width - 1, y + 1, z, 1, parent.height - 2, parent.width, parent.wall);
|
||||
|
||||
if(door)
|
||||
DungeonToolbox.generateBox(world, x + parent.width - 1, y + 1, z + parent.width / 2 - 1, 1, 3, 3, Blocks.air);
|
||||
DungeonToolbox.generateBoxTimed(world, x + parent.width - 1, y + 1, z + parent.width / 2 - 1, 1, 3, 3, Blocks.air);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||