diff --git a/changelog b/changelog index 3b57b26e4..9862d630b 100644 --- a/changelog +++ b/changelog @@ -14,6 +14,10 @@ * Valid PWR coolant * Has a high flux multiplication rate, boosting fuels * After cooling, the depleted salt has to be reprocessed using a chemical plant +* Creative stirling engine + * A stirling engine with 100% efficiency and no heat cap + * Still has the 10% delta-T heat transfer rate as the other stirlings + * Great for quickly benchmarking reactors without needing to set up a turbine cycle ## Changed * Bedrock fluorite ore now yields actual ore instead of fluorite directly diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index ecd81f4fd..72da33957 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -675,6 +675,7 @@ public class ModBlocks { public static Block furnace_combination; public static Block machine_stirling; public static Block machine_stirling_steel; + public static Block machine_stirling_creative; public static Block machine_sawmill; public static Block machine_crucible; public static Block machine_boiler; @@ -1835,6 +1836,7 @@ public class ModBlocks { furnace_combination = new FurnaceCombination().setBlockName("furnace_combination").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":brick_light_alt"); machine_stirling = new MachineStirling().setBlockName("machine_stirling").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_stirling_steel = new MachineStirling().setBlockName("machine_stirling_steel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); + machine_stirling_creative = new MachineStirling().setBlockName("machine_stirling_creative").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_sawmill = new MachineSawmill().setBlockName("machine_sawmill").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel"); machine_crucible = new MachineCrucible().setBlockName("machine_crucible").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":brick_fire"); machine_boiler = new MachineHeatBoiler().setBlockName("machine_boiler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_copper"); @@ -2056,7 +2058,7 @@ public class ModBlocks { pwr_casing = new BlockGenericPWR(Material.iron).setBlockName("pwr_casing").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pwr_casing"); pwr_port = new BlockGenericPWR(Material.iron).setBlockName("pwr_port").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pwr_port"); pwr_controller = new MachinePWRController(Material.iron).setBlockName("pwr_controller").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pwr_casing_blank"); - pwr_block = new BlockPWR(Material.iron).setBlockName("pwr_block").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pwr_block"); + pwr_block = new BlockPWR(Material.iron).setBlockName("pwr_block").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pwr_block"); reactor_element = new BlockPillar(Material.iron, RefStrings.MODID + ":reactor_element_top", RefStrings.MODID + ":reactor_element_base").setBlockName("reactor_element").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":reactor_element_side"); reactor_control = new BlockPillar(Material.iron, RefStrings.MODID + ":reactor_control_top").setBlockName("reactor_control").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":reactor_control_side"); @@ -3099,6 +3101,7 @@ public class ModBlocks { register(furnace_combination); register(machine_stirling); register(machine_stirling_steel); + register(machine_stirling_creative); register(machine_sawmill); register(machine_crucible); register(machine_boiler); diff --git a/src/main/java/com/hbm/blocks/machine/MachineStirling.java b/src/main/java/com/hbm/blocks/machine/MachineStirling.java index 800b7f361..3cdfde1e7 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineStirling.java +++ b/src/main/java/com/hbm/blocks/machine/MachineStirling.java @@ -7,6 +7,7 @@ import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.IBlockMulti; import com.hbm.blocks.ILookOverlay; import com.hbm.blocks.ITooltipProvider; +import com.hbm.blocks.ModBlocks; import com.hbm.items.ModItems; import com.hbm.tileentity.TileEntityProxyCombo; import com.hbm.tileentity.machine.TileEntityStirling; @@ -156,26 +157,28 @@ public class MachineStirling extends BlockDummyable implements ILookOverlay, ITo return; TileEntityStirling stirling = (TileEntityStirling) te; - int maxHeat = stirling.maxHeat(); List text = new ArrayList(); text.add(stirling.heat + "TU/t"); text.add((stirling.hasCog ? stirling.powerBuffer : 0) + "HE/t"); - double percent = (double) stirling.heat / (double) maxHeat; - int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8); - - if(percent > 1D) - color = 0xff0000; - - text.add("&[" + color + "&]" + ((stirling.heat * 1000 / maxHeat) / 10D) + "%"); - - if(stirling.heat > maxHeat) { - text.add("&[" + (BobMathUtil.getBlink() ? 0xff0000 : 0xffff00) + "&]! ! ! OVERSPEED ! ! !"); - } - - if(!stirling.hasCog) { - text.add("&[" + 0xff0000 + "&]Gear missing!"); + if(this != ModBlocks.machine_stirling_creative) { + int maxHeat = stirling.maxHeat(); + double percent = (double) stirling.heat / (double) maxHeat; + int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8); + + if(percent > 1D) + color = 0xff0000; + + text.add("&[" + color + "&]" + ((stirling.heat * 1000 / maxHeat) / 10D) + "%"); + + if(stirling.heat > maxHeat) { + text.add("&[" + (BobMathUtil.getBlink() ? 0xff0000 : 0xffff00) + "&]! ! ! OVERSPEED ! ! !"); + } + + if(!stirling.hasCog) { + text.add("&[" + 0xff0000 + "&]Gear missing!"); + } } ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text); diff --git a/src/main/java/com/hbm/inventory/gui/GUIMachinePress.java b/src/main/java/com/hbm/inventory/gui/GUIMachinePress.java index 19d1e30fb..63e98642b 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIMachinePress.java +++ b/src/main/java/com/hbm/inventory/gui/GUIMachinePress.java @@ -4,6 +4,7 @@ import org.lwjgl.opengl.GL11; import com.hbm.inventory.container.ContainerMachinePress; import com.hbm.lib.RefStrings; +import com.hbm.render.util.GaugeUtil; import com.hbm.tileentity.machine.TileEntityMachinePress; import net.minecraft.client.Minecraft; @@ -46,14 +47,14 @@ public class GUIMachinePress extends GuiInfoContainer { Minecraft.getMinecraft().getTextureManager().bindTexture(texture); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); - int i = press.speed * 12 / press.maxSpeed; - drawTexturedModalRect(guiLeft + 25, guiTop + 16, 176, 14 + 18 * i, 18, 18); - if(press.burnTime >= 20) { this.drawTexturedModalRect(guiLeft + 27, guiTop + 36, 176, 0, 14, 14); } int k = (int) (press.renderPress * 16 / press.maxPress); this.drawTexturedModalRect(guiLeft + 79, guiTop + 35, 194, 0, 18, k); + + double i = (double) press.speed / (double) press.maxSpeed; + GaugeUtil.drawSmoothGauge(guiLeft + 34, guiTop + 25, this.zLevel, i, 5, 2, 1, 0x7f0000); } } diff --git a/src/main/java/com/hbm/inventory/gui/GUIPWR.java b/src/main/java/com/hbm/inventory/gui/GUIPWR.java index 1b88a5084..d8549a9e4 100644 --- a/src/main/java/com/hbm/inventory/gui/GUIPWR.java +++ b/src/main/java/com/hbm/inventory/gui/GUIPWR.java @@ -9,6 +9,7 @@ import com.hbm.items.ModItems; import com.hbm.lib.RefStrings; import com.hbm.packet.NBTControlPacket; import com.hbm.packet.PacketDispatcher; +import com.hbm.render.util.GaugeUtil; import com.hbm.tileentity.machine.TileEntityPWRController; import net.minecraft.client.Minecraft; @@ -16,7 +17,6 @@ import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; @@ -24,7 +24,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; -import net.minecraft.util.Vec3; public class GUIPWR extends GuiInfoContainer { @@ -121,8 +120,8 @@ public class GUIPWR extends GuiInfoContainer { //GaugeUtil.renderGauge(Gauge.ROUND_SMALL, guiLeft + 115, guiTop + 31, this.zLevel, (double) controller.coreHeat / (double) controller.coreHeatCapacity); //GaugeUtil.renderGauge(Gauge.ROUND_SMALL, guiLeft + 151, guiTop + 31, this.zLevel, (double) controller.hullHeat / (double) controller.hullHeatCapacity); - drawGauge(guiLeft + 124, guiTop + 40, (double) controller.coreHeat / (double) controller.coreHeatCapacity); - drawGauge(guiLeft + 160, guiTop + 40, (double) controller.hullHeat / (double) controller.hullHeatCapacity); + GaugeUtil.drawSmoothGauge(guiLeft + 124, guiTop + 40, this.zLevel, (double) controller.coreHeat / (double) controller.coreHeatCapacity, 5, 2, 1, 0x7F0000); + GaugeUtil.drawSmoothGauge(guiLeft + 160, guiTop + 40, this.zLevel, (double) controller.hullHeat / (double) controller.hullHeatCapacity, 5, 2, 1, 0x7F0000); if(controller.typeLoaded != -1 && controller.amountLoaded > 0) { ItemStack display = new ItemStack(ModItems.pwr_fuel, 1, controller.typeLoaded); @@ -139,7 +138,7 @@ public class GUIPWR extends GuiInfoContainer { this.field.drawTextBox(); } - private void drawGauge(int x, int y, double d) { + /*private void drawGauge(int x, int y, double d) { GL11.glDisable(GL11.GL_TEXTURE_2D); d = MathHelper.clamp_double(d, 0, 1); @@ -168,7 +167,7 @@ public class GUIPWR extends GuiInfoContainer { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glEnable(GL11.GL_TEXTURE_2D); - } + }*/ @Override protected void mouseClicked(int mouseX, int mouseY, int i) { diff --git a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java index 4f2bfe922..ae66e0670 100644 --- a/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/CentrifugeRecipes.java @@ -22,6 +22,7 @@ import com.hbm.inventory.RecipesCommon.OreDictStack; import com.hbm.inventory.recipes.loader.SerializableRecipe; import com.hbm.items.ItemEnums.EnumAshType; import com.hbm.items.ModItems; +import com.hbm.items.machine.ItemPWRFuel.EnumPWRFuel; import com.hbm.items.machine.ItemWatzPellet.EnumWatzType; import com.hbm.items.special.ItemBedrockOre.EnumBedrockOre; import com.hbm.items.special.ItemByproduct.EnumByproduct; @@ -188,6 +189,82 @@ public class CentrifugeRecipes extends SerializableRecipe { new ItemStack(ModItems.nugget_polonium, 12), new ItemStack(ModItems.nugget_pu238, 6), new ItemStack(ModItems.nuclear_waste, 2) }); + + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.MEU)), new ItemStack[] { + new ItemStack(ModItems.nugget_u238, 3), + new ItemStack(ModItems.nugget_plutonium, 4), + new ItemStack(ModItems.nugget_technetium, 2), + new ItemStack(ModItems.nuclear_waste_tiny, 3) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.HEU233)), new ItemStack[] { + new ItemStack(ModItems.nugget_u235, 3), + new ItemStack(ModItems.nugget_pu238, 3), + new ItemStack(ModItems.nugget_technetium, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 5) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.HEU235)), new ItemStack[] { + new ItemStack(ModItems.nugget_neptunium, 3), + new ItemStack(ModItems.nugget_pu238, 3), + new ItemStack(ModItems.nugget_technetium, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 5) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.MEN)), new ItemStack[] { + new ItemStack(ModItems.nugget_u238, 3), + new ItemStack(ModItems.nugget_pu239, 4), + new ItemStack(ModItems.nugget_technetium, 2), + new ItemStack(ModItems.nuclear_waste_tiny, 3) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.HEN237)), new ItemStack[] { + new ItemStack(ModItems.nugget_pu238, 2), + new ItemStack(ModItems.nugget_pu239, 4), + new ItemStack(ModItems.nugget_technetium, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 5) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.MOX)), new ItemStack[] { + new ItemStack(ModItems.nugget_u238, 3), + new ItemStack(ModItems.nugget_pu240, 4), + new ItemStack(ModItems.nugget_technetium, 2), + new ItemStack(ModItems.nuclear_waste_tiny, 3) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.MEP)), new ItemStack[] { + new ItemStack(ModItems.nugget_lead, 2), + new ItemStack(ModItems.nugget_pu_mix, 4), + new ItemStack(ModItems.nugget_technetium, 2), + new ItemStack(ModItems.nuclear_waste_tiny, 3) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.HEP239)), new ItemStack[] { + new ItemStack(ModItems.nugget_pu_mix, 2), + new ItemStack(ModItems.nugget_pu240, 4), + new ItemStack(ModItems.nugget_technetium, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 5) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.HEP241)), new ItemStack[] { + new ItemStack(ModItems.nugget_lead, 3), + new ItemStack(ModItems.nugget_zirconium, 2), + new ItemStack(ModItems.nugget_technetium, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 6) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.MEA)), new ItemStack[] { + new ItemStack(ModItems.nugget_lead, 3), + new ItemStack(ModItems.nugget_zirconium, 2), + new ItemStack(ModItems.nugget_technetium, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 6) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.HEA242)), new ItemStack[] { + new ItemStack(ModItems.nugget_lead, 3), + new ItemStack(ModItems.nugget_zirconium, 2), + new ItemStack(ModItems.nugget_technetium, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 6) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.HES326)), new ItemStack[] { + new ItemStack(ModItems.nugget_solinium, 3), + new ItemStack(ModItems.nugget_lead, 2), + new ItemStack(ModItems.nugget_euphemium, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 6) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.HES327)), new ItemStack[] { + new ItemStack(ModItems.nugget_australium, 4), + new ItemStack(ModItems.nugget_lead, 1), + new ItemStack(ModItems.nugget_euphemium, 1), + new ItemStack(ModItems.nuclear_waste_tiny, 6) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.BFB_AM_MIX)), new ItemStack[] { + new ItemStack(ModItems.nugget_am_mix, 4), + new ItemStack(ModItems.nugget_pu_mix, 1), + new ItemStack(ModItems.nugget_bismuth, 6), + new ItemStack(ModItems.nuclear_waste_tiny, 1) }); + recipes.put(new ComparableStack(DictFrame.fromOne(ModItems.pwr_fuel_depleted, EnumPWRFuel.BFB_PU241)), new ItemStack[] { + new ItemStack(ModItems.nugget_pu241, 4), + new ItemStack(ModItems.nugget_pu_mix, 1), + new ItemStack(ModItems.nugget_bismuth, 6), + new ItemStack(ModItems.nuclear_waste_tiny, 1) }); ArrayList naquadriaNuggets = OreDictionary.getOres("nuggetNaquadria"); if(naquadriaNuggets.size() != 0) { @@ -452,7 +529,7 @@ public class CentrifugeRecipes extends SerializableRecipe { recipes.put(new ComparableStack(ModItems.crystal_iron), new ItemStack[] { new ItemStack(ModItems.powder_iron, 2), new ItemStack(ModItems.powder_iron, 2), new ItemStack(ModItems.powder_titanium, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) }); recipes.put(new ComparableStack(ModItems.crystal_gold), new ItemStack[] { new ItemStack(ModItems.powder_gold, 2), new ItemStack(ModItems.powder_gold, 2), new ItemStack(ModItems.ingot_mercury, 1), new ItemStack(ModItems.powder_lithium_tiny, 1) }); recipes.put(new ComparableStack(ModItems.crystal_redstone), new ItemStack[] { new ItemStack(Items.redstone, 3), new ItemStack(Items.redstone, 3), new ItemStack(Items.redstone, 3), new ItemStack(ModItems.ingot_mercury, 3) }); - recipes.put(new ComparableStack(ModItems.crystal_lapis), new ItemStack[] { new ItemStack(ModItems.powder_lapis, 4), new ItemStack(ModItems.powder_lapis, 4), new ItemStack(ModItems.powder_cobalt, 1), new ItemStack(ModItems.gem_sodalite, 1) }); + recipes.put(new ComparableStack(ModItems.crystal_lapis), new ItemStack[] { new ItemStack(ModItems.powder_lapis, 4), new ItemStack(ModItems.powder_lapis, 4), new ItemStack(ModItems.powder_cobalt, 1), new ItemStack(ModItems.gem_sodalite, 2) }); recipes.put(new ComparableStack(ModItems.crystal_diamond), new ItemStack[] { new ItemStack(ModItems.powder_diamond, 1), new ItemStack(ModItems.powder_diamond, 1), new ItemStack(ModItems.powder_diamond, 1), new ItemStack(ModItems.powder_diamond, 1) }); recipes.put(new ComparableStack(ModItems.crystal_uranium), new ItemStack[] { new ItemStack(ModItems.powder_uranium, 2), new ItemStack(ModItems.powder_uranium, 2), new ItemStack(ModItems.nugget_ra226, 2), new ItemStack(ModItems.powder_lithium_tiny, 1) }); recipes.put(new ComparableStack(ModItems.crystal_thorium), new ItemStack[] { new ItemStack(ModItems.powder_thorium, 2), new ItemStack(ModItems.powder_thorium, 2), new ItemStack(ModItems.powder_uranium, 1), new ItemStack(ModItems.nugget_ra226, 1) }); diff --git a/src/main/java/com/hbm/items/machine/ItemPWRFuel.java b/src/main/java/com/hbm/items/machine/ItemPWRFuel.java index d60aca579..db802776a 100644 --- a/src/main/java/com/hbm/items/machine/ItemPWRFuel.java +++ b/src/main/java/com/hbm/items/machine/ItemPWRFuel.java @@ -19,28 +19,34 @@ public class ItemPWRFuel extends ItemEnumMulti { } public static enum EnumPWRFuel { - MEU( 05.0D, new FunctionLogarithmic(25)), - HEU233( 07.5D, new FunctionSqrt(25)), - HEU235( 07.5D, new FunctionSqrt(25)), - MEN( 07.5D, new FunctionLogarithmic(25)), - HEN237( 07.5D, new FunctionSqrt(25)), - MOX( 07.5D, new FunctionLogarithmic(25)), - MEP( 07.5D, new FunctionLogarithmic(25)), - HEP239( 10.0D, new FunctionSqrt(25)), - HEP241( 10.0D, new FunctionSqrt(25)), - MEA( 07.5D, new FunctionLogarithmic(25)), - HEA242( 10.0D, new FunctionSqrt(25)), - HES326( 15.0D, new FunctionSqrt(25)), - HES327( 15.0D, new FunctionSqrt(25)); + MEU( 05.0D, new FunctionLogarithmic(20 * 30).withDiv(2_500)), + HEU233( 07.5D, new FunctionSqrt(25)), + HEU235( 07.5D, new FunctionSqrt(22.5)), + MEN( 07.5D, new FunctionLogarithmic(22.5 * 30).withDiv(2_500)), + HEN237( 07.5D, new FunctionSqrt(27.5)), + MOX( 07.5D, new FunctionLogarithmic(20 * 30).withDiv(2_500)), + MEP( 07.5D, new FunctionLogarithmic(22.5 * 30).withDiv(2_500)), + HEP239( 10.0D, new FunctionSqrt(22.5)), + HEP241( 10.0D, new FunctionSqrt(25)), + MEA( 07.5D, new FunctionLogarithmic(25 * 30).withDiv(2_500)), + HEA242( 10.0D, new FunctionSqrt(25)), + HES326( 12.5D, new FunctionSqrt(27.5)), + HES327( 12.5D, new FunctionSqrt(30)), + BFB_AM_MIX( 2.5D, new FunctionSqrt(15), 250_000_000), + BFB_PU241( 2.5D, new FunctionSqrt(15), 250_000_000); public double yield = 1_000_000_000; public double heatEmission; public Function function; - private EnumPWRFuel(double heatEmission, Function function) { + private EnumPWRFuel(double heatEmission, Function function, double yield) { this.heatEmission = heatEmission; this.function = function; } + + private EnumPWRFuel(double heatEmission, Function function) { + this(heatEmission, function, 1_000_000_000); + } } @Override diff --git a/src/main/java/com/hbm/main/ResourceManager.java b/src/main/java/com/hbm/main/ResourceManager.java index 5959f4f48..fcda9054a 100644 --- a/src/main/java/com/hbm/main/ResourceManager.java +++ b/src/main/java/com/hbm/main/ResourceManager.java @@ -398,6 +398,7 @@ public class ResourceManager { //Heat Engines public static final ResourceLocation stirling_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/stirling.png"); public static final ResourceLocation stirling_steel_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/stirling_steel.png"); + public static final ResourceLocation stirling_creative_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/stirling_creative.png"); public static final ResourceLocation sawmill_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/sawmill.png"); public static final ResourceLocation crucible_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/crucible_heat.png"); public static final ResourceLocation boiler_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/boiler.png"); diff --git a/src/main/java/com/hbm/render/tileentity/RenderStirling.java b/src/main/java/com/hbm/render/tileentity/RenderStirling.java index d1544382d..3957f074e 100644 --- a/src/main/java/com/hbm/render/tileentity/RenderStirling.java +++ b/src/main/java/com/hbm/render/tileentity/RenderStirling.java @@ -47,6 +47,8 @@ public class RenderStirling extends TileEntitySpecialRenderer implements IItemRe if(type == 0) bindTexture(ResourceManager.stirling_tex); + else if(type == 2) + bindTexture(ResourceManager.stirling_creative_tex); else bindTexture(ResourceManager.stirling_steel_tex); @@ -86,7 +88,8 @@ public class RenderStirling extends TileEntitySpecialRenderer implements IItemRe public Item[] getItemsForRenderer() { return new Item[] { Item.getItemFromBlock(ModBlocks.machine_stirling), - Item.getItemFromBlock(ModBlocks.machine_stirling_steel) + Item.getItemFromBlock(ModBlocks.machine_stirling_steel), + Item.getItemFromBlock(ModBlocks.machine_stirling_creative) }; } @@ -100,7 +103,7 @@ public class RenderStirling extends TileEntitySpecialRenderer implements IItemRe public void renderCommonWithStack(ItemStack item) { GL11.glRotatef(90, 0F, 1F, 0F); boolean cog = item.getItemDamage() != 1; - RenderStirling.this.renderCommon(cog ? System.currentTimeMillis() % 3600 * 0.1F : 0, cog, item.getItem() == Item.getItemFromBlock(ModBlocks.machine_stirling) ? 0 : 1); + RenderStirling.this.renderCommon(cog ? System.currentTimeMillis() % 3600 * 0.1F : 0, cog, item.getItem() == Item.getItemFromBlock(ModBlocks.machine_stirling) ? 0 : item.getItem() == Item.getItemFromBlock(ModBlocks.machine_stirling_creative) ? 2 : 1); }}; } diff --git a/src/main/java/com/hbm/render/util/GaugeUtil.java b/src/main/java/com/hbm/render/util/GaugeUtil.java index e31455bac..751edabdf 100644 --- a/src/main/java/com/hbm/render/util/GaugeUtil.java +++ b/src/main/java/com/hbm/render/util/GaugeUtil.java @@ -1,10 +1,14 @@ package com.hbm.render.util; +import org.lwjgl.opengl.GL11; + import com.hbm.lib.RefStrings; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Vec3; public class GaugeUtil { @@ -55,5 +59,35 @@ public class GaugeUtil { tess.addVertexWithUV(x, y, z, 0, frameOffset); tess.draw(); } + + public static void drawSmoothGauge(int x, int y, double z, double progress, double tipLength, double backLength, double backSide, int color) { + GL11.glDisable(GL11.GL_TEXTURE_2D); + + progress = MathHelper.clamp_double(progress, 0, 1); + + float angle = (float) Math.toRadians(-progress * 270 - 45); + Vec3 tip = Vec3.createVectorHelper(0, tipLength, 0); + Vec3 left = Vec3.createVectorHelper(backSide, -backLength, 0); + Vec3 right = Vec3.createVectorHelper(-backSide, -backLength, 0); + tip.rotateAroundZ(angle); + left.rotateAroundZ(angle); + right.rotateAroundZ(angle); + + Tessellator tess = Tessellator.instance; + tess.startDrawing(GL11.GL_TRIANGLES); + tess.setColorOpaque_F(0F, 0F, 0F); + double mult = 1.5; + tess.addVertex(x + tip.xCoord * mult, y + tip.yCoord * mult, z); + tess.addVertex(x + left.xCoord * mult, y + left.yCoord * mult, z); + tess.addVertex(x + right.xCoord * mult, y + right.yCoord * mult, z); + tess.setColorOpaque_I(color); + tess.addVertex(x + tip.xCoord, y + tip.yCoord, z); + tess.addVertex(x + left.xCoord, y + left.yCoord, z); + tess.addVertex(x + right.xCoord, y + right.yCoord, z); + tess.draw(); + + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glEnable(GL11.GL_TEXTURE_2D); + } } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityPWRController.java b/src/main/java/com/hbm/tileentity/machine/TileEntityPWRController.java index 2e92c1ad9..0b488f113 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityPWRController.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityPWRController.java @@ -131,13 +131,13 @@ public class TileEntityPWRController extends TileEntityMachineBase implements IG connections = connectionsDouble / 2; connectionsControlled = connectionsControlledDouble / 2; - System.out.println("Finalized nuclear reactor!"); + /*System.out.println("Finalized nuclear reactor!"); System.out.println("Rods: " + rodCount); System.out.println("Connections: " + connections); System.out.println("Controlled connections: " + connectionsControlled); System.out.println("Heatex: " + heatexCount); System.out.println("Channels: " + channelCount); - System.out.println("Sources: " + sourceCount); + System.out.println("Sources: " + sourceCount);*/ } @Override diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityStirling.java b/src/main/java/com/hbm/tileentity/machine/TileEntityStirling.java index 19ecdf379..fc2560845 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityStirling.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityStirling.java @@ -48,12 +48,12 @@ public class TileEntityStirling extends TileEntityLoadedBase implements INBTPack if(hasCog) { tryPullHeat(); - this.powerBuffer = (long) (this.heat * this.efficiency); + this.powerBuffer = (long) (this.heat * (this.isCreative() ? 1 : this.efficiency)); if(warnCooldown > 0) warnCooldown--; - if(heat > maxHeat()) { + if(heat > maxHeat() && !isCreative()) { this.overspeed++; @@ -109,6 +109,8 @@ public class TileEntityStirling extends TileEntityLoadedBase implements INBTPack float momentum = powerBuffer * 50F / ((float) maxHeat()); + if(this.isCreative()) momentum = Math.min(momentum, 45F); + this.lastSpin = this.spin; this.spin += momentum; @@ -120,13 +122,17 @@ public class TileEntityStirling extends TileEntityLoadedBase implements INBTPack } public int getGeatMeta() { - return this.getBlockType() == ModBlocks.machine_stirling ? 0 : 1; + return this.getBlockType() == ModBlocks.machine_stirling ? 0 : this.getBlockType() == ModBlocks.machine_stirling_creative ? 2 : 1; } public int maxHeat() { return this.getBlockType() == ModBlocks.machine_stirling ? 300 : 1500; } + public boolean isCreative() { + return this.getBlockType() == ModBlocks.machine_stirling_creative; + } + protected DirPos[] getConPos() { return new DirPos[] { new DirPos(xCoord + 2, yCoord, zCoord, Library.POS_X), diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 960cb5e02..25ba97821 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -4078,6 +4078,8 @@ tile.machine_steam_engine.name=Dampfmaschine tile.machine_steam_engine.desc=Effizienz: 85%% tile.machine_stirling.name=Stirlingmotor tile.machine_stirling.desc=Erzeugt Energie aus Wärme. Benötigt externe Hitzequelle.$Wärmestransferrate: T*0.1 TU/t$Maximalaufnahme: 300 TU/t$Effizienz: 50%% +tile.machine_stirling_creative.name=Kreativer Stirlingmotor +tile.machine_stirling_creative.desc=Erzeugt Energie aus Wärme. Benötigt externe Hitzequelle.$Wärmestransferrate: T*0.1 TU/t$Keine Maximalaufnahme/t$Effizienz: 100%% tile.machine_stirling_steel.name=Schwerer Stirlingmotor tile.machine_stirling_steel.desc=Erzeugt Energie aus Wärme. Benötigt externe Hitzequelle.$Verwendet ein schwereres Zahnrad und verträgt höhere Temparaturen.$Wärmestransferrate: T*0.1 TU/t$Maximalaufnahme: 1500 TU/t$Effizienz: 50%% tile.machine_storage_drum.name=Atommüll-Lagertrommel diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index e0c251500..87e424890 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -3611,6 +3611,51 @@ item.primer_buckshot.name=Buckshot Primer (x12) item.protection_charm.name=Charm of Protection item.prototype_kit.name=Prototype Kit item.pudding.name=Pudding +item.pwr_fuel.bfb_am_mix.name=Fuel Grade Americium PWR ZFB Rod +item.pwr_fuel.bfb_pu241.name=Plutonium-241 PWR ZFB Rod +item.pwr_fuel.hea242.name=HEA-242 PWR Fuel Rod +item.pwr_fuel.hen237.name=HEN-237 PWR Fuel Rod +item.pwr_fuel.hep239.name=HEP-239 PWR Fuel Rod +item.pwr_fuel.hep241.name=HEP-241 PWR Fuel Rod +item.pwr_fuel.hes326.name=HES-326 PWR Fuel Rod +item.pwr_fuel.hes327.name=HES-327 PWR Fuel Rod +item.pwr_fuel.heu233.name=HEU-233 PWR Fuel Rod +item.pwr_fuel.heu235.name=HEU-235 PWR Fuel Rod +item.pwr_fuel.mea.name=MEA PWR Fuel Rod +item.pwr_fuel.men.name=MEN PWR Fuel Rod +item.pwr_fuel.mep.name=MEP PWR Fuel Rod +item.pwr_fuel.meu.name=MEU PWR Fuel Rod +item.pwr_fuel.mox.name=MOX PWR Fuel Rod +item.pwr_fuel_depleted.bfb_am_mix.name=Depleted Fuel Grade Americium PWR ZFB Rod +item.pwr_fuel_depleted.bfb_pu241.name=Depleted Plutonium-241 PWR ZFB Rod +item.pwr_fuel_depleted.hea242.name=Depleted HEA-242 PWR Fuel Rod +item.pwr_fuel_depleted.hen237.name=Depleted HEN-237 PWR Fuel Rod +item.pwr_fuel_depleted.hep239.name=Depleted HEP-239 PWR Fuel Rod +item.pwr_fuel_depleted.hep241.name=Depleted HEP-241 PWR Fuel Rod +item.pwr_fuel_depleted.hes326.name=Depleted HES-326 PWR Fuel Rod +item.pwr_fuel_depleted.hes327.name=Depleted HES-327 PWR Fuel Rod +item.pwr_fuel_depleted.heu233.name=Depleted HEU-233 PWR Fuel Rod +item.pwr_fuel_depleted.heu235.name=Depleted HEU-235 PWR Fuel Rod +item.pwr_fuel_depleted.mea.name=Depleted MEA PWR Fuel Rod +item.pwr_fuel_depleted.men.name=Depleted MEN PWR Fuel Rod +item.pwr_fuel_depleted.mep.name=Depleted MEP PWR Fuel Rod +item.pwr_fuel_depleted.meu.name=Depleted MEU PWR Fuel Rod +item.pwr_fuel_depleted.mox.name=Depleted MOX PWR Fuel Rod +item.pwr_fuel_hot.bfb_am_mix.name=Hot Fuel Grade Americium PWR ZFB Rod +item.pwr_fuel_hot.bfb_pu241.name=Hot Plutonium-241 PWR ZFB Rod +item.pwr_fuel_hot.hea242.name=Hot HEA-242 PWR Fuel Rod +item.pwr_fuel_hot.hen237.name=Hot HEN-237 PWR Fuel Rod +item.pwr_fuel_hot.hep239.name=Hot HEP-239 PWR Fuel Rod +item.pwr_fuel_hot.hep241.name=Hot HEP-241 PWR Fuel Rod +item.pwr_fuel_hot.hes326.name=Hot HES-326 PWR Fuel Rod +item.pwr_fuel_hot.hes327.name=Hot HES-327 PWR Fuel Rod +item.pwr_fuel_hot.heu233.name=Hot HEU-233 PWR Fuel Rod +item.pwr_fuel_hot.heu235.name=Hot HEU-235 PWR Fuel Rod +item.pwr_fuel_hot.mea.name=Hot MEA PWR Fuel Rod +item.pwr_fuel_hot.men.name=Hot MEN PWR Fuel Rod +item.pwr_fuel_hot.mep.name=Hot MEP PWR Fuel Rod +item.pwr_fuel_hot.meu.name=Hot MEU PWR Fuel Rod +item.pwr_fuel_hot.mox.name=Hot MOX PWR Fuel Rod item.quartz_plutonium.name=Plutonic Quartz item.radaway.name=RadAway item.radaway_flush.name=Elite RadAway @@ -5032,6 +5077,8 @@ tile.machine_steam_engine.name=Steam Engine tile.machine_steam_engine.desc=Efficiency: 85%% tile.machine_stirling.name=Stirling Engine tile.machine_stirling.desc=Turns heat into energy. Requires external heat source.$Heat transfer rate: T*0.1 TU/t$Max intake: 300 TU/t$Efficiency: 50%% +tile.machine_stirling_creative.name=Creative Stirling Engine +tile.machine_stirling_creative.desc=Turns heat into energy. Requires external heat source.$Heat transfer rate: T*0.1 TU/t$Infinite intake/t$Efficiency: 100%% tile.machine_stirling_steel.name=Heavy Stirling Engine tile.machine_stirling_steel.desc=Turns heat into energy. Requires external heat source.$Uses a much heavier gear to support higher temperatures.$Heat transfer rate: T*0.1 TU/t$Max intake: 1500 TU/t$Efficiency: 50%% tile.machine_storage_drum.name=Nuclear Waste Disposal Drum diff --git a/src/main/resources/assets/hbm/textures/gui/gui_press.png b/src/main/resources/assets/hbm/textures/gui/gui_press.png index 8c09adbe6..c1d48e764 100644 Binary files a/src/main/resources/assets/hbm/textures/gui/gui_press.png and b/src/main/resources/assets/hbm/textures/gui/gui_press.png differ diff --git a/src/main/resources/assets/hbm/textures/items/pwr_fuel.bfb_am_mix.png b/src/main/resources/assets/hbm/textures/items/pwr_fuel.bfb_am_mix.png new file mode 100644 index 000000000..12f553847 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/pwr_fuel.bfb_am_mix.png differ diff --git a/src/main/resources/assets/hbm/textures/items/pwr_fuel.bfb_pu241.png b/src/main/resources/assets/hbm/textures/items/pwr_fuel.bfb_pu241.png new file mode 100644 index 000000000..01c0f4e83 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/items/pwr_fuel.bfb_pu241.png differ diff --git a/src/main/resources/assets/hbm/textures/models/machines/stirling_creative.png b/src/main/resources/assets/hbm/textures/models/machines/stirling_creative.png new file mode 100644 index 000000000..9ba16b6a3 Binary files /dev/null and b/src/main/resources/assets/hbm/textures/models/machines/stirling_creative.png differ