diff --git a/assets/hbm/textures/armor/titanium_1.png b/assets/hbm/textures/armor/titanium_1.png index cc0cdc5c5..d58869c26 100644 Binary files a/assets/hbm/textures/armor/titanium_1.png and b/assets/hbm/textures/armor/titanium_1.png differ diff --git a/assets/hbm/textures/armor/titanium_2.png b/assets/hbm/textures/armor/titanium_2.png index 06516530f..91f3ba5ce 100644 Binary files a/assets/hbm/textures/armor/titanium_2.png and b/assets/hbm/textures/armor/titanium_2.png differ diff --git a/assets/hbm/textures/blocks/barricade.png b/assets/hbm/textures/blocks/barricade.png new file mode 100644 index 000000000..2b63da269 Binary files /dev/null and b/assets/hbm/textures/blocks/barricade.png differ diff --git a/assets/hbm/textures/blocks/block_copper.png b/assets/hbm/textures/blocks/block_copper.png index 0c34be4b9..266a49d70 100644 Binary files a/assets/hbm/textures/blocks/block_copper.png and b/assets/hbm/textures/blocks/block_copper.png differ diff --git a/assets/hbm/textures/blocks/block_titanium.png b/assets/hbm/textures/blocks/block_titanium.png index d622ef6e5..32163da21 100644 Binary files a/assets/hbm/textures/blocks/block_titanium.png and b/assets/hbm/textures/blocks/block_titanium.png differ diff --git a/assets/hbm/textures/blocks/deco_titanium.png b/assets/hbm/textures/blocks/deco_titanium.png index 464fb2fa8..1615f9400 100644 Binary files a/assets/hbm/textures/blocks/deco_titanium.png and b/assets/hbm/textures/blocks/deco_titanium.png differ diff --git a/assets/hbm/textures/blocks/ore_copper.png b/assets/hbm/textures/blocks/ore_copper.png index 1ad1b90b0..fb0dafefb 100644 Binary files a/assets/hbm/textures/blocks/ore_copper.png and b/assets/hbm/textures/blocks/ore_copper.png differ diff --git a/assets/hbm/textures/blocks/ore_titanium.png b/assets/hbm/textures/blocks/ore_titanium.png index 5a3f5d75b..69c24538f 100644 Binary files a/assets/hbm/textures/blocks/ore_titanium.png and b/assets/hbm/textures/blocks/ore_titanium.png differ diff --git a/assets/hbm/textures/items/blade_titanium.png b/assets/hbm/textures/items/blade_titanium.png index 0304868af..510569beb 100644 Binary files a/assets/hbm/textures/items/blade_titanium.png and b/assets/hbm/textures/items/blade_titanium.png differ diff --git a/assets/hbm/textures/items/blades_titanium.png b/assets/hbm/textures/items/blades_titanium.png index a7e767e88..a3b77cdd5 100644 Binary files a/assets/hbm/textures/items/blades_titanium.png and b/assets/hbm/textures/items/blades_titanium.png differ diff --git a/assets/hbm/textures/items/board_copper.png b/assets/hbm/textures/items/board_copper.png index d13fcfa59..ba7b1a3ed 100644 Binary files a/assets/hbm/textures/items/board_copper.png and b/assets/hbm/textures/items/board_copper.png differ diff --git a/assets/hbm/textures/items/crystal_copper.png b/assets/hbm/textures/items/crystal_copper.png index e0ca97ffd..f511253bd 100644 Binary files a/assets/hbm/textures/items/crystal_copper.png and b/assets/hbm/textures/items/crystal_copper.png differ diff --git a/assets/hbm/textures/items/crystal_titanium.png b/assets/hbm/textures/items/crystal_titanium.png index 483b39fcf..f84140d96 100644 Binary files a/assets/hbm/textures/items/crystal_titanium.png and b/assets/hbm/textures/items/crystal_titanium.png differ diff --git a/assets/hbm/textures/items/fins_quad_titanium.png b/assets/hbm/textures/items/fins_quad_titanium.png index 2539e7f9c..a85958e42 100644 Binary files a/assets/hbm/textures/items/fins_quad_titanium.png and b/assets/hbm/textures/items/fins_quad_titanium.png differ diff --git a/assets/hbm/textures/items/hull_big_titanium.png b/assets/hbm/textures/items/hull_big_titanium.png index 083347333..34b4661bf 100644 Binary files a/assets/hbm/textures/items/hull_big_titanium.png and b/assets/hbm/textures/items/hull_big_titanium.png differ diff --git a/assets/hbm/textures/items/ingot_copper.png b/assets/hbm/textures/items/ingot_copper.png index 8f771cf7a..3b98457bf 100644 Binary files a/assets/hbm/textures/items/ingot_copper.png and b/assets/hbm/textures/items/ingot_copper.png differ diff --git a/assets/hbm/textures/items/ingot_titanium.png b/assets/hbm/textures/items/ingot_titanium.png index 9ba133aac..2479debbb 100644 Binary files a/assets/hbm/textures/items/ingot_titanium.png and b/assets/hbm/textures/items/ingot_titanium.png differ diff --git a/assets/hbm/textures/items/new/scrap_copper.png b/assets/hbm/textures/items/new/scrap_copper.png index e2c63b904..ff5aca4d6 100644 Binary files a/assets/hbm/textures/items/new/scrap_copper.png and b/assets/hbm/textures/items/new/scrap_copper.png differ diff --git a/assets/hbm/textures/items/part_beryllium.png b/assets/hbm/textures/items/part_beryllium.png index b880a7879..4c94eafc7 100644 Binary files a/assets/hbm/textures/items/part_beryllium.png and b/assets/hbm/textures/items/part_beryllium.png differ diff --git a/assets/hbm/textures/items/part_carbon.png b/assets/hbm/textures/items/part_carbon.png index 3623ca400..e45fdc24b 100644 Binary files a/assets/hbm/textures/items/part_carbon.png and b/assets/hbm/textures/items/part_carbon.png differ diff --git a/assets/hbm/textures/items/part_copper.png b/assets/hbm/textures/items/part_copper.png index b43b2201c..a08260c37 100644 Binary files a/assets/hbm/textures/items/part_copper.png and b/assets/hbm/textures/items/part_copper.png differ diff --git a/assets/hbm/textures/items/part_lithium.png b/assets/hbm/textures/items/part_lithium.png index c45c95b1f..b5c2eb7cb 100644 Binary files a/assets/hbm/textures/items/part_lithium.png and b/assets/hbm/textures/items/part_lithium.png differ diff --git a/assets/hbm/textures/items/part_plutonium.png b/assets/hbm/textures/items/part_plutonium.png index 33116f62a..95e41f122 100644 Binary files a/assets/hbm/textures/items/part_plutonium.png and b/assets/hbm/textures/items/part_plutonium.png differ diff --git a/assets/hbm/textures/items/plate_advanced_alloy.png b/assets/hbm/textures/items/plate_advanced_alloy.png index d32e83982..4be67e629 100644 Binary files a/assets/hbm/textures/items/plate_advanced_alloy.png and b/assets/hbm/textures/items/plate_advanced_alloy.png differ diff --git a/assets/hbm/textures/items/plate_copper.png b/assets/hbm/textures/items/plate_copper.png index b2ea38cd8..da29b70f5 100644 Binary files a/assets/hbm/textures/items/plate_copper.png and b/assets/hbm/textures/items/plate_copper.png differ diff --git a/assets/hbm/textures/items/powder_copper.png b/assets/hbm/textures/items/powder_copper.png index 6587c3915..0fe2c2221 100644 Binary files a/assets/hbm/textures/items/powder_copper.png and b/assets/hbm/textures/items/powder_copper.png differ diff --git a/assets/hbm/textures/items/powder_titanium.png b/assets/hbm/textures/items/powder_titanium.png index be0593e41..78b9dbd5d 100644 Binary files a/assets/hbm/textures/items/powder_titanium.png and b/assets/hbm/textures/items/powder_titanium.png differ diff --git a/assets/hbm/textures/items/titanium_axe.png b/assets/hbm/textures/items/titanium_axe.png index 2a87f9477..0528cf9fa 100644 Binary files a/assets/hbm/textures/items/titanium_axe.png and b/assets/hbm/textures/items/titanium_axe.png differ diff --git a/assets/hbm/textures/items/titanium_boots.png b/assets/hbm/textures/items/titanium_boots.png index 322bbfe2b..fb3fcb091 100644 Binary files a/assets/hbm/textures/items/titanium_boots.png and b/assets/hbm/textures/items/titanium_boots.png differ diff --git a/assets/hbm/textures/items/titanium_helmet.png b/assets/hbm/textures/items/titanium_helmet.png index 9720dcdc0..aed4574d3 100644 Binary files a/assets/hbm/textures/items/titanium_helmet.png and b/assets/hbm/textures/items/titanium_helmet.png differ diff --git a/assets/hbm/textures/items/titanium_hoe.png b/assets/hbm/textures/items/titanium_hoe.png index 0a93362dd..a0483e35d 100644 Binary files a/assets/hbm/textures/items/titanium_hoe.png and b/assets/hbm/textures/items/titanium_hoe.png differ diff --git a/assets/hbm/textures/items/titanium_legs.png b/assets/hbm/textures/items/titanium_legs.png index 25bc3c444..4fea6de03 100644 Binary files a/assets/hbm/textures/items/titanium_legs.png and b/assets/hbm/textures/items/titanium_legs.png differ diff --git a/assets/hbm/textures/items/titanium_pickaxe.png b/assets/hbm/textures/items/titanium_pickaxe.png index 65f2b268b..b13b5a187 100644 Binary files a/assets/hbm/textures/items/titanium_pickaxe.png and b/assets/hbm/textures/items/titanium_pickaxe.png differ diff --git a/assets/hbm/textures/items/titanium_plate.png b/assets/hbm/textures/items/titanium_plate.png index 45a33e06d..afa9c0a37 100644 Binary files a/assets/hbm/textures/items/titanium_plate.png and b/assets/hbm/textures/items/titanium_plate.png differ diff --git a/assets/hbm/textures/items/titanium_shovel.png b/assets/hbm/textures/items/titanium_shovel.png index 998cbc36c..0ed243c42 100644 Binary files a/assets/hbm/textures/items/titanium_shovel.png and b/assets/hbm/textures/items/titanium_shovel.png differ diff --git a/assets/hbm/textures/items/titanium_sword.png b/assets/hbm/textures/items/titanium_sword.png index 0dca026eb..1face765b 100644 Binary files a/assets/hbm/textures/items/titanium_sword.png and b/assets/hbm/textures/items/titanium_sword.png differ diff --git a/assets/hbm/textures/items/turbine_titanium.png b/assets/hbm/textures/items/turbine_titanium.png index f9ca28a79..10df26c28 100644 Binary files a/assets/hbm/textures/items/turbine_titanium.png and b/assets/hbm/textures/items/turbine_titanium.png differ diff --git a/assets/hbm/textures/items/wire_copper.png b/assets/hbm/textures/items/wire_copper.png index 94be8820f..af742b5a8 100644 Binary files a/assets/hbm/textures/items/wire_copper.png and b/assets/hbm/textures/items/wire_copper.png differ diff --git a/com/hbm/blocks/BlockDummyable.java b/com/hbm/blocks/BlockDummyable.java index 0690bc70b..734a12869 100644 --- a/com/hbm/blocks/BlockDummyable.java +++ b/com/hbm/blocks/BlockDummyable.java @@ -172,8 +172,10 @@ public abstract class BlockDummyable extends BlockContainer { return; } - world.setBlock(x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, this, dir.ordinal() + offset, 3); - fillSpace(world, x, y, z, dir, o); + if(!world.isRemote) { + world.setBlock(x + dir.offsetX * o , y + dir.offsetY * o, z + dir.offsetZ * o, this, dir.ordinal() + offset, 3); + fillSpace(world, x, y, z, dir, o); + } y -= getHeightOffset(); world.scheduleBlockUpdate(x, y, z, this, 1); world.scheduleBlockUpdate(x, y, z, this, 2); diff --git a/com/hbm/blocks/ModBlocks.java b/com/hbm/blocks/ModBlocks.java index 1fab6dbb7..fcbbf8743 100644 --- a/com/hbm/blocks/ModBlocks.java +++ b/com/hbm/blocks/ModBlocks.java @@ -598,6 +598,7 @@ public class ModBlocks { public static final int guiID_machine_drill = 45; public static Block machine_mining_laser; + public static Block barricade; public static final int guiID_mining_laser = 95; public static Block machine_assembler; @@ -1266,6 +1267,7 @@ public class ModBlocks { machine_drill = new MachineMiningDrill(Material.iron).setBlockName("machine_drill").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_drill"); drill_pipe = new BlockNoDrop(Material.iron).setBlockName("drill_pipe").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":drill_pipe"); machine_mining_laser = new MachineMiningLaser(Material.iron).setBlockName("machine_mining_laser").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_mining_laser"); + barricade = new BlockNoDrop(Material.sand).setBlockName("barricade").setHardness(1.0F).setResistance(2.5F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barricade"); machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_assembler"); machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chemplant"); machine_fluidtank = new MachineFluidTank(Material.iron).setBlockName("machine_fluidtank").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fluidtank"); @@ -1792,6 +1794,7 @@ public class ModBlocks { GameRegistry.registerBlock(machine_refinery, machine_refinery.getUnlocalizedName()); GameRegistry.registerBlock(machine_drill, machine_drill.getUnlocalizedName()); GameRegistry.registerBlock(machine_mining_laser, machine_mining_laser.getUnlocalizedName()); + GameRegistry.registerBlock(barricade, barricade.getUnlocalizedName()); GameRegistry.registerBlock(machine_turbofan, machine_turbofan.getUnlocalizedName()); GameRegistry.registerBlock(machine_schrabidium_transmutator, machine_schrabidium_transmutator.getUnlocalizedName()); GameRegistry.registerBlock(machine_combine_factory, machine_combine_factory.getUnlocalizedName()); diff --git a/com/hbm/lib/HbmWorldGen.java b/com/hbm/lib/HbmWorldGen.java index f29e06269..862e721d2 100644 --- a/com/hbm/lib/HbmWorldGen.java +++ b/com/hbm/lib/HbmWorldGen.java @@ -237,7 +237,7 @@ public class HbmWorldGen implements IWorldGenerator { BiomeGenBase biome = world.getWorldChunkManager().getBiomeGenAt(i, j); if (biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) { - if (rand.nextInt(MainRegistry.radioStructure) == 0) { + if (MainRegistry.radioStructure > 0 && rand.nextInt(MainRegistry.radioStructure) == 0) { for (int a = 0; a < 1; a++) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); @@ -250,7 +250,7 @@ public class HbmWorldGen implements IWorldGenerator { if (biome == BiomeGenBase.plains || biome == BiomeGenBase.forest || biome == BiomeGenBase.desert || biome == BiomeGenBase.swampland || biome == BiomeGenBase.extremeHills) { - if (rand.nextInt(MainRegistry.antennaStructure) == 0) { + if (MainRegistry.antennaStructure > 0 && rand.nextInt(MainRegistry.antennaStructure) == 0) { for (int a = 0; a < 1; a++) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); @@ -263,7 +263,7 @@ public class HbmWorldGen implements IWorldGenerator { if (biome == BiomeGenBase.desert || biome == BiomeGenBase.beach || biome == BiomeGenBase.mesa || biome == BiomeGenBase.mesaPlateau) { - if (rand.nextInt(MainRegistry.atomStructure) == 0) { + if (MainRegistry.atomStructure > 0 && rand.nextInt(MainRegistry.atomStructure) == 0) { for (int a = 0; a < 1; a++) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); @@ -275,7 +275,7 @@ public class HbmWorldGen implements IWorldGenerator { } if (biome == BiomeGenBase.desert) { - if (rand.nextInt(MainRegistry.vertibirdStructure) == 0) { + if (MainRegistry.vertibirdStructure > 0 && rand.nextInt(MainRegistry.vertibirdStructure) == 0) { for (int a = 0; a < 1; a++) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); @@ -291,7 +291,7 @@ public class HbmWorldGen implements IWorldGenerator { } } - if (rand.nextInt(MainRegistry.dungeonStructure) == 0) { + if (MainRegistry.dungeonStructure > 0 && rand.nextInt(MainRegistry.dungeonStructure) == 0) { int x = i + rand.nextInt(16); int y = rand.nextInt(256); int z = j + rand.nextInt(16); @@ -299,7 +299,7 @@ public class HbmWorldGen implements IWorldGenerator { } if (biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) { - if (rand.nextInt(MainRegistry.relayStructure) == 0) { + if (MainRegistry.relayStructure > 0 && rand.nextInt(MainRegistry.relayStructure) == 0) { for (int a = 0; a < 1; a++) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); @@ -310,7 +310,7 @@ public class HbmWorldGen implements IWorldGenerator { } } if (biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) { - if (rand.nextInt(MainRegistry.satelliteStructure) == 0) { + if (MainRegistry.satelliteStructure > 0 && rand.nextInt(MainRegistry.satelliteStructure) == 0) { for (int a = 0; a < 1; a++) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); @@ -332,7 +332,7 @@ public class HbmWorldGen implements IWorldGenerator { } } - if (rand.nextInt(MainRegistry.bunkerStructure) == 0) { + if (MainRegistry.bunkerStructure > 0 && rand.nextInt(MainRegistry.bunkerStructure) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -340,7 +340,7 @@ public class HbmWorldGen implements IWorldGenerator { new Bunker().generate(world, rand, x, y, z); } - if (rand.nextInt(MainRegistry.siloStructure) == 0) { + if (MainRegistry.siloStructure > 0 && rand.nextInt(MainRegistry.siloStructure) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -348,7 +348,7 @@ public class HbmWorldGen implements IWorldGenerator { new Silo().generate(world, rand, x, y, z); } - if (rand.nextInt(MainRegistry.factoryStructure) == 0) { + if (MainRegistry.factoryStructure > 0 && rand.nextInt(MainRegistry.factoryStructure) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -356,7 +356,7 @@ public class HbmWorldGen implements IWorldGenerator { new Factory().generate(world, rand, x, y, z); } - if (rand.nextInt(MainRegistry.dudStructure) == 0) { + if (MainRegistry.dudStructure > 0 && rand.nextInt(MainRegistry.dudStructure) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -364,7 +364,7 @@ public class HbmWorldGen implements IWorldGenerator { new Dud().generate(world, rand, x, y, z); } - if (rand.nextInt(MainRegistry.spaceshipStructure) == 0) { + if (MainRegistry.spaceshipStructure > 0 && rand.nextInt(MainRegistry.spaceshipStructure) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -372,7 +372,7 @@ public class HbmWorldGen implements IWorldGenerator { new Spaceship().generate(world, rand, x, y, z); } - if (biome == BiomeGenBase.desert && rand.nextInt(MainRegistry.barrelStructure) == 0) { + if (MainRegistry.barrelStructure > 0 && biome == BiomeGenBase.desert && rand.nextInt(MainRegistry.barrelStructure) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -380,7 +380,7 @@ public class HbmWorldGen implements IWorldGenerator { new Barrel().generate(world, rand, x, y, z); } - if (rand.nextInt(MainRegistry.broadcaster) == 0) { + if (MainRegistry.broadcaster > 0 && rand.nextInt(MainRegistry.broadcaster) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -393,7 +393,7 @@ public class HbmWorldGen implements IWorldGenerator { } } - if (MainRegistry.enableMines && rand.nextInt(MainRegistry.minefreq) == 0) { + if (MainRegistry.minefreq > 0 && MainRegistry.enableMines && rand.nextInt(MainRegistry.minefreq) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -406,7 +406,7 @@ public class HbmWorldGen implements IWorldGenerator { } } - if (MainRegistry.enableRad && rand.nextInt(MainRegistry.radfreq) == 0 && biome == BiomeGenBase.desert) { + if (MainRegistry.radfreq > 0 && MainRegistry.enableRad && rand.nextInt(MainRegistry.radfreq) == 0 && biome == BiomeGenBase.desert) { for (int a = 0; a < 1; a++) { int x = i + rand.nextInt(16); @@ -424,7 +424,7 @@ public class HbmWorldGen implements IWorldGenerator { } } - if (biome == BiomeGenBase.plains && rand.nextInt(MainRegistry.geyserWater) == 0) { + if (MainRegistry.geyserWater > 0 && biome == BiomeGenBase.plains && rand.nextInt(MainRegistry.geyserWater) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -433,7 +433,7 @@ public class HbmWorldGen implements IWorldGenerator { new Geyser().generate(world, rand, x, y, z); } - if (biome == BiomeGenBase.desert && rand.nextInt(MainRegistry.geyserChlorine) == 0) { + if (MainRegistry.geyserChlorine > 0 && biome == BiomeGenBase.desert && rand.nextInt(MainRegistry.geyserChlorine) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -442,7 +442,7 @@ public class HbmWorldGen implements IWorldGenerator { new GeyserLarge().generate(world, rand, x, y, z); } - if (biome == BiomeGenBase.beach && rand.nextInt(MainRegistry.capsuleStructure) == 0) { + if (MainRegistry.capsuleStructure > 0 && biome == BiomeGenBase.beach && rand.nextInt(MainRegistry.capsuleStructure) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z) - 4; @@ -462,7 +462,7 @@ public class HbmWorldGen implements IWorldGenerator { } } - if (rand.nextInt(MainRegistry.geyserVapor) == 0) { + if (MainRegistry.geyserVapor > 0 && rand.nextInt(MainRegistry.geyserVapor) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -488,7 +488,7 @@ public class HbmWorldGen implements IWorldGenerator { MainRegistry.logger.info("[Debug] Successfully spawned pink tree at " + x + " " + z); } - if (MainRegistry.enableVaults && rand.nextInt(MainRegistry.vaultfreq) == 0) { + if (MainRegistry.vaultfreq > 0 && MainRegistry.enableVaults && rand.nextInt(MainRegistry.vaultfreq) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); int y = world.getHeightValue(x, z); @@ -535,7 +535,7 @@ public class HbmWorldGen implements IWorldGenerator { } - if (rand.nextInt(MainRegistry.meteorStructure) == 0) { + if (MainRegistry.meteorStructure > 0 && rand.nextInt(MainRegistry.meteorStructure) == 0) { int x = i + rand.nextInt(16); int z = j + rand.nextInt(16); diff --git a/com/hbm/render/tileentity/RenderLaserMiner.java b/com/hbm/render/tileentity/RenderLaserMiner.java index 08f1fd40c..e74c347e4 100644 --- a/com/hbm/render/tileentity/RenderLaserMiner.java +++ b/com/hbm/render/tileentity/RenderLaserMiner.java @@ -27,7 +27,7 @@ public class RenderLaserMiner extends TileEntitySpecialRenderer { double ty = (laser.targetY - laser.lastTargetY) * interpolation + laser.lastTargetY; double tz = (laser.targetZ - laser.lastTargetZ) * interpolation + laser.lastTargetZ; double vx = tx - laser.xCoord; - double vy = ty - laser.yCoord + 1.5; + double vy = ty - laser.yCoord + 3; double vz = tz - laser.zCoord; Vec3 nVec = Vec3.createVectorHelper(vx, vy, vz); diff --git a/com/hbm/tileentity/machine/TileEntityMachineMiningLaser.java b/com/hbm/tileentity/machine/TileEntityMachineMiningLaser.java index c2cf683f6..ac1c0b38c 100644 --- a/com/hbm/tileentity/machine/TileEntityMachineMiningLaser.java +++ b/com/hbm/tileentity/machine/TileEntityMachineMiningLaser.java @@ -33,7 +33,7 @@ import net.minecraft.util.AxisAlignedBB; public class TileEntityMachineMiningLaser extends TileEntityMachineBase implements IConsumer { public long power; - public static final long maxPower = 10000000; + public static final long maxPower = 100000000; public static final int consumption = 10000; public boolean isOn; @@ -102,7 +102,16 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen scan(range); - if(beam && canBreak(worldObj.getBlock(targetX, targetY, targetZ), targetX, targetY, targetZ)) { + + Block block = worldObj.getBlock(targetX, targetY, targetZ); + + if(block.getMaterial().isLiquid()) { + worldObj.setBlockToAir(targetX, targetY, targetZ); + buildDam(); + continue; + } + + if(beam && canBreak(block, targetX, targetY, targetZ)) { breakProgress += getBreakSpeed(speed); clientBreakProgress = Math.min(breakProgress, 1); @@ -111,6 +120,7 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen worldObj.destroyBlockInWorldPartially(-1, targetX, targetY, targetZ, (int) Math.floor(breakProgress * 10)); } else { breakBlock(fortune); + buildDam(); } } } @@ -154,6 +164,18 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen this.breakProgress = data.getDouble("progress"); } + private void buildDam() { + + if(worldObj.getBlock(targetX + 1, targetY, targetZ).getMaterial().isLiquid()) + worldObj.setBlock(targetX + 1, targetY, targetZ, ModBlocks.barricade); + if(worldObj.getBlock(targetX - 1, targetY, targetZ).getMaterial().isLiquid()) + worldObj.setBlock(targetX - 1, targetY, targetZ, ModBlocks.barricade); + if(worldObj.getBlock(targetX, targetY, targetZ + 1).getMaterial().isLiquid()) + worldObj.setBlock(targetX, targetY, targetZ + 1, ModBlocks.barricade); + if(worldObj.getBlock(targetX, targetY, targetZ - 1).getMaterial().isLiquid()) + worldObj.setBlock(targetX, targetY, targetZ - 1, ModBlocks.barricade); + } + private void tryFillContainer(int x, int y, int z) { Block b = worldObj.getBlock(x, y, z); @@ -335,7 +357,7 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen } private boolean canBreak(Block block, int x, int y, int z) { - return block != Blocks.air && block.getBlockHardness(worldObj, x, y, z) >= 0 && block.getMaterial().isSolid(); + return block != Blocks.air && block.getBlockHardness(worldObj, x, y, z) >= 0 && !block.getMaterial().isLiquid() && block != Blocks.bedrock; } public int getOverdrive() { @@ -395,7 +417,7 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen } } - return Math.min(range, 26); + return Math.min(range, 25); } public int getFortune() {