diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index fa11e2615..d163610c5 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -77,6 +77,8 @@ public class ModBlocks { public static Block ore_cobalt; public static Block ore_cinnebar; public static Block ore_coltan; + + public static Block ore_bedrock_coltan; public static Block ore_nether_coal; public static Block ore_nether_smoldering; @@ -861,6 +863,7 @@ public class ModBlocks { public static final int guiID_machine_large_turbine = 100; public static Block machine_chungus; + public static Block machine_condenser; public static Block machine_tower_large; public static Block machine_deaerator; @@ -1287,6 +1290,8 @@ public class ModBlocks { ore_cobalt = new BlockOre(Material.rock).setBlockName("ore_cobalt").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_cobalt"); ore_cinnebar = new BlockOre(Material.rock).setBlockName("ore_cinnebar").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_cinnebar"); ore_coltan = new BlockOre(Material.rock).setBlockName("ore_coltan").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_coltan"); + + ore_bedrock_coltan = new BlockBedrockOre().setBlockName("ore_bedrock_coltan").setCreativeTab(MainRegistry.blockTab).setHardness(15.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_bedrock_coltan"); ore_oil = new BlockOre(Material.rock).setBlockName("ore_oil").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_oil"); ore_oil_empty = new BlockGeneric(Material.rock).setBlockName("ore_oil_empty").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":ore_oil_empty"); @@ -1965,6 +1970,7 @@ public class ModBlocks { machine_turbine = new MachineTurbine(Material.iron).setBlockName("machine_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_turbine"); machine_large_turbine = new MachineLargeTurbine(Material.iron).setBlockName("machine_large_turbine").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_large_turbine"); machine_chungus = new MachineChungus(Material.iron).setBlockName("machine_chungus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_chungus"); + machine_condenser = new MachineCondenser(Material.iron).setBlockName("machine_condenser").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":condenser"); machine_tower_large = new MachineTowerLarge(Material.iron).setBlockName("machine_tower_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_tower_large"); anvil_iron = new NTMAnvil(Material.iron, 1).setBlockName("anvil_iron").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":anvil_iron"); @@ -2167,6 +2173,9 @@ public class ModBlocks { GameRegistry.registerBlock(cluster_titanium, ItemBlockCluster.class, cluster_titanium.getUnlocalizedName()); GameRegistry.registerBlock(cluster_aluminium, ItemBlockCluster.class, cluster_aluminium.getUnlocalizedName()); + //Bedrock ores + GameRegistry.registerBlock(ore_bedrock_coltan, ore_bedrock_coltan.getUnlocalizedName()); + //Nice Meme GameRegistry.registerBlock(ore_coal_oil, ore_coal_oil.getUnlocalizedName()); GameRegistry.registerBlock(ore_coal_oil_burning, ore_coal_oil_burning.getUnlocalizedName()); @@ -2800,6 +2809,7 @@ public class ModBlocks { GameRegistry.registerBlock(machine_turbine, machine_turbine.getUnlocalizedName()); GameRegistry.registerBlock(machine_large_turbine, machine_large_turbine.getUnlocalizedName()); GameRegistry.registerBlock(machine_chungus, machine_chungus.getUnlocalizedName()); + GameRegistry.registerBlock(machine_condenser, machine_condenser.getUnlocalizedName()); GameRegistry.registerBlock(machine_tower_large, machine_tower_large.getUnlocalizedName()); GameRegistry.registerBlock(machine_deaerator, machine_deaerator.getUnlocalizedName()); GameRegistry.registerBlock(machine_waste_drum, machine_waste_drum.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/blocks/generic/BlockBedrockOre.java b/src/main/java/com/hbm/blocks/generic/BlockBedrockOre.java new file mode 100644 index 000000000..898f4d317 --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockBedrockOre.java @@ -0,0 +1,51 @@ +package com.hbm.blocks.generic; + +import com.hbm.blocks.ModBlocks; +import com.hbm.items.ModItems; + +import api.hbm.block.IDrillInteraction; +import api.hbm.block.IMiningDrill; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class BlockBedrockOre extends Block implements IDrillInteraction { + + public BlockBedrockOre() { + super(Material.rock); + } + + @Override + public boolean canBreak(World world, int x, int y, int z, int meta, IMiningDrill drill) { + return false; + } + + @Override + public ItemStack extractResource(World world, int x, int y, int z, int meta, IMiningDrill drill) { + + if(drill.getDrillRating() > 70) + return null; + + Item drop = this.getDrop(); + + if(drop == null) + return null; + + return world.rand.nextInt(50) == 0 ? new ItemStack(drop) : null; + } + + @Override + public float getRelativeHardness(World world, int x, int y, int z, int meta, IMiningDrill drill) { + return 30; + } + + private Item getDrop() { + + if(this == ModBlocks.ore_bedrock_coltan) + return ModItems.fragment_coltan; + + return null; + } +} diff --git a/src/main/java/com/hbm/blocks/generic/BlockOre.java b/src/main/java/com/hbm/blocks/generic/BlockOre.java index 5d78cbfed..58a129395 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockOre.java +++ b/src/main/java/com/hbm/blocks/generic/BlockOre.java @@ -4,6 +4,7 @@ import java.util.Random; import com.hbm.blocks.ModBlocks; import com.hbm.handler.radiation.ChunkRadiationManager; +import com.hbm.interfaces.Spaghetti; import com.hbm.items.ModItems; import com.hbm.potion.HbmPotion; import cpw.mods.fml.relauncher.Side; @@ -39,6 +40,7 @@ public class BlockOre extends Block { this.rad = rad; } + @Spaghetti("*throws up*") @Override public Item getItemDropped(int i, Random rand, int j) { if(this == ModBlocks.ore_fluorite || this == ModBlocks.basalt_fluorite) { diff --git a/src/main/java/com/hbm/blocks/machine/MachineChungus.java b/src/main/java/com/hbm/blocks/machine/MachineChungus.java index 0d45d9d0c..59e9a0728 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineChungus.java +++ b/src/main/java/com/hbm/blocks/machine/MachineChungus.java @@ -80,7 +80,7 @@ public class MachineChungus extends BlockDummyable { default: case ULTRAHOTSTEAM: entity.tanks[0].setTankType(FluidType.STEAM); - entity.tanks[1].setTankType(FluidType.WATER); + entity.tanks[1].setTankType(FluidType.SPENTSTEAM); entity.tanks[0].setFill(Math.min(entity.tanks[0].getFill() * 1000, entity.tanks[0].getMaxFill())); entity.tanks[1].setFill(0); break; diff --git a/src/main/java/com/hbm/blocks/machine/MachineCondenser.java b/src/main/java/com/hbm/blocks/machine/MachineCondenser.java new file mode 100644 index 000000000..c174e28e2 --- /dev/null +++ b/src/main/java/com/hbm/blocks/machine/MachineCondenser.java @@ -0,0 +1,20 @@ +package com.hbm.blocks.machine; + +import com.hbm.tileentity.machine.TileEntityCondenser; + +import net.minecraft.block.BlockContainer; +import net.minecraft.block.material.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class MachineCondenser extends BlockContainer { + + public MachineCondenser(Material mat) { + super(mat); + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + return new TileEntityCondenser(); + } +} diff --git a/src/main/java/com/hbm/config/GeneralConfig.java b/src/main/java/com/hbm/config/GeneralConfig.java index 158cfd0f7..c24240889 100644 --- a/src/main/java/com/hbm/config/GeneralConfig.java +++ b/src/main/java/com/hbm/config/GeneralConfig.java @@ -29,8 +29,15 @@ public class GeneralConfig { public static boolean enableCrosshairs = true; public static boolean enableBabyMode = false; public static boolean enableReflectorCompat = false; - + public static boolean enable528 = false; + public static boolean enable528ReasimBoilers = true; + public static boolean enable528ColtanDeposit = true; + public static boolean enable528ColtanSpawn = false; + public static boolean enable528BedrockDeposit = true; + public static boolean enable528BedrockSpawn = false; + public static int coltanRate = 2; + public static int bedrockRate = 50; public static void loadFromConfig(Configuration config) { @@ -60,9 +67,22 @@ public class GeneralConfig { enableCrosshairs = config.get(CATEGORY_GENERAL, "1.22_enableCrosshairs", true).getBoolean(true); enableBabyMode = config.get(CATEGORY_GENERAL, "1.23_enableBabyMode", false).getBoolean(false); enableReflectorCompat = config.get(CATEGORY_GENERAL, "1.24_enableReflectorCompat", false).getBoolean(false); - + final String CATEGORY_528 = "528"; - enable528 = config.get(CATEGORY_528, "enable528Mode", false).getBoolean(false); + + config.addCustomCategoryComment(CATEGORY_528, "CAUTION\n" + + "528 Mode: Please proceed with caution!\n" + + "528-Modus: Lassen Sie Vorsicht walten!\n" + + "способ-528: действовать с осторожностью!"); + + enable528 = CommonConfig.createConfigBool(config, CATEGORY_528, "enable528Mode", "The central toggle for 528 mode.", false); + enable528ReasimBoilers = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_forceReasimBoilers", "Keeps the RBMK dial for ReaSim boilers on, preventing use of non-ReaSim boiler columns and forcing the use of steam in-/outlets", true); + enable528ColtanDeposit = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableColtanDepsoit", "Enables the coltan deposit. A large amount of coltan will spawn around a single random location in the world.", true); + enable528ColtanSpawn = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableColtanSpawning", "Enables coltan ore as a random spawn in the world. Unlike the deposit option, coltan will not just spawn in one central location.", false); + enable528BedrockDeposit = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableBedrockDepsoit", "Enables bedrock coltan ores in the coltan deposit. These ores can be drilled to extract infinite coltan, albeit slowly.", true); + enable528BedrockSpawn = CommonConfig.createConfigBool(config, CATEGORY_528, "X528_enableBedrockSpawning", "Enables the bedrock coltan ores as a rare spawn. These will be rarely found anywhere in the world.", false); + coltanRate = CommonConfig.createConfigInt(config, CATEGORY_528, "X528_oreColtanFrequency", "Determines how many coltan ore veins are to be expected in a chunk. These values do not affect the frequency in deposits, and only apply if random coltan spanwing is enabled.", 2); + bedrockRate = CommonConfig.createConfigInt(config, CATEGORY_528, "X528_bedrockColtanFrequency", "Determines how often (1 in X) bedrock coltan ores spawn. Applies for both the bedrock ores in the coltan deposit (if applicable) and the random bedrock ores (if applicable)", 50); if(enable528) enableBabyMode = false; } diff --git a/src/main/java/com/hbm/handler/FluidTypeHandler.java b/src/main/java/com/hbm/handler/FluidTypeHandler.java index 19c4676d8..08bb52320 100644 --- a/src/main/java/com/hbm/handler/FluidTypeHandler.java +++ b/src/main/java/com/hbm/handler/FluidTypeHandler.java @@ -81,8 +81,9 @@ public class FluidTypeHandler { WASTEFLUID (0x544400, 0, 2, 2, 2, 0, 1, EnumSymbol.RADIATION, "hbmfluid.wastefluid", FluidTrait.NO_CONTAINER), WASTEGAS (0xB8B8B8, 1, 2, 2, 2, 0, 1, EnumSymbol.RADIATION, "hbmfluid.wastegas", FluidTrait.NO_CONTAINER), - + GASOLINE (0x445772, 2, 2, 2, 1, 2, 0, EnumSymbol.NONE, "hbmfluid.gasoline"), + SPENTSTEAM (0x445772, 3, 2, 2, 2, 0, 0, EnumSymbol.NONE, "hbmfluid.spentsteam", FluidTrait.NO_CONTAINER), PLASMA_DT (0xF7AFDE, 8, 1, 2, 0, 4, 0, EnumSymbol.RADIATION, "hbmfluid.plasma_dt", 3250, FluidTrait.NO_CONTAINER, FluidTrait.NO_ID), PLASMA_HD (0xF0ADF4, 9, 1, 2, 0, 4, 0, EnumSymbol.RADIATION, "hbmfluid.plasma_hd", 2500, FluidTrait.NO_CONTAINER, FluidTrait.NO_ID), diff --git a/src/main/java/com/hbm/handler/HazmatRegistry.java b/src/main/java/com/hbm/handler/HazmatRegistry.java index a808b624e..1193f63dc 100644 --- a/src/main/java/com/hbm/handler/HazmatRegistry.java +++ b/src/main/java/com/hbm/handler/HazmatRegistry.java @@ -32,10 +32,10 @@ public class HazmatRegistry { double alloy = 0.07D; // 15% double cobalt = 0.125D; // 25% - double hazYellow = 0.3D; // 50% - double hazRed = 0.7D; // 80% - double hazGray = 1.3D; // 95% - double paa = 1.3D; // 95% + double hazYellow = 0.6D; // 50% + double hazRed = 1.0D; // 90% + double hazGray = 2D; // 99% + double paa = 1.7D; // 97% double liquidator = 2D; // 99% double t45 = 1D; // 90% diff --git a/src/main/java/com/hbm/inventory/MachineRecipes.java b/src/main/java/com/hbm/inventory/MachineRecipes.java index 838aeb634..dbf676627 100644 --- a/src/main/java/com/hbm/inventory/MachineRecipes.java +++ b/src/main/java/com/hbm/inventory/MachineRecipes.java @@ -250,7 +250,7 @@ public class MachineRecipes { public static Object[] getTurbineOutput(FluidType type) { switch(type) { - case STEAM: return new Object[] { FluidType.WATER, 5, 500, 50 }; + case STEAM: return new Object[] { FluidType.SPENTSTEAM, 5, 500, 50 }; case HOTSTEAM: return new Object[] { FluidType.STEAM, 50, 5, 100 }; case SUPERHOTSTEAM: return new Object[] { FluidType.HOTSTEAM, 50, 5, 150 }; case ULTRAHOTSTEAM: return new Object[] { FluidType.SUPERHOTSTEAM, 50, 5, 250 }; diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index a36996a54..47739e8b4 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -4352,8 +4352,8 @@ public class ModItems { battery_potato = new ItemBattery(1000, 0, 100).setUnlocalizedName("battery_potato").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potato"); battery_potatos = new ItemPotatos(500000, 0, 100).setUnlocalizedName("battery_potatos").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_potatos"); - battery_su = new ItemBattery(500000, 0, 1000).setUnlocalizedName("battery_su").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su"); - battery_su_l = new ItemBattery(100000, 0, 1000).setUnlocalizedName("battery_su_l").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su_l"); + battery_su = new ItemBattery(50000, 0, 1000).setUnlocalizedName("battery_su").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su"); + battery_su_l = new ItemBattery(150000, 0, 1000).setUnlocalizedName("battery_su_l").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_su_l"); battery_steam = new ItemBattery(60000, 300, 6000).setUnlocalizedName("battery_steam").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_steam"); battery_steam_large = new ItemBattery(100000, 500, 10000).setUnlocalizedName("battery_steam_large").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":battery_steam_large"); hev_battery = new ItemFusionCore(150000).setUnlocalizedName("hev_battery").setMaxStackSize(4).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":hev_battery"); @@ -4363,8 +4363,8 @@ public class ModItems { fuse = new ItemCustomLore().setUnlocalizedName("fuse").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fuse"); redcoil_capacitor = new ItemCapacitor(10).setUnlocalizedName("redcoil_capacitor").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":redcoil_capacitor"); titanium_filter = new ItemCapacitor(6 * 60 * 60 * 20).setUnlocalizedName("titanium_filter").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":titanium_filter"); - screwdriver = new ItemTooling(ToolType.SCREWDRIVER).setUnlocalizedName("screwdriver").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":screwdriver"); - hand_drill = new ItemTooling(ToolType.HAND_DRILL).setUnlocalizedName("hand_drill").setMaxStackSize(1).setFull3D().setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":hand_drill"); + screwdriver = new ItemTooling(ToolType.SCREWDRIVER, 100).setUnlocalizedName("screwdriver").setTextureName(RefStrings.MODID + ":screwdriver"); + hand_drill = new ItemTooling(ToolType.HAND_DRILL, 100).setUnlocalizedName("hand_drill").setTextureName(RefStrings.MODID + ":hand_drill"); overfuse = new ItemCustomLore().setUnlocalizedName("overfuse").setMaxStackSize(1).setFull3D().setTextureName(RefStrings.MODID + ":overfuse"); arc_electrode = new ItemCustomLore().setUnlocalizedName("arc_electrode").setMaxDamage(250).setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setFull3D().setTextureName(RefStrings.MODID + ":arc_electrode"); arc_electrode_burnt = new Item().setUnlocalizedName("arc_electrode_burnt").setMaxStackSize(1).setFull3D().setTextureName(RefStrings.MODID + ":arc_electrode_burnt"); diff --git a/src/main/java/com/hbm/items/tool/ItemTooling.java b/src/main/java/com/hbm/items/tool/ItemTooling.java index 6520cec18..e0438232f 100644 --- a/src/main/java/com/hbm/items/tool/ItemTooling.java +++ b/src/main/java/com/hbm/items/tool/ItemTooling.java @@ -1,5 +1,7 @@ package com.hbm.items.tool; +import com.hbm.main.MainRegistry; + import api.hbm.block.IToolable; import api.hbm.block.IToolable.ToolType; import net.minecraft.block.Block; @@ -12,8 +14,12 @@ public class ItemTooling extends Item { ToolType type; - public ItemTooling(ToolType type) { + public ItemTooling(ToolType type, int durability) { this.type = type; + this.setMaxStackSize(1); + this.setFull3D(); + this.setCreativeTab(MainRegistry.controlTab); + this.setMaxDamage(durability); } @Override @@ -22,7 +28,13 @@ public class ItemTooling extends Item { Block b = world.getBlock(x, y, z); if(b instanceof IToolable) { - return ((IToolable)b).onScrew(world, player, x, y, z, side, fX, fY, fZ, this.type); + if(((IToolable)b).onScrew(world, player, x, y, z, side, fX, fY, fZ, this.type)) { + + if(this.getMaxDamage() > 0) + stack.damageItem(1, player); + + return true; + } } return false; diff --git a/src/main/java/com/hbm/lib/HbmWorldGen.java b/src/main/java/com/hbm/lib/HbmWorldGen.java index 3ad76fcee..47687d53b 100644 --- a/src/main/java/com/hbm/lib/HbmWorldGen.java +++ b/src/main/java/com/hbm/lib/HbmWorldGen.java @@ -109,12 +109,28 @@ public class HbmWorldGen implements IWorldGenerator { DepthDeposit.generateConditionOverworld(world, i, 0, 3, j, 5, 0.6D, ModBlocks.cluster_depth_tungsten, rand, 32); DepthDeposit.generateConditionOverworld(world, i, 0, 3, j, 5, 0.8D, ModBlocks.ore_depth_cinnebar, rand, 16); DepthDeposit.generateConditionOverworld(world, i, 0, 3, j, 5, 0.8D, ModBlocks.ore_depth_zirconium, rand, 16); + + if(GeneralConfig.enable528ColtanSpawn) { + DungeonToolbox.generateOre(world, rand, i, j, GeneralConfig.coltanRate, 4, 15, 40, ModBlocks.ore_coltan); + } Random colRand = new Random(world.getSeed() + 5); int colX = (int) (colRand.nextGaussian() * 1500); int colZ = (int) (colRand.nextGaussian() * 1500); int colRange = 750; + if((GeneralConfig.enable528BedrockSpawn || GeneralConfig.enable528BedrockDeposit) && rand.nextInt(GeneralConfig.bedrockRate) == 0) { + int x = i + rand.nextInt(16); + int z = j + rand.nextInt(16); + int y = rand.nextInt(4) + 1; + + if(GeneralConfig.enable528BedrockSpawn || (GeneralConfig.enable528BedrockDeposit && x <= colX + colRange && x >= colX - colRange && z <= colZ + colRange && z >= colZ - colRange)) { + if(world.getBlock(x, y, z).isReplaceableOreGen(world, x, y, z, Blocks.stone)) { + world.setBlock(x, y, z, ModBlocks.ore_bedrock_coltan); + } + } + } + for (int k = 0; k < 2; k++) { for(int r = 1; r <= 5; r++) { @@ -126,7 +142,6 @@ public class HbmWorldGen implements IWorldGenerator { if(randPosX <= colX + range && randPosX >= colX - range && randPosZ <= colZ + range && randPosZ >= colZ - range) { (new WorldGenMinable(ModBlocks.ore_coltan, 4)).generate(world, rand, randPosX, randPosY, randPosZ); - //(new WorldGenMinable(ModBlocks.stone_porous, 16)).generate(world, rand, randPosX, randPosY, randPosZ); } } } diff --git a/src/main/java/com/hbm/tileentity/TileMappings.java b/src/main/java/com/hbm/tileentity/TileMappings.java index 9649cac9f..b75df23a1 100644 --- a/src/main/java/com/hbm/tileentity/TileMappings.java +++ b/src/main/java/com/hbm/tileentity/TileMappings.java @@ -230,6 +230,7 @@ public class TileMappings { private static void putMachines() { //TODO: bring some order into this garbage dump + map.put(TileEntityCondenser.class, "tileentity_condenser"); map.put(TileEntityTowerLarge.class, "tileentity_cooling_tower_larger"); } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityChungus.java b/src/main/java/com/hbm/tileentity/machine/TileEntityChungus.java index 01e8d2ca9..64717761f 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityChungus.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityChungus.java @@ -42,7 +42,7 @@ public class TileEntityChungus extends TileEntity implements IFluidAcceptor, IFl tanks = new FluidTank[2]; tanks[0] = new FluidTank(FluidType.STEAM, 1000000000, 0); - tanks[1] = new FluidTank(FluidType.WATER, 1000000000, 1); + tanks[1] = new FluidTank(FluidType.SPENTSTEAM, 1000000000, 1); } @Override diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityCondenser.java b/src/main/java/com/hbm/tileentity/machine/TileEntityCondenser.java new file mode 100644 index 000000000..3a2b9f345 --- /dev/null +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityCondenser.java @@ -0,0 +1,140 @@ +package com.hbm.tileentity.machine; + +import java.util.ArrayList; +import java.util.List; + +import com.hbm.blocks.BlockDummyable; +import com.hbm.handler.FluidTypeHandler.FluidType; +import com.hbm.interfaces.IFluidAcceptor; +import com.hbm.interfaces.IFluidSource; +import com.hbm.inventory.FluidTank; +import com.hbm.lib.Library; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.common.util.ForgeDirection; + +public class TileEntityCondenser extends TileEntity implements IFluidAcceptor, IFluidSource { + + public int age = 0; + public FluidTank[] tanks; + public List list = new ArrayList(); + + public TileEntityCondenser() { + tanks = new FluidTank[2]; + tanks[0] = new FluidTank(FluidType.SPENTSTEAM, 100, 0); + tanks[1] = new FluidTank(FluidType.WATER, 100, 1); + } + + @Override + public void updateEntity() { + + if(!worldObj.isRemote) { + + age++; + if(age >= 2) { + age = 0; + } + + int convert = Math.min(tanks[0].getFill(), tanks[1].getMaxFill() - tanks[1].getFill()); + tanks[0].setFill(tanks[0].getFill() - convert); + tanks[1].setFill(tanks[1].getFill() + convert); + + fillFluidInit(tanks[1].getTankType()); + } + } + + @Override + public void readFromNBT(NBTTagCompound nbt) { + super.readFromNBT(nbt); + tanks[0].readFromNBT(nbt, "water"); + tanks[1].readFromNBT(nbt, "steam"); + } + + @Override + public void writeToNBT(NBTTagCompound nbt) { + super.writeToNBT(nbt); + tanks[0].writeToNBT(nbt, "water"); + tanks[1].writeToNBT(nbt, "steam"); + } + + @Override + public void fillFluidInit(FluidType type) { + + for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) + fillFluid(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ, getTact(), type); + } + + @Override + public void fillFluid(int x, int y, int z, boolean newTact, FluidType type) { + Library.transmitFluid(x, y, z, newTact, this, worldObj, type); + } + + @Override + public boolean getTact() { + if(age == 0) + { + return true; + } + + return false; + } + + @Override + public void setFluidFill(int i, FluidType type) { + if(type.name().equals(tanks[0].getTankType().name())) + tanks[0].setFill(i); + else if(type.name().equals(tanks[1].getTankType().name())) + tanks[1].setFill(i); + } + + @Override + public int getFluidFill(FluidType type) { + if(type.name().equals(tanks[0].getTankType().name())) + return tanks[0].getFill(); + else if(type.name().equals(tanks[1].getTankType().name())) + return tanks[1].getFill(); + + return 0; + } + + @Override + public int getMaxFluidFill(FluidType type) { + if(type.name().equals(tanks[0].getTankType().name())) + return tanks[0].getMaxFill(); + + return 0; + } + + @Override + public void setFillstate(int fill, int index) { + if(index < 2 && tanks[index] != null) + tanks[index].setFill(fill); + } + + @Override + public void setType(FluidType type, int index) { + if(index < 2 && tanks[index] != null) + tanks[index].setTankType(type); + } + + @Override + public List getTanks() { + List list = new ArrayList(); + list.add(tanks[0]); + list.add(tanks[1]); + + return list; + } + + @Override + public List getFluidList(FluidType type) { + return list; + } + + @Override + public void clearFluidList(FluidType type) { + list.clear(); + } +} diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineLargeTurbine.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineLargeTurbine.java index d154c3066..cdbb0d649 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineLargeTurbine.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineLargeTurbine.java @@ -40,7 +40,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme tanks = new FluidTank[2]; tanks[0] = new FluidTank(FluidType.STEAM, 512000, 0); - tanks[1] = new FluidTank(FluidType.WATER, 10240000, 1); + tanks[1] = new FluidTank(FluidType.SPENTSTEAM, 10240000, 1); } @Override diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbine.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbine.java index 8fe82d151..698a6d8bb 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbine.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbine.java @@ -45,7 +45,7 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent slots = new ItemStack[7]; tanks = new FluidTank[2]; tanks[0] = new FluidTank(FluidType.STEAM, 64000, 0); - tanks[1] = new FluidTank(FluidType.WATER, 128000, 1); + tanks[1] = new FluidTank(FluidType.SPENTSTEAM, 128000, 1); } @Override diff --git a/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java b/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java index e92703e72..d254e00d0 100644 --- a/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java +++ b/src/main/java/com/hbm/tileentity/machine/rbmk/RBMKDials.java @@ -194,7 +194,7 @@ public class RBMKDials { * @return */ public static boolean getReasimBoilers(World world) { - return world.getGameRules().getGameRuleBooleanValue(KEY_REASIM_BOILERS) || GeneralConfig.enable528; + return world.getGameRules().getGameRuleBooleanValue(KEY_REASIM_BOILERS) || (GeneralConfig.enable528 && GeneralConfig.enable528ReasimBoilers); } /** diff --git a/src/main/resources/assets/hbm/models/machines/uv_lamp.obj b/src/main/resources/assets/hbm/models/machines/uv_lamp.obj new file mode 100644 index 000000000..3147ef564 --- /dev/null +++ b/src/main/resources/assets/hbm/models/machines/uv_lamp.obj @@ -0,0 +1,314 @@ +# Blender v2.79 (sub 0) OBJ File: 'uv_lamp.blend' +# www.blender.org +o On +v -0.093750 0.125000 0.187500 +v 0.093750 0.125000 0.187500 +v -0.093750 0.125000 -0.187500 +v 0.093750 0.125000 -0.187500 +v 0.187500 0.125000 0.093750 +v 0.187500 0.125000 -0.093750 +v -0.187500 0.125000 0.093750 +v -0.187500 0.125000 -0.093750 +v -0.093750 1.875000 0.187500 +v 0.093750 1.875000 0.187500 +v -0.093750 1.875000 -0.187500 +v 0.093750 1.875000 -0.187500 +v 0.187500 1.875000 0.093750 +v 0.187500 1.875000 -0.093750 +v -0.187500 1.875000 0.093750 +v -0.187500 1.875000 -0.093750 +vt 0.771429 0.848485 +vt 0.685714 0.000000 +vt 0.771429 0.000000 +vt 0.685714 0.848485 +vt 0.657143 0.000000 +vt 0.685714 0.000000 +vt 0.771429 0.848485 +vt 0.771429 0.000000 +vt 0.657143 0.848485 +vt 0.657143 0.000000 +vt 0.771429 0.848485 +vt 0.685714 0.000000 +vt 0.771429 0.000000 +vt 0.771429 0.848485 +vt 0.685714 0.000000 +vt 0.771429 0.000000 +vt 0.685714 0.848485 +vt 0.657143 0.000000 +vt 0.657143 0.848485 +vt 0.657143 0.000000 +vt 0.685714 0.848485 +vt 0.657143 0.848485 +vt 0.685714 0.848485 +vt 0.657143 0.848485 +vn 0.0000 0.0000 1.0000 +vn 0.7071 0.0000 0.7071 +vn 1.0000 0.0000 0.0000 +vn -0.7071 0.0000 0.7071 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 0.0000 +vn -0.7071 0.0000 -0.7071 +vn 0.7071 0.0000 -0.7071 +s off +f 10/1/1 1/2/1 2/3/1 +f 13/4/2 2/5/2 5/6/2 +f 14/7/3 5/6/3 6/8/3 +f 1/2/4 15/9/4 7/10/4 +f 11/11/5 4/12/5 3/13/5 +f 15/14/6 8/15/6 7/16/6 +f 16/17/7 3/18/7 8/15/7 +f 4/12/8 14/19/8 6/20/8 +f 10/1/1 9/21/1 1/2/1 +f 13/4/2 10/22/2 2/5/2 +f 14/7/3 13/4/3 5/6/3 +f 1/2/4 9/21/4 15/9/4 +f 11/11/5 12/23/5 4/12/5 +f 15/14/6 16/17/6 8/15/6 +f 16/17/7 11/24/7 3/18/7 +f 4/12/8 12/23/8 14/19/8 +o Off +v -0.093750 0.125000 0.187500 +v 0.093750 0.125000 0.187500 +v -0.093750 0.125000 -0.187500 +v 0.093750 0.125000 -0.187500 +v 0.187500 0.125000 0.093750 +v 0.187500 0.125000 -0.093750 +v -0.187500 0.125000 0.093750 +v -0.187500 0.125000 -0.093750 +v -0.093750 1.875000 0.187500 +v 0.093750 1.875000 0.187500 +v -0.093750 1.875000 -0.187500 +v 0.093750 1.875000 -0.187500 +v 0.187500 1.875000 0.093750 +v 0.187500 1.875000 -0.093750 +v -0.187500 1.875000 0.093750 +v -0.187500 1.875000 -0.093750 +vt 0.657143 0.848485 +vt 0.571429 -0.000000 +vt 0.657143 -0.000000 +vt 0.571429 0.848485 +vt 0.542857 -0.000000 +vt 0.571429 -0.000000 +vt 0.657143 0.848485 +vt 0.657143 -0.000000 +vt 0.542857 0.848485 +vt 0.542857 -0.000000 +vt 0.657143 0.848485 +vt 0.571429 -0.000000 +vt 0.657143 -0.000000 +vt 0.657143 0.848485 +vt 0.571429 -0.000000 +vt 0.657143 -0.000000 +vt 0.571429 0.848485 +vt 0.542857 -0.000000 +vt 0.542857 0.848485 +vt 0.542857 -0.000000 +vt 0.571429 0.848485 +vt 0.542857 0.848485 +vt 0.571429 0.848485 +vt 0.542857 0.848485 +vn 0.0000 0.0000 1.0000 +vn 0.7071 0.0000 0.7071 +vn 1.0000 0.0000 0.0000 +vn -0.7071 0.0000 0.7071 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 0.0000 +vn -0.7071 0.0000 -0.7071 +vn 0.7071 0.0000 -0.7071 +s off +f 26/25/9 17/26/9 18/27/9 +f 29/28/10 18/29/10 21/30/10 +f 30/31/11 21/30/11 22/32/11 +f 17/26/12 31/33/12 23/34/12 +f 27/35/13 20/36/13 19/37/13 +f 31/38/14 24/39/14 23/40/14 +f 32/41/15 19/42/15 24/39/15 +f 20/36/16 30/43/16 22/44/16 +f 26/25/9 25/45/9 17/26/9 +f 29/28/10 26/46/10 18/29/10 +f 30/31/11 29/28/11 21/30/11 +f 17/26/12 25/45/12 31/33/12 +f 27/35/13 28/47/13 20/36/13 +f 31/38/14 32/41/14 24/39/14 +f 32/41/15 27/48/15 19/42/15 +f 20/36/16 28/47/16 30/43/16 +o UV +v -0.500000 0.000000 0.500000 +v 0.500000 0.000000 0.500000 +v -0.500000 0.000000 -0.500000 +v 0.500000 0.000000 -0.500000 +v -0.500000 0.062500 0.500000 +v 0.500000 0.062500 0.500000 +v -0.500000 0.062500 -0.500000 +v 0.500000 0.062500 -0.500000 +v -0.250000 0.062500 0.250000 +v 0.250000 0.062500 0.250000 +v -0.250000 0.062500 -0.250000 +v 0.250000 0.062500 -0.250000 +v -0.250000 0.125000 0.250000 +v 0.250000 0.125000 0.250000 +v -0.250000 0.125000 -0.250000 +v 0.250000 0.125000 -0.250000 +v -0.093750 0.125000 0.093750 +v 0.093750 0.125000 0.093750 +v -0.093750 0.125000 -0.093750 +v 0.093750 0.125000 -0.093750 +v -0.093750 1.875000 0.093750 +v 0.093750 1.875000 0.093750 +v -0.093750 1.875000 -0.093750 +v 0.093750 1.875000 -0.093750 +v -0.250000 1.875000 0.250000 +v 0.250000 1.875000 0.250000 +v -0.250000 1.875000 -0.250000 +v 0.250000 1.875000 -0.250000 +v -0.250000 1.937500 0.250000 +v 0.250000 1.937500 0.250000 +v -0.250000 1.937500 -0.250000 +v 0.250000 1.937500 -0.250000 +v -0.187500 2.000000 -0.187500 +v -0.187500 2.000000 0.187500 +v 0.187500 2.000000 0.187500 +v 0.187500 2.000000 -0.187500 +vt 0.457143 -0.000000 +vt -0.000000 0.484848 +vt -0.000000 -0.000000 +vt -0.000000 0.515152 +vt 0.457143 1.000000 +vt -0.000000 1.000000 +vt 0.457143 0.484848 +vt -0.000000 0.515152 +vt 0.457143 0.484848 +vt 0.457143 0.515152 +vt -0.000000 0.515152 +vt 0.457143 0.484848 +vt 0.457143 0.515152 +vt 0.457143 0.484848 +vt -0.000000 0.515152 +vt -0.000000 0.484848 +vt 0.771429 0.515152 +vt 1.000000 0.757576 +vt 0.771429 0.757576 +vt 0.771429 0.515152 +vt 1.000000 0.484848 +vt 1.000000 0.515152 +vt 1.000000 0.484848 +vt 0.771429 0.515152 +vt 0.771429 0.484848 +vt 1.000000 0.484848 +vt 0.771429 0.484848 +vt 0.771429 0.515152 +vt 1.000000 0.484848 +vt 1.000000 0.515152 +vt 0.542857 0.848485 +vt 0.457143 -0.000000 +vt 0.542857 -0.000000 +vt 0.542857 0.848485 +vt 0.457143 -0.000000 +vt 0.542857 -0.000000 +vt 0.542857 0.848485 +vt 0.457143 -0.000000 +vt 0.542857 -0.000000 +vt 0.542857 0.848485 +vt 0.457143 -0.000000 +vt 0.542857 -0.000000 +vt 1.000000 -0.000000 +vt 0.771429 0.242424 +vt 0.771429 0.000000 +vt 1.000000 0.272727 +vt 0.800000 0.303030 +vt 0.771429 0.272727 +vt 1.000000 0.242424 +vt 0.771429 0.272727 +vt 0.771429 0.242424 +vt 1.000000 0.242424 +vt 0.771429 0.272727 +vt 0.771429 0.242424 +vt 1.000000 0.242424 +vt 0.771429 0.272727 +vt 1.000000 0.242424 +vt 0.771429 0.242424 +vt 0.800000 0.303030 +vt 0.971429 0.484848 +vt 0.800000 0.484848 +vt 1.000000 0.272727 +vt 0.800000 0.303030 +vt 1.000000 0.272727 +vt 0.800000 0.303030 +vt 1.000000 0.272727 +vt 0.457143 0.515152 +vt -0.000000 0.484848 +vt -0.000000 0.484848 +vt 0.457143 0.515152 +vt 1.000000 0.515152 +vt 0.771429 0.484848 +vt 1.000000 0.515152 +vt 0.771429 0.484848 +vt 0.457143 0.848485 +vt 0.457143 0.848485 +vt 0.457143 0.848485 +vt 0.457143 0.848485 +vt 0.971429 0.303030 +vt 0.971429 0.303030 +vt 0.971429 0.303030 +vt 0.971429 0.303030 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 0.0000 1.0000 +vn -0.7071 0.7071 0.0000 +vn 0.0000 0.7071 -0.7071 +vn 0.0000 0.7071 0.7071 +vn 0.7071 0.7071 0.0000 +s off +f 35/49/17 34/50/17 33/51/17 +f 38/52/18 39/53/18 37/54/18 +f 36/55/19 38/52/19 34/50/19 +f 33/56/20 39/57/20 35/58/20 +f 35/59/21 40/60/21 36/61/21 +f 34/62/22 37/63/22 33/64/22 +f 46/65/18 47/66/18 45/67/18 +f 43/68/21 48/69/21 44/70/21 +f 42/71/22 45/72/22 41/73/22 +f 44/74/19 46/65/19 42/75/19 +f 41/76/20 47/77/20 43/78/20 +f 53/79/20 51/80/20 49/81/20 +f 54/82/22 49/83/22 50/84/22 +f 56/85/19 50/86/19 52/87/19 +f 55/88/21 52/89/21 51/90/21 +f 59/91/17 58/92/17 57/93/17 +f 61/94/23 65/95/23 63/96/23 +f 59/97/21 64/98/21 60/99/21 +f 58/100/22 61/101/22 57/102/22 +f 60/103/19 62/104/19 58/92/19 +f 57/105/20 63/96/20 59/106/20 +f 67/107/18 65/108/18 66/109/18 +f 63/110/24 68/111/24 64/98/24 +f 62/112/25 66/113/25 61/101/25 +f 64/114/26 67/107/26 62/104/26 +f 35/49/17 36/55/17 34/50/17 +f 38/52/18 40/115/18 39/53/18 +f 36/55/19 40/115/19 38/52/19 +f 33/56/20 37/116/20 39/57/20 +f 35/59/21 39/117/21 40/60/21 +f 34/62/22 38/118/22 37/63/22 +f 46/65/18 48/119/18 47/66/18 +f 43/68/21 47/120/21 48/69/21 +f 42/71/22 46/121/22 45/72/22 +f 44/74/19 48/119/19 46/65/19 +f 41/76/20 45/122/20 47/77/20 +f 53/79/20 55/123/20 51/80/20 +f 54/82/22 53/124/22 49/83/22 +f 56/85/19 54/125/19 50/86/19 +f 55/88/21 56/126/21 52/89/21 +f 59/91/17 60/103/17 58/92/17 +f 61/94/23 66/127/23 65/95/23 +f 59/97/21 63/110/21 64/98/21 +f 58/100/22 62/112/22 61/101/22 +f 60/103/19 64/114/19 62/104/19 +f 57/105/20 61/94/20 63/96/20 +f 67/107/18 68/128/18 65/108/18 +f 63/110/24 65/129/24 68/111/24 +f 62/112/25 67/130/25 66/113/25 +f 64/114/26 68/128/26 67/107/26 diff --git a/src/main/resources/assets/hbm/textures/blocks/condenser.png b/src/main/resources/assets/hbm/textures/blocks/condenser.png new file mode 100644 index 000000000..935ed98cb Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/condenser.png differ diff --git a/src/main/resources/assets/hbm/textures/blocks/ore_bedrock_coltan.png b/src/main/resources/assets/hbm/textures/blocks/ore_bedrock_coltan.png new file mode 100644 index 000000000..1e7670774 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/blocks/ore_bedrock_coltan.png differ diff --git a/src/main/resources/assets/hbm/textures/gui/fluids2.png b/src/main/resources/assets/hbm/textures/gui/fluids2.png index 641b40913..4cb3ffb23 100755 Binary files a/src/main/resources/assets/hbm/textures/gui/fluids2.png and b/src/main/resources/assets/hbm/textures/gui/fluids2.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/uv_lamp.png b/src/main/resources/assets/hbm/textures/models/machines/uv_lamp.png new file mode 100644 index 000000000..73af545d4 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/uv_lamp.png differ