mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
redid all the turbines with the new fluid traits, electric heater
This commit is contained in:
parent
2ea17f1e13
commit
3d765347dc
@ -645,6 +645,7 @@ public class ModBlocks {
|
||||
|
||||
public static Block heater_firebox;
|
||||
public static Block heater_oilburner;
|
||||
public static Block heater_electric;
|
||||
|
||||
public static Block furnace_iron;
|
||||
public static Block furnace_steel;
|
||||
@ -1840,6 +1841,7 @@ public class ModBlocks {
|
||||
|
||||
heater_firebox = new HeaterFirebox().setBlockName("heater_firebox").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
heater_oilburner = new HeaterOilburner().setBlockName("heater_oilburner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
heater_electric = new HeaterElectric().setBlockName("heater_electric").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
|
||||
furnace_iron = new FurnaceIron().setBlockName("furnace_iron").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
|
||||
furnace_steel = new FurnaceSteel().setBlockName("furnace_steel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
@ -3036,6 +3038,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_epress, machine_epress.getUnlocalizedName());
|
||||
register(heater_firebox);
|
||||
register(heater_oilburner);
|
||||
register(heater_electric);
|
||||
register(furnace_iron);
|
||||
register(furnace_steel);
|
||||
register(machine_stirling);
|
||||
@ -3218,9 +3221,9 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_boiler_on, machine_boiler_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_boiler_electric_on, machine_boiler_electric_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_boiler_electric_off, machine_boiler_electric_off.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_turbine, machine_turbine.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_large_turbine, machine_large_turbine.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_chungus, machine_chungus.getUnlocalizedName());
|
||||
register(machine_turbine);
|
||||
register(machine_large_turbine);
|
||||
register(machine_chungus);
|
||||
GameRegistry.registerBlock(machine_condenser, machine_condenser.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_tower_small, machine_tower_small.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_tower_large, machine_tower_large.getUnlocalizedName());
|
||||
|
||||
@ -181,14 +181,14 @@ public class BlockBobble extends BlockContainer {
|
||||
PU238( "Pu-238", "Pu-238", "Improved Tom impact mechanics", null, false, ScrapType.CPU_REGISTER),
|
||||
VT( "VT-6/24", "VT-6/24", "Balefire warhead model and general texturework", "You cannot unfuck a horse.", true, ScrapType.CPU_EXT),
|
||||
DOC( "The Doctor", "Doctor17PH", "Russian localization, lunar miner", "Perhaps the moon rocks were too expensive", true, ScrapType.CPU_CACHE),
|
||||
BLUEHAT( "The Blue Hat", "The Blue Hat", "Textures", "there's a listening device in this bobblehead$don't touch it thanks", true, ScrapType.MEM_16K_A),
|
||||
BLUEHAT( "The Blue Hat", "The Blue Hat", "Textures", "payday 2's deagle freeaim champ of the year 2022", true, ScrapType.MEM_16K_A),
|
||||
PHEO( "Pheo", "Pheonix", "Deuterium machines, tantalium textures, Reliant Rocket", "RUN TO THE BEDROOM, ON THE SUITCASE ON THE LEFT,$YOU'LL FIND MY FAVORITE AXE", true, ScrapType.MEM_16K_B),
|
||||
ADAM29( "Adam29", "Adam29", "Ethanol, liquid petroleum gas", "You know, nukes are really quite beatiful.$It's like watching a star be born for a split second.", true, ScrapType.MEM_16K_C),
|
||||
UFFR( "UFFR", "UFFR", "All sorts of things from his PR", "fried shrimp", false, ScrapType.MEM_SOCKET),
|
||||
VAER( "vaer", "vaer", "ZIRNOX", "taken de family out to the weekend cigarette festival", true, ScrapType.MEM_16K_D),
|
||||
NOS( "Dr Nostalgia", "Dr Nostalgia", "SSG and Vortex models", "Take a picture, I'ma pose, paparazzi$I've been drinking, moving like a zombie", true, ScrapType.BOARD_TRANSISTOR),
|
||||
DRILLGON( "Drillgon200", "Drillgon200", "1.12 Port", null, false, ScrapType.CPU_LOGIC),
|
||||
CIRNO( "Cirno", "Cirno", "being a dumb ice fairy", "No brain. Head empty.", true, ScrapType.BOARD_BLANK);
|
||||
CIRNO( "Cirno", "Cirno", "the only multi layered skin i had", "No brain. Head empty.", true, ScrapType.BOARD_BLANK);
|
||||
|
||||
public String name; //the title of the tooltip
|
||||
public String label; //the name engraved in the socket
|
||||
|
||||
55
src/main/java/com/hbm/blocks/machine/HeaterElectric.java
Normal file
55
src/main/java/com/hbm/blocks/machine/HeaterElectric.java
Normal file
@ -0,0 +1,55 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityHeaterElectric;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class HeaterElectric extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public HeaterElectric() {
|
||||
super(Material.iron);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityHeaterElectric();
|
||||
|
||||
if(hasExtra(meta))
|
||||
return new TileEntityProxyCombo().power();
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getDimensions() {
|
||||
return new int[] {0, 0, 1, 2, 1, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getOffset() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
this.makeExtra(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,9 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.handler.MultiblockHandlerXR;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
@ -9,11 +12,12 @@ import com.hbm.tileentity.machine.TileEntityChungus;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineChungus extends BlockDummyable {
|
||||
public class MachineChungus extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public MachineChungus(Material mat) {
|
||||
super(mat);
|
||||
@ -126,4 +130,9 @@ public class MachineChungus extends BlockDummyable {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.IBlockMulti;
|
||||
import com.hbm.blocks.ILookOverlay;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.trait.FT_Heatable;
|
||||
@ -28,7 +29,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineHeatBoiler extends BlockDummyable implements ILookOverlay {
|
||||
public class MachineHeatBoiler extends BlockDummyable implements ILookOverlay, IBlockMulti {
|
||||
|
||||
public MachineHeatBoiler() {
|
||||
super(Material.iron);
|
||||
@ -168,10 +169,15 @@ public class MachineHeatBoiler extends BlockDummyable implements ILookOverlay {
|
||||
if(boiler.hasExploded) return;
|
||||
|
||||
List<String> text = new ArrayList();
|
||||
text.add(boiler.heat + "TU");
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey(boiler.tanks[0].getTankType().getUnlocalizedName()) + ": " + boiler.tanks[0].getFill() + " / " + boiler.tanks[0].getMaxFill() + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey(boiler.tanks[1].getTankType().getUnlocalizedName()) + ": " + boiler.tanks[1].getFill() + " / " + boiler.tanks[1].getMaxFill() + "mB");
|
||||
text.add(String.format("%,d", boiler.heat) + "TU");
|
||||
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + I18nUtil.resolveKey(boiler.tanks[0].getTankType().getUnlocalizedName()) + ": " + String.format("%,d", boiler.tanks[0].getFill()) + " / " + String.format("%,d", boiler.tanks[0].getMaxFill()) + "mB");
|
||||
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + I18nUtil.resolveKey(boiler.tanks[1].getTankType().getUnlocalizedName()) + ": " + String.format("%,d", boiler.tanks[1].getFill()) + " / " + String.format("%,d", boiler.tanks[1].getMaxFill()) + "mB");
|
||||
|
||||
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSubCount() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
@ -12,12 +15,11 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineLargeTurbine extends BlockDummyable {
|
||||
public class MachineLargeTurbine extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public MachineLargeTurbine(Material mat) {
|
||||
super(mat);
|
||||
@ -98,4 +100,9 @@ public class MachineLargeTurbine extends BlockDummyable {
|
||||
this.makeExtra(world, xc + dir2.offsetX, y, zc + dir2.offsetZ);
|
||||
this.makeExtra(world, xc - dir2.offsetX, y, zc - dir2.offsetZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
@ -23,7 +25,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineTurbine extends BlockContainer {
|
||||
public class MachineTurbine extends BlockContainer implements ITooltipProvider {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
@SideOnly(Side.CLIENT)
|
||||
@ -123,4 +125,8 @@ public class MachineTurbine extends BlockContainer {
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
this.addStandardInfo(stack, player, list, ext);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package com.hbm.blocks.network;
|
||||
|
||||
import api.hbm.conveyor.IConveyorBelt;
|
||||
import api.hbm.conveyor.IEnterableBlock;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -16,7 +17,7 @@ public class BlockConveyorLift extends BlockConveyorBase {
|
||||
public ForgeDirection getTravelDirection(World world, int x, int y, int z, Vec3 itemPos) {
|
||||
|
||||
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
||||
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom;
|
||||
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom && !(world.getBlock(x, y + 1, z) instanceof IEnterableBlock);
|
||||
|
||||
if(!top) {
|
||||
return ForgeDirection.DOWN;
|
||||
@ -29,7 +30,7 @@ public class BlockConveyorLift extends BlockConveyorBase {
|
||||
public Vec3 getClosestSnappingPosition(World world, int x, int y, int z, Vec3 itemPos) {
|
||||
|
||||
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
||||
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom;
|
||||
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom && !(world.getBlock(x, y + 1, z) instanceof IEnterableBlock);
|
||||
|
||||
if(!top) {
|
||||
return Vec3.createVectorHelper(x + 0.5, itemPos.yCoord, z + 0.5);
|
||||
@ -42,7 +43,7 @@ public class BlockConveyorLift extends BlockConveyorBase {
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
||||
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom;
|
||||
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom && !(world.getBlock(x, y + 1, z) instanceof IEnterableBlock);
|
||||
|
||||
if(top)
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
|
||||
@ -54,7 +55,7 @@ public class BlockConveyorLift extends BlockConveyorBase {
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
|
||||
boolean bottom = !(world.getBlock(x, y - 1, z) instanceof IConveyorBelt);
|
||||
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom;
|
||||
boolean top = !(world.getBlock(x, y + 1, z) instanceof IConveyorBelt) && !bottom && !(world.getBlock(x, y + 1, z) instanceof IEnterableBlock);
|
||||
|
||||
if(top)
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 0.5, z + 1);
|
||||
|
||||
@ -20,8 +20,7 @@ public class TurretArty extends BlockDummyable {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityTurretArty();
|
||||
|
||||
return new TileEntityProxyCombo(true, true, false);
|
||||
return new TileEntityProxyCombo().inventory().power();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -22,7 +22,7 @@ public class TurretBrandon extends TurretBaseNT {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityTurretBrandon();
|
||||
return new TileEntityProxyCombo(true, true, false);
|
||||
return new TileEntityProxyCombo().inventory().power();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -26,10 +26,7 @@ public class TurretChekhov extends BlockDummyable {
|
||||
if(meta >= 12)
|
||||
return new TileEntityTurretChekhov();
|
||||
|
||||
if(meta >= 6)
|
||||
return new TileEntityProxyCombo(true, true, false);
|
||||
|
||||
return null;
|
||||
return new TileEntityProxyCombo().inventory().power();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -25,7 +25,7 @@ public class TurretFriendly extends BlockDummyable {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityTurretFriendly();
|
||||
return new TileEntityProxyCombo(true, true, false);
|
||||
return new TileEntityProxyCombo().inventory().power();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -22,7 +22,7 @@ public class TurretFritz extends TurretBaseNT {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityTurretFritz();
|
||||
return new TileEntityProxyCombo(true, true, true);
|
||||
return new TileEntityProxyCombo().inventory().power().fluid();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -20,8 +20,7 @@ public class TurretHIMARS extends BlockDummyable {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityTurretHIMARS();
|
||||
|
||||
return new TileEntityProxyCombo(true, true, false);
|
||||
return new TileEntityProxyCombo().inventory().power();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -25,7 +25,7 @@ public class TurretHoward extends BlockDummyable {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityTurretHoward();
|
||||
return new TileEntityProxyCombo(true, true, false);
|
||||
return new TileEntityProxyCombo().inventory().power();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -25,7 +25,7 @@ public class TurretJeremy extends BlockDummyable {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityTurretJeremy();
|
||||
return new TileEntityProxyCombo(true, true, false);
|
||||
return new TileEntityProxyCombo().inventory().power();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -22,7 +22,7 @@ public class TurretMaxwell extends TurretBaseNT {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityTurretMaxwell();
|
||||
return new TileEntityProxyCombo(true, true, false);
|
||||
return new TileEntityProxyCombo().inventory().power();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -25,7 +25,7 @@ public class TurretRichard extends BlockDummyable {
|
||||
|
||||
if(meta >= 12)
|
||||
return new TileEntityTurretRichard();
|
||||
return new TileEntityProxyCombo(true, true, false);
|
||||
return new TileEntityProxyCombo().inventory().power();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -8,6 +8,7 @@ import com.hbm.inventory.fluid.FluidType.ExtContainer;
|
||||
import com.hbm.inventory.fluid.trait.*;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.*;
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible.FuelGrade;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable.CoolingType;
|
||||
import com.hbm.inventory.fluid.trait.FT_Heatable.HeatingType;
|
||||
import com.hbm.render.util.EnumSymbol;
|
||||
|
||||
@ -300,7 +301,7 @@ public class Fluids {
|
||||
metaOrder.add(PLASMA_DH3);
|
||||
metaOrder.add(PLASMA_XM);
|
||||
metaOrder.add(PLASMA_BF);
|
||||
|
||||
|
||||
double eff_steam_boil = 1.0D;
|
||||
double eff_steam_heatex = 0.25D;
|
||||
|
||||
@ -314,6 +315,13 @@ public class Fluids {
|
||||
HOTSTEAM.addTraits(new FT_Heatable().setEff(HeatingType.BOILER, eff_steam_boil).setEff(HeatingType.HEATEXCHANGER, eff_steam_heatex).addStep(18, 10, SUPERHOTSTEAM, 1));
|
||||
SUPERHOTSTEAM.addTraits(new FT_Heatable().setEff(HeatingType.BOILER, eff_steam_boil).setEff(HeatingType.HEATEXCHANGER, eff_steam_heatex).addStep(120, 10, ULTRAHOTSTEAM, 1));
|
||||
|
||||
double eff_steam_turbine = 1.0D;
|
||||
double eff_steam_cool = 0.5D;
|
||||
STEAM.addTraits(new FT_Coolable(SPENTSTEAM, 100, 1, 200).setEff(CoolingType.TURBINE, eff_steam_turbine).setEff(CoolingType.HEATEXCHANGER, eff_steam_cool));
|
||||
HOTSTEAM.addTraits(new FT_Coolable(STEAM, 1, 10, 2).setEff(CoolingType.TURBINE, eff_steam_turbine).setEff(CoolingType.HEATEXCHANGER, eff_steam_cool));
|
||||
SUPERHOTSTEAM.addTraits(new FT_Coolable(HOTSTEAM, 1, 10, 18).setEff(CoolingType.TURBINE, eff_steam_turbine).setEff(CoolingType.HEATEXCHANGER, eff_steam_cool));
|
||||
ULTRAHOTSTEAM.addTraits(new FT_Coolable(SUPERHOTSTEAM, 1, 10, 120).setEff(CoolingType.TURBINE, eff_steam_turbine).setEff(CoolingType.HEATEXCHANGER, eff_steam_cool));
|
||||
|
||||
OIL.addTraits(new FT_Heatable().setEff(HeatingType.BOILER, 1.0D).setEff(HeatingType.HEATEXCHANGER, 1.0D).addStep(10, 1, HOTOIL, 1));
|
||||
CRACKOIL.addTraits(new FT_Heatable().setEff(HeatingType.BOILER, 1.0D).setEff(HeatingType.HEATEXCHANGER, 1.0D).addStep(10, 1, HOTCRACKOIL, 1));
|
||||
|
||||
|
||||
@ -12,10 +12,14 @@ public class FT_Coolable extends FluidTrait {
|
||||
protected HashMap<CoolingType, Double> efficiency = new HashMap();
|
||||
|
||||
public final FluidType coolsTo;
|
||||
public int amountReq;
|
||||
public int amountProduced;
|
||||
public final int heatEnergy;
|
||||
|
||||
public FT_Coolable(FluidType type, int heat) {
|
||||
public FT_Coolable(FluidType type, int req, int prod, int heat) {
|
||||
this.coolsTo = type;
|
||||
this.amountReq = req;
|
||||
this.amountProduced = prod;
|
||||
this.heatEnergy = heat;
|
||||
}
|
||||
|
||||
|
||||
@ -36,17 +36,6 @@ public class MachineRecipes {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
//return: FluidType, amount produced, amount required, HE produced
|
||||
public static Object[] getTurbineOutput(FluidType type) {
|
||||
|
||||
if(type == Fluids.STEAM) return new Object[] { Fluids.SPENTSTEAM, 5, 500, 50 };
|
||||
if(type == Fluids.HOTSTEAM) return new Object[] { Fluids.STEAM, 50, 5, 100 };
|
||||
if(type == Fluids.SUPERHOTSTEAM) return new Object[] { Fluids.HOTSTEAM, 50, 5, 150 };
|
||||
if(type == Fluids.ULTRAHOTSTEAM) return new Object[] { Fluids.SUPERHOTSTEAM, 50, 5, 250 };
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ItemStack getCyclotronOutput(ItemStack part, ItemStack item) {
|
||||
|
||||
|
||||
@ -285,6 +285,13 @@ public class AnvilRecipes {
|
||||
new OreDictStack(STEEL.plate(), 8)
|
||||
}, new AnvilOutput(new ItemStack(ModBlocks.machine_crucible))).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new OreDictStack(STEEL.ingot(), 4),
|
||||
new OreDictStack(CU.plate(), 16),
|
||||
new ComparableStack(ModItems.plate_polymer, 8)
|
||||
}, new AnvilOutput(new ItemStack(ModBlocks.machine_boiler))).setTier(2));
|
||||
|
||||
constructionRecipes.add(new AnvilConstructionRecipe(
|
||||
new AStack[] {
|
||||
new OreDictStack(STEEL.ingot(), 6),
|
||||
|
||||
@ -3,7 +3,6 @@ package com.hbm.inventory.recipes.anvil;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.items.special.ItemHot;
|
||||
|
||||
|
||||
@ -3,7 +3,6 @@ package com.hbm.inventory.recipes.anvil;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.inventory.RecipesCommon;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package com.hbm.inventory.recipes.anvil;
|
||||
|
||||
import com.hbm.inventory.RecipesCommon;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
|
||||
@ -262,6 +262,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFurnaceSteel.class, new RenderFurnaceSteel());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeaterFirebox.class, new RenderFirebox());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeaterOilburner.class, new RenderOilburner());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityHeaterElectric.class, new RenderElectricHeater());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStirling.class, new RenderStirling());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySawmill.class, new RenderSawmill());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCrucible.class, new RenderCrucible());
|
||||
|
||||
@ -60,6 +60,7 @@ public class ResourceManager {
|
||||
//Heaters
|
||||
public static final IModelCustom heater_firebox = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/firebox.obj"));
|
||||
public static final IModelCustom heater_oilburner = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/oilburner.obj"));
|
||||
public static final IModelCustom heater_electric = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/machines/electric_heater.obj"), false);
|
||||
|
||||
//Heat Engines
|
||||
public static final IModelCustom stirling = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/machines/stirling.obj"));
|
||||
@ -383,6 +384,7 @@ public class ResourceManager {
|
||||
//Heaters
|
||||
public static final ResourceLocation heater_firebox_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/firebox.png");
|
||||
public static final ResourceLocation heater_oilburner_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/oilburner.png");
|
||||
public static final ResourceLocation heater_electric_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/electric_heater.png");
|
||||
|
||||
//Heat Engines
|
||||
public static final ResourceLocation stirling_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/stirling.png");
|
||||
|
||||
@ -4,6 +4,7 @@ import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.network.BlockConveyorLift;
|
||||
|
||||
import api.hbm.conveyor.IConveyorBelt;
|
||||
import api.hbm.conveyor.IEnterableBlock;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
@ -74,7 +75,7 @@ public class RenderConveyorLift implements ISimpleBlockRenderingHandler {
|
||||
|
||||
if(y < 255) {
|
||||
Block above = world.getBlock(x, y + 1, z);
|
||||
isTop = !(above instanceof IConveyorBelt) && !isBottom;
|
||||
isTop = !(above instanceof IConveyorBelt) && !isBottom && !(world.getBlock(x, y + 1, z) instanceof IEnterableBlock);
|
||||
}
|
||||
|
||||
double minOuter = 0.0;
|
||||
|
||||
@ -58,6 +58,7 @@ public class RenderBoiler extends TileEntitySpecialRenderer implements IItemRend
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommonWithStack(ItemStack item) {
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
bindTexture(ResourceManager.boiler_tex);
|
||||
if(item.getItemDamage() == 1)
|
||||
|
||||
@ -0,0 +1,55 @@
|
||||
package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.item.ItemRenderBase;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
public class RenderElectricHeater extends TileEntitySpecialRenderer implements IItemRendererProvider {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
||||
switch(tile.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 3: GL11.glRotatef(270, 0F, 1F, 0F); break;
|
||||
case 5: GL11.glRotatef(0, 0F, 1F, 0F); break;
|
||||
case 2: GL11.glRotatef(90, 0F, 1F, 0F); break;
|
||||
case 4: GL11.glRotatef(180, 0F, 1F, 0F); break;
|
||||
}
|
||||
|
||||
bindTexture(ResourceManager.heater_electric_tex);
|
||||
ResourceManager.heater_electric.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemForRenderer() {
|
||||
return Item.getItemFromBlock(ModBlocks.heater_electric);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemRenderer getRenderer() {
|
||||
return new ItemRenderBase( ) {
|
||||
public void renderInventory() {
|
||||
GL11.glScaled(3, 3, 3);
|
||||
}
|
||||
public void renderCommonWithStack(ItemStack item) {
|
||||
GL11.glTranslated(-0.5, 0, 0);
|
||||
bindTexture(ResourceManager.heater_electric_tex);
|
||||
ResourceManager.heater_electric.renderAll();
|
||||
}};
|
||||
}
|
||||
}
|
||||
@ -246,6 +246,7 @@ public class TileMappings {
|
||||
private static void putMachines() {
|
||||
put(TileEntityHeaterFirebox.class, "tileentity_firebox");
|
||||
put(TileEntityHeaterOilburner.class, "tileentity_oilburner");
|
||||
put(TileEntityHeaterElectric.class, "tileentity_electric_heater");
|
||||
put(TileEntityFurnaceIron.class, "tileentity_furnace_iron");
|
||||
put(TileEntityFurnaceSteel.class, "tileentity_furnace_steel");
|
||||
put(TileEntityStirling.class, "tileentity_stirling");
|
||||
|
||||
@ -10,7 +10,8 @@ import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable.CoolingType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.NBTPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
@ -53,33 +54,35 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
Object[] outs = MachineRecipes.getTurbineOutput(tanks[0].getTankType());
|
||||
|
||||
//some funky crashfixing for unlikely cases
|
||||
if(outs == null) {
|
||||
tanks[0].setTankType(Fluids.STEAM);
|
||||
tanks[1].setTankType(Fluids.SPENTSTEAM);
|
||||
outs = MachineRecipes.getTurbineOutput(tanks[0].getTankType());
|
||||
boolean operational = false;
|
||||
FluidType in = tanks[0].getTankType();
|
||||
boolean valid = false;
|
||||
if(in.hasTrait(FT_Coolable.class)) {
|
||||
FT_Coolable trait = in.getTrait(FT_Coolable.class);
|
||||
double eff = trait.getEfficiency(CoolingType.TURBINE); //100% efficiency
|
||||
if(eff > 0) {
|
||||
tanks[1].setTankType(trait.coolsTo);
|
||||
int inputOps = tanks[0].getFill() / trait.amountReq;
|
||||
int outputOps = (tanks[1].getMaxFill() - tanks[1].getFill()) / trait.amountProduced;
|
||||
int ops = Math.min(inputOps, outputOps);
|
||||
tanks[0].setFill(tanks[0].getFill() - ops * trait.amountReq);
|
||||
tanks[1].setFill(tanks[1].getFill() + ops * trait.amountProduced);
|
||||
this.power += (ops * trait.heatEnergy * eff);
|
||||
valid = true;
|
||||
operational = ops > 0;
|
||||
}
|
||||
}
|
||||
|
||||
tanks[1].setTankType((FluidType) outs[0]);
|
||||
//if(this.tanks[1].getFill() > 0) System.out.println(this.tanks[1].getTankType().name());
|
||||
|
||||
int processMax = (int) Math.ceil(tanks[0].getFill() / (Integer)outs[2]); //the maximum amount of cycles total
|
||||
int processSteam = tanks[0].getFill() / (Integer)outs[2]; //the maximum amount of cycles depending on steam
|
||||
int processWater = (tanks[1].getMaxFill() - tanks[1].getFill()) / (Integer)outs[1]; //the maximum amount of cycles depending on water
|
||||
|
||||
int cycles = Math.min(processMax, Math.min(processSteam, processWater));
|
||||
|
||||
tanks[0].setFill(tanks[0].getFill() - (Integer)outs[2] * cycles);
|
||||
tanks[1].setFill(tanks[1].getFill() + (Integer)outs[1] * cycles);
|
||||
|
||||
power += (Integer)outs[3] * cycles;
|
||||
if(!valid) tanks[1].setTankType(Fluids.NONE);
|
||||
if(power > maxPower) power = maxPower;
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
this.sendPower(worldObj, xCoord - dir.offsetX * 11, yCoord, zCoord - dir.offsetZ * 11, dir);
|
||||
|
||||
for(BlockPos pos : this.getConPos()) {
|
||||
this.sendFluid(tanks[1].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), dir); //TODO: there's no directions for this yet because idc
|
||||
this.sendFluid(tanks[1].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), dir);
|
||||
this.trySubscribe(tanks[0].getTankType(), worldObj, pos.getX(), pos.getY(), pos.getZ(), dir);
|
||||
}
|
||||
|
||||
@ -88,7 +91,7 @@ public class TileEntityChungus extends TileEntityLoadedBase implements IFluidAcc
|
||||
|
||||
turnTimer--;
|
||||
|
||||
if(cycles > 0)
|
||||
if(operational)
|
||||
turnTimer = 25;
|
||||
|
||||
this.fillFluidInit(tanks[1].getTankType());
|
||||
|
||||
@ -182,6 +182,24 @@ public class TileEntityHeatBoiler extends TileEntityLoadedBase implements IFluid
|
||||
new DirPos(xCoord, yCoord + 4, zCoord, Library.POS_Y),
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
super.readFromNBT(nbt);
|
||||
tanks[0].readFromNBT(nbt, "water");
|
||||
tanks[1].readFromNBT(nbt, "steam");
|
||||
heat = nbt.getInteger("heat");
|
||||
hasExploded = nbt.getBoolean("exploded");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbt) {
|
||||
super.writeToNBT(nbt);
|
||||
tanks[0].writeToNBT(nbt, "water");
|
||||
tanks[1].writeToNBT(nbt, "steam");
|
||||
nbt.setInteger("heat", heat);
|
||||
nbt.setBoolean("exploded", hasExploded);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
|
||||
@ -0,0 +1,34 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import api.hbm.tile.IHeatSource;
|
||||
|
||||
public class TileEntityHeaterElectric extends TileEntityLoadedBase implements IHeatSource, IEnergyUser {
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long power) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHeatStored() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void useUpHeat(int heat) {
|
||||
|
||||
}
|
||||
}
|
||||
@ -207,8 +207,7 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
||||
|
||||
boolean mark = false;
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.subscribeToAllAround(tanks[0].getTankType(), this);
|
||||
this.sendFluidToAll(tanks[1].getTankType(), this);
|
||||
|
||||
@ -10,7 +10,8 @@ import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable.CoolingType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
|
||||
@ -70,30 +71,26 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
||||
|
||||
boolean operational = false;
|
||||
|
||||
Object[] outs = MachineRecipes.getTurbineOutput(tanks[0].getTankType());
|
||||
|
||||
if(outs == null) {
|
||||
tanks[1].setTankType(Fluids.NONE);
|
||||
} else {
|
||||
tanks[1].setTankType((FluidType) outs[0]);
|
||||
|
||||
int processMax = (int) Math.ceil(Math.ceil(tanks[0].getFill() / 5F) / (Integer)outs[2]); //the maximum amount of cycles based on the 20% cap
|
||||
int processSteam = tanks[0].getFill() / (Integer)outs[2]; //the maximum amount of cycles depending on steam
|
||||
int processWater = (tanks[1].getMaxFill() - tanks[1].getFill()) / (Integer)outs[1]; //the maximum amount of cycles depending on water
|
||||
|
||||
int cycles = Math.min(processMax, Math.min(processSteam, processWater));
|
||||
|
||||
tanks[0].setFill(tanks[0].getFill() - (Integer)outs[2] * cycles);
|
||||
tanks[1].setFill(tanks[1].getFill() + (Integer)outs[1] * cycles);
|
||||
|
||||
power += ((Integer)outs[3] * cycles) * 1.25; //yields a 25% power conversion bonus
|
||||
|
||||
if(power > maxPower)
|
||||
power = maxPower;
|
||||
|
||||
if(cycles > 0)
|
||||
operational = true;
|
||||
FluidType in = tanks[0].getTankType();
|
||||
boolean valid = false;
|
||||
if(in.hasTrait(FT_Coolable.class)) {
|
||||
FT_Coolable trait = in.getTrait(FT_Coolable.class);
|
||||
double eff = trait.getEfficiency(CoolingType.TURBINE); //100% efficiency
|
||||
if(eff > 0) {
|
||||
tanks[1].setTankType(trait.coolsTo);
|
||||
int inputOps = tanks[0].getFill() / trait.amountReq;
|
||||
int outputOps = (tanks[1].getMaxFill() - tanks[1].getFill()) / trait.amountProduced;
|
||||
int cap = 6_000 / trait.amountReq;
|
||||
int ops = Math.min(inputOps, Math.min(outputOps, cap));
|
||||
tanks[0].setFill(tanks[0].getFill() - ops * trait.amountReq);
|
||||
tanks[1].setFill(tanks[1].getFill() + ops * trait.amountProduced);
|
||||
this.power += (ops * trait.heatEnergy * eff);
|
||||
valid = true;
|
||||
operational = ops > 0;
|
||||
}
|
||||
}
|
||||
if(!valid) tanks[1].setTankType(Fluids.NONE);
|
||||
if(power > maxPower) power = maxPower;
|
||||
|
||||
tanks[1].unloadTank(5, 6, slots);
|
||||
|
||||
|
||||
@ -9,6 +9,8 @@ import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable.CoolingType;
|
||||
import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
@ -232,27 +234,25 @@ public class TileEntityMachineTurbine extends TileEntityLoadedBase implements IS
|
||||
tanks[0].loadTank(2, 3, slots);
|
||||
power = Library.chargeItemsFromTE(slots, 4, power, maxPower);
|
||||
|
||||
Object[] outs = MachineRecipes.getTurbineOutput(tanks[0].getTankType());
|
||||
|
||||
if(outs == null) {
|
||||
tanks[1].setTankType(Fluids.NONE);
|
||||
} else {
|
||||
tanks[1].setTankType((FluidType) outs[0]);
|
||||
|
||||
int processMax = 1200; //the maximum amount of cycles based on the 1.2k cycle cap (subject to change)
|
||||
int processSteam = tanks[0].getFill() / (Integer)outs[2]; //the maximum amount of cycles depending on steam
|
||||
int processWater = (tanks[1].getMaxFill() - tanks[1].getFill()) / (Integer)outs[1]; //the maximum amount of cycles depending on water
|
||||
|
||||
int cycles = Math.min(processMax, Math.min(processSteam, processWater));
|
||||
|
||||
tanks[0].setFill(tanks[0].getFill() - (Integer)outs[2] * cycles);
|
||||
tanks[1].setFill(tanks[1].getFill() + (Integer)outs[1] * cycles);
|
||||
|
||||
power += (Integer)outs[3] * cycles;
|
||||
|
||||
if(power > maxPower)
|
||||
power = maxPower;
|
||||
FluidType in = tanks[0].getTankType();
|
||||
boolean valid = false;
|
||||
if(in.hasTrait(FT_Coolable.class)) {
|
||||
FT_Coolable trait = in.getTrait(FT_Coolable.class);
|
||||
double eff = trait.getEfficiency(CoolingType.TURBINE) * 0.85D; //small turbine is only 85% efficient
|
||||
if(eff > 0) {
|
||||
tanks[1].setTankType(trait.coolsTo);
|
||||
int inputOps = tanks[0].getFill() / trait.amountReq;
|
||||
int outputOps = (tanks[1].getMaxFill() - tanks[1].getFill()) / trait.amountProduced;
|
||||
int cap = 6_000 / trait.amountReq;
|
||||
int ops = Math.min(inputOps, Math.min(outputOps, cap));
|
||||
tanks[0].setFill(tanks[0].getFill() - ops * trait.amountReq);
|
||||
tanks[1].setFill(tanks[1].getFill() + ops * trait.amountProduced);
|
||||
this.power += (ops * trait.heatEnergy * eff);
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
if(!valid) tanks[1].setTankType(Fluids.NONE);
|
||||
if(power > maxPower) power = maxPower;
|
||||
|
||||
this.sendFluidToAll(tanks[1].getTankType(), this);
|
||||
|
||||
|
||||
@ -3466,6 +3466,7 @@ tile.machine_autocrafter.name=Automatische Werkbank
|
||||
tile.machine_bat9000.name=Big-Ass Tank 9000
|
||||
tile.machine_battery.name=Energiespeicherblock
|
||||
tile.machine_battery_potato.name=Kartoffelbatterieblock
|
||||
tile.machine_boiler.name=Boiler
|
||||
tile.machine_boiler_electric_off.name=Elektrischer Boiler
|
||||
tile.machine_boiler_electric_on.name=Elektrischer Boiler
|
||||
tile.machine_boiler_off.name=Dampfkessel
|
||||
@ -3475,6 +3476,7 @@ tile.machine_centrifuge.name=Zentrifuge
|
||||
tile.machine_chemfac.name=Chemiefabrik
|
||||
tile.machine_chemplant.name=Chemiewerk
|
||||
tile.machine_chungus.name=Leviathan-Dampfturbine
|
||||
tile.machine_chungus.desc=Effizienz: 85%%
|
||||
tile.machine_coal_off.name=Verbrennungsgenerator
|
||||
tile.machine_coal_on.name=Verbrennungsgenerator
|
||||
tile.machine_combine_factory.name=CMB-Stahl Hochofen
|
||||
@ -3511,6 +3513,7 @@ tile.machine_geo.name=Gepthermiegenerator
|
||||
tile.machine_industrial_generator.name=Industrieller Generator
|
||||
tile.machine_keyforge.name=Schlossertisch
|
||||
tile.machine_large_turbine.name=Industrielle Dampfturbine
|
||||
tile.machine_large_turbine.desc=Effizienz: 100%%
|
||||
tile.machine_lithium_battery.name=Li-Ion-Energiespeicherblock
|
||||
tile.machine_microwave.name=Mikrowelle
|
||||
tile.machine_mining_laser.name=Bergbaulaser
|
||||
@ -3566,6 +3569,7 @@ tile.machine_transformer_20.name=10k-1Hz-Transformator
|
||||
tile.machine_transformer_dnt.name=DNT-20Hz-Transformator
|
||||
tile.machine_transformer_dnt_20.name=DNT-1Hz-Transformator
|
||||
tile.machine_turbine.name=Dampfturbine
|
||||
tile.machine_turbine.desc=Effizienz: 85%%
|
||||
tile.machine_turbofan.name=Turbofan
|
||||
tile.machine_uf6_tank.name=Uranhexafluorid-Tank
|
||||
tile.machine_waste_drum.name=Abklingbecken-Trommel
|
||||
|
||||
@ -3904,6 +3904,7 @@ tile.machine_autocrafter.name=Automatic Crafting Table
|
||||
tile.machine_bat9000.name=Big-Ass Tank 9000
|
||||
tile.machine_battery.name=Energy Storage Block
|
||||
tile.machine_battery_potato.name=Potato Battery Block
|
||||
tile.machine_boiler.name=Boiler
|
||||
tile.machine_boiler_electric_off.name=Electric Boiler
|
||||
tile.machine_boiler_electric_on.name=Electric Boiler
|
||||
tile.machine_boiler_off.name=Boiler
|
||||
@ -3913,6 +3914,7 @@ tile.machine_centrifuge.name=Centrifuge
|
||||
tile.machine_chemfac.name=Chemical Factory
|
||||
tile.machine_chemplant.name=Chemical Plant
|
||||
tile.machine_chungus.name=Leviathan Steam Turbine
|
||||
tile.machine_chungus.desc=Efficiency: 85%%
|
||||
tile.machine_coal_off.name=Combustion Generator
|
||||
tile.machine_coal_on.name=Combustion Generator
|
||||
tile.machine_combine_factory.name=CMB Steel Furnace
|
||||
@ -3949,6 +3951,7 @@ tile.machine_geo.name=Geothermal Electric Generator
|
||||
tile.machine_industrial_generator.name=Industrial Generator
|
||||
tile.machine_keyforge.name=Locksmith Table
|
||||
tile.machine_large_turbine.name=Industrial Steam Turbine
|
||||
tile.machine_large_turbine.desc=Efficiency: 100%%
|
||||
tile.machine_liquefactor.name=Industrial Liquefaction Machine
|
||||
tile.machine_liquefactor.desc=Powerful universal machine to turn items into fluids.$Comes with versatile catalytic components, heating elements$and a built-in hydrator for petrochemical liquefaction.
|
||||
tile.machine_lithium_battery.name=Li-Ion Energy Storage Block
|
||||
@ -4007,6 +4010,7 @@ tile.machine_transformer_20.name=10k-1Hz Transformer
|
||||
tile.machine_transformer_dnt.name=DNT-20Hz Transformer
|
||||
tile.machine_transformer_dnt_20.name=DNT-1Hz Transformer
|
||||
tile.machine_turbine.name=Steam Turbine
|
||||
tile.machine_turbine.desc=Efficiency: 85%%
|
||||
tile.machine_turbofan.name=Turbofan
|
||||
tile.machine_uf6_tank.name=Uranium Hexafluoride Tank
|
||||
tile.machine_waste_drum.name=Spent Fuel Pool Drum
|
||||
|
||||
1140
src/main/resources/assets/hbm/models/machines/electric_heater.obj
Normal file
1140
src/main/resources/assets/hbm/models/machines/electric_heater.obj
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Loading…
x
Reference in New Issue
Block a user