mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge remote-tracking branch 'HbmMods/master'
This commit is contained in:
commit
7a395951c3
@ -44,6 +44,10 @@ public interface IEnergyConnector {
|
||||
*/
|
||||
public long getMaxPower();
|
||||
|
||||
public default long getTransferWeight() {
|
||||
return Math.max(getMaxPower() - getPower(), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic implementation of subscribing to a nearby power grid
|
||||
* @param world
|
||||
|
||||
@ -109,7 +109,7 @@ public class PowerNet implements IPowerNet {
|
||||
long totalReq = 0;
|
||||
|
||||
for(IEnergyConnector con : this.subscribers) {
|
||||
long req = Math.max(con.getMaxPower() - con.getPower(), 0);
|
||||
long req = con.getTransferWeight();
|
||||
weight.add(req);
|
||||
totalReq += req;
|
||||
}
|
||||
|
||||
@ -2176,8 +2176,8 @@ public class ModBlocks {
|
||||
dummy_port_drill = new DummyBlockDrill(Material.iron, true).setBlockName("dummy_port_drill").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_lead");
|
||||
dummy_block_assembler = new DummyBlockAssembler(Material.iron, false).setBlockName("dummy_block_assembler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_assembler = new DummyBlockAssembler(Material.iron, true).setBlockName("dummy_port_assembler").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_chemplant = new DummyBlockChemplant(Material.iron, false).setBlockName("dummy_block_chemplant").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_chemplant = new DummyBlockChemplant(Material.iron, true).setBlockName("dummy_port_chemplant").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_chemplant = new DummyBlockChemplant(Material.iron).setBlockName("dummy_block_chemplant").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_chemplant = new DummyBlockChemplant(Material.iron).setBlockName("dummy_port_chemplant").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_fluidtank = new DummyBlockFluidTank(Material.iron, false).setBlockName("dummy_block_fluidtank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_port_fluidtank = new DummyBlockFluidTank(Material.iron, true).setBlockName("dummy_port_fluidtank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||
dummy_block_refinery = new DummyBlockRefinery(Material.iron, false).setBlockName("dummy_block_refinery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_titanium");
|
||||
@ -2819,8 +2819,8 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(machine_rtg_furnace_on, machine_rtg_furnace_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_coal_off, machine_coal_off.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_coal_on, machine_coal_on.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_diesel, machine_diesel.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_selenium, machine_selenium.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_diesel, ItemBlockBase.class, machine_diesel.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_selenium, ItemBlockBase.class, machine_selenium.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_generator, machine_generator.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_controller, machine_controller.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(reactor_research, reactor_research.getUnlocalizedName());
|
||||
@ -2976,9 +2976,9 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(fraction_spacer, fraction_spacer.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_catalytic_cracker, machine_catalytic_cracker.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_drill, machine_drill.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_mining_laser, ItemBlockLore.class, machine_mining_laser.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_mining_laser, ItemBlockBase.class, machine_mining_laser.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(barricade, barricade.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_turbofan, machine_turbofan.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_turbofan, ItemBlockBase.class, machine_turbofan.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_schrabidium_transmutator, machine_schrabidium_transmutator.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_combine_factory, machine_combine_factory.getUnlocalizedName());
|
||||
GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName());
|
||||
|
||||
@ -1,60 +1,11 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.interfaces.IDummy;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DummyBlockChemplant extends DummyOldBase {
|
||||
public class DummyBlockChemplant extends Block {
|
||||
|
||||
public DummyBlockChemplant(Material p_i45386_1_, boolean port) {
|
||||
super(p_i45386_1_, port);
|
||||
public DummyBlockChemplant(Material p_i45394_1_) {
|
||||
super(p_i45394_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World world, int x, int y, int z)
|
||||
{
|
||||
return Item.getItemFromBlock(ModBlocks.machine_chemplant);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote)
|
||||
{
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
TileEntity te = world.getTileEntity(x, y, z);
|
||||
if(te != null && te instanceof TileEntityDummy) {
|
||||
int a = ((TileEntityDummy)te).targetX;
|
||||
int b = ((TileEntityDummy)te).targetY;
|
||||
int c = ((TileEntityDummy)te).targetZ;
|
||||
|
||||
TileEntityMachineChemplant entity = (TileEntityMachineChemplant) world.getTileEntity(a, b, c);
|
||||
if(entity != null)
|
||||
{
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_machine_chemplant, world, a, b, c);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ public class MachineBattery extends BlockContainer {
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityMachineBattery(maxPower);
|
||||
return new TileEntityMachineBattery();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -1,296 +1,53 @@
|
||||
package com.hbm.blocks.machine;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.handler.MultiblockHandler;
|
||||
import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplantNew;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class MachineChemplant extends BlockContainer implements IMultiblock {
|
||||
public class MachineChemplant extends BlockDummyable {
|
||||
|
||||
public MachineChemplant(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileEntityMachineChemplant();
|
||||
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
if(meta >= 12) return new TileEntityMachineChemplantNew();
|
||||
if(meta >= 6) return new TileEntityProxyCombo(false, true, true);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return Item.getItemFromBlock(ModBlocks.machine_chemplant);
|
||||
public int[] getDimensions() {
|
||||
return new int[] {2, 0, 2, 1, 2, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if (i == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.chemplantDimensionEast)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.chemplantDimensionEast, ModBlocks.dummy_block_chemplant);
|
||||
|
||||
//
|
||||
DummyBlockChemplant.safeBreak = true;
|
||||
world.setBlock(x - 1, y, z, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te = world.getTileEntity(x - 1, y, z);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y, z + 1, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te2 = world.getTileEntity(x - 1, y, z + 1);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 2, y, z, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te3 = world.getTileEntity(x + 2, y, z);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 2, y, z + 1, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te4 = world.getTileEntity(x + 2, y, z + 1);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockChemplant.safeBreak = false;
|
||||
//
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
if (i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.chemplantDimensionSouth)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.chemplantDimensionSouth, ModBlocks.dummy_block_chemplant);
|
||||
|
||||
//
|
||||
DummyBlockChemplant.safeBreak = true;
|
||||
world.setBlock(x, y, z - 1, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te = world.getTileEntity(x, y, z - 1);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y, z - 1, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te2 = world.getTileEntity(x - 1, y, z - 1);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x, y, z + 2, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te3 = world.getTileEntity(x, y, z + 2);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 1, y, z + 2, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te4 = world.getTileEntity(x - 1, y, z + 2);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockChemplant.safeBreak = false;
|
||||
//
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
if (i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.chemplantDimensionWest)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.chemplantDimensionWest, ModBlocks.dummy_block_chemplant);
|
||||
|
||||
//
|
||||
DummyBlockChemplant.safeBreak = true;
|
||||
world.setBlock(x + 1, y, z, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te = world.getTileEntity(x + 1, y, z);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 1, y, z - 1, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te2 = world.getTileEntity(x + 1, y, z - 1);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 2, y, z, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te3 = world.getTileEntity(x - 2, y, z);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x - 2, y, z - 1, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te4 = world.getTileEntity(x - 2, y, z - 1);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockChemplant.safeBreak = false;
|
||||
//
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
if (i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
if(MultiblockHandler.checkSpace(world, x, y, z, MultiblockHandler.chemplantDimensionNorth)) {
|
||||
MultiblockHandler.fillUp(world, x, y, z, MultiblockHandler.chemplantDimensionNorth, ModBlocks.dummy_block_chemplant);
|
||||
|
||||
//
|
||||
DummyBlockChemplant.safeBreak = true;
|
||||
world.setBlock(x, y, z + 1, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te = world.getTileEntity(x, y, z + 1);
|
||||
if(te instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 1, y, z + 1, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te2 = world.getTileEntity(x + 1, y, z + 1);
|
||||
if(te2 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te2;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x, y, z - 2, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te3 = world.getTileEntity(x, y, z - 2);
|
||||
if(te3 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te3;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
world.setBlock(x + 1, y, z - 2, ModBlocks.dummy_port_chemplant);
|
||||
TileEntity te4 = world.getTileEntity(x + 1, y, z - 2);
|
||||
if(te4 instanceof TileEntityDummy) {
|
||||
TileEntityDummy dummy = (TileEntityDummy)te4;
|
||||
dummy.targetX = x;
|
||||
dummy.targetY = y;
|
||||
dummy.targetZ = z;
|
||||
}
|
||||
DummyBlockChemplant.safeBreak = false;
|
||||
//
|
||||
|
||||
} else
|
||||
world.func_147480_a(x, y, z, true);
|
||||
}
|
||||
public int getOffset() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
@Override
|
||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
|
||||
{
|
||||
if (!keepInventory)
|
||||
{
|
||||
ISidedInventory tileentityfurnace = (ISidedInventory)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return this.standardOpenBehavior(world, x, y, z, player, ModBlocks.guiID_machine_chemplant);
|
||||
}
|
||||
|
||||
if (tileentityfurnace != null)
|
||||
{
|
||||
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
|
||||
{
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
@Override
|
||||
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||
super.fillSpace(world, x, y, z, dir, o);
|
||||
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
if (itemstack != null)
|
||||
{
|
||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while (itemstack.stackSize > 0)
|
||||
{
|
||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
||||
|
||||
if (j1 > itemstack.stackSize)
|
||||
{
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if (itemstack.hasTagCompound())
|
||||
{
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
|
||||
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
|
||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
}
|
||||
this.makeExtra(world, x + rot.offsetX * 2, y, z + rot.offsetZ * 2);
|
||||
this.makeExtra(world, x - rot.offsetX * 1, y, z - rot.offsetZ * 1);
|
||||
this.makeExtra(world, x + rot.offsetX * 2 + dir.offsetX, y, z + rot.offsetZ * 2 + dir.offsetZ);
|
||||
this.makeExtra(world, x - rot.offsetX * 1 + dir.offsetX, y, z - rot.offsetZ * 1 + dir.offsetZ);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
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.inventory.fluid.FluidTypeCombustible.FuelGrade;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||
@ -20,13 +23,13 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineDiesel extends BlockContainer {
|
||||
public class MachineDiesel extends BlockContainer implements ITooltipProvider {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private Random rand;
|
||||
private static boolean keepInventory;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@ -46,14 +49,10 @@ public class MachineDiesel extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if(side == 0)
|
||||
return iconBottom;
|
||||
if(side == 1)
|
||||
return iconTop;
|
||||
if(side == 2 || side == 3)
|
||||
return blockIcon;
|
||||
if(side == 4 || side == 5)
|
||||
return iconSide;
|
||||
if(side == 0) return iconBottom;
|
||||
if(side == 1) return iconTop;
|
||||
if(side == 2 || side == 3) return blockIcon;
|
||||
if(side == 4 || side == 5) return iconSide;
|
||||
|
||||
return null;
|
||||
}
|
||||
@ -143,4 +142,17 @@ public class MachineDiesel 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) {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + "Fuel efficiency:");
|
||||
for(FuelGrade grade : FuelGrade.values()) {
|
||||
Double efficiency = TileEntityMachineDiesel.fuelEfficiency.get(grade);
|
||||
|
||||
if(efficiency != null) {
|
||||
int eff = (int)(efficiency * 100);
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + grade.getGrade() + ": " + EnumChatFormatting.RED + "" + eff + "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.blocks.machine;
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineFENSU;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineFENSU;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
@ -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.TileEntityProxyEnergy;
|
||||
@ -10,11 +13,12 @@ import com.hbm.tileentity.machine.TileEntityMachineMiningLaser;
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
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 MachineMiningLaser extends BlockDummyable {
|
||||
public class MachineMiningLaser extends BlockDummyable implements ITooltipProvider {
|
||||
|
||||
public MachineMiningLaser(Material mat) {
|
||||
super(mat);
|
||||
@ -83,4 +87,10 @@ public class MachineMiningLaser extends BlockDummyable {
|
||||
|
||||
this.makeExtra(world, x, y + 1, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
list.add("3x3x3 Multiblock");
|
||||
list.add("Only placeable on a ceiling.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
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.inventory.fluid.FluidTypeCombustible.FuelGrade;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
|
||||
|
||||
@ -16,14 +19,14 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineSeleniumEngine extends BlockContainer {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
public class MachineSeleniumEngine extends BlockContainer implements ITooltipProvider {
|
||||
|
||||
private final Random field_149933_a = new Random();
|
||||
private static boolean keepInventory;
|
||||
|
||||
public MachineSeleniumEngine(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
@ -48,91 +51,76 @@ public class MachineSeleniumEngine extends BlockContainer {
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if(i == 0)
|
||||
{
|
||||
|
||||
if(i == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
if(i == 1)
|
||||
{
|
||||
if(i == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
if(i == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if(i == 3)
|
||||
{
|
||||
if(i == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
|
||||
{
|
||||
if (!keepInventory)
|
||||
{
|
||||
TileEntityMachineSeleniumEngine tileentityfurnace = (TileEntityMachineSeleniumEngine)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_) {
|
||||
if(!keepInventory) {
|
||||
TileEntityMachineSeleniumEngine tileentityfurnace = (TileEntityMachineSeleniumEngine) p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
||||
|
||||
if (tileentityfurnace != null)
|
||||
{
|
||||
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
|
||||
{
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
if(tileentityfurnace != null) {
|
||||
for(int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1) {
|
||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
||||
|
||||
if (itemstack != null)
|
||||
{
|
||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
if(itemstack != null) {
|
||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
while (itemstack.stackSize > 0)
|
||||
{
|
||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
||||
while(itemstack.stackSize > 0) {
|
||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
||||
|
||||
if (j1 > itemstack.stackSize)
|
||||
{
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
if(j1 > itemstack.stackSize) {
|
||||
j1 = itemstack.stackSize;
|
||||
}
|
||||
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
itemstack.stackSize -= j1;
|
||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||
|
||||
if (itemstack.hasTagCompound())
|
||||
{
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
|
||||
}
|
||||
if(itemstack.hasTagCompound()) {
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
|
||||
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
|
||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float) this.field_149933_a.nextGaussian() * f3;
|
||||
entityitem.motionY = (float) this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float) this.field_149933_a.nextGaussian() * f3;
|
||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
||||
}
|
||||
}
|
||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
||||
}
|
||||
}
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
}
|
||||
|
||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote)
|
||||
{
|
||||
if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking())
|
||||
{
|
||||
} else if(!player.isSneaking()) {
|
||||
TileEntityMachineSeleniumEngine entity = (TileEntityMachineSeleniumEngine) world.getTileEntity(x, y, z);
|
||||
if(entity != null)
|
||||
{
|
||||
if(entity != null) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_machine_selenium, world, x, y, z);
|
||||
}
|
||||
return true;
|
||||
@ -141,4 +129,17 @@ public class MachineSeleniumEngine extends BlockContainer {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + "Fuel efficiency:");
|
||||
for(FuelGrade grade : FuelGrade.values()) {
|
||||
Double efficiency = TileEntityMachineSeleniumEngine.fuelEfficiency.get(grade);
|
||||
|
||||
if(efficiency != null) {
|
||||
int eff = (int) (efficiency * 100);
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + grade.getGrade() + ": " + EnumChatFormatting.RED + "" + eff + "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +1,17 @@
|
||||
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.handler.MultiblockHandler;
|
||||
import com.hbm.interfaces.IMultiblock;
|
||||
import com.hbm.inventory.fluid.FluidTypeCombustible.FuelGrade;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.tileentity.machine.TileEntityDummy;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTurbofan;
|
||||
|
||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||
@ -22,10 +26,11 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class MachineTurbofan extends BlockContainer implements IMultiblock {
|
||||
public class MachineTurbofan extends BlockContainer implements IMultiblock, ITooltipProvider {
|
||||
|
||||
public MachineTurbofan(Material p_i45386_1_) {
|
||||
super(p_i45386_1_);
|
||||
@ -316,4 +321,11 @@ public class MachineTurbofan extends BlockContainer implements IMultiblock {
|
||||
|
||||
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) {
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + "Fuel efficiency:");
|
||||
list.add(EnumChatFormatting.YELLOW + "-" + FuelGrade.AERO.getGrade() + ": " + EnumChatFormatting.RED + "100%");
|
||||
}
|
||||
}
|
||||
@ -21,9 +21,9 @@ public class PowderRecipes {
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_power, 5), new Object[] { REDSTONE.dust(), "dustGlowstone", DIAMOND.dust(), NP237.dust(), MAGTUNG.dust() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ballistite, 3), new Object[] { Items.gunpowder, KNO.dust(), Items.sugar });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ball_dynamite, 2), new Object[] { KNO.dust(), Items.sugar, Blocks.sand, KEY_TOOL_CHEMISTRYSET });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ball_tnt, 4), new Object[] { new ItemStack(ModItems.fluid_tank_full, 1, Fluids.AROMATICS.getID()), KNO.dust(), KEY_TOOL_CHEMISTRYSET });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ball_tnt, 4), new Object[] { Fluids.AROMATICS.getDict(1000), KNO.dust(), KEY_TOOL_CHEMISTRYSET });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.ingot_steel_dusted, 1), new Object[] { STEEL.ingot(), COAL.dust() });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_bakelite, 2), new Object[] { new ItemStack(ModItems.fluid_tank_full, 1, Fluids.AROMATICS.getID()), new ItemStack(ModItems.fluid_tank_full, 1, Fluids.PETROLEUM.getID()), KEY_TOOL_CHEMISTRYSET });
|
||||
CraftingManager.addShapelessAuto(new ItemStack(ModItems.powder_bakelite, 2), new Object[] { Fluids.AROMATICS.getDict(1000), Fluids.PETROLEUM.getDict(1000), KEY_TOOL_CHEMISTRYSET });
|
||||
|
||||
//Gunpowder
|
||||
CraftingManager.addShapelessAuto(new ItemStack(Items.gunpowder, 3), new Object[] { S.dust(), KNO.dust(), COAL.gem() });
|
||||
|
||||
@ -4,11 +4,15 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.gui.GUIScreenBobmazon.Offer;
|
||||
import com.hbm.inventory.gui.GUIScreenBobmazon.Requirement;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemBattery;
|
||||
import com.hbm.items.special.ItemKitCustom;
|
||||
import com.hbm.items.special.ItemKitNBT;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BobmazonOfferFactory {
|
||||
@ -158,12 +162,14 @@ public class BobmazonOfferFactory {
|
||||
tools.add(new Offer(new ItemStack(ModItems.hazmat_red_kit), Requirement.CHEMICS, 100 * inflation));
|
||||
tools.add(new Offer(new ItemStack(ModItems.hazmat_grey_kit), Requirement.OIL, 160 * inflation));
|
||||
|
||||
special.add(new Offer(new ItemStack(Items.iron_ingot, 64), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_steel, 64), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_copper, 64), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_red_copper, 64), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_titanium, 64), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_tungsten, 64), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_cobalt, 64), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_desh, 64), Requirement.STEEL, 1));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_tantalium, 64), Requirement.STEEL, 5));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_bismuth, 16), Requirement.STEEL, 5));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_schrabidium, 16), Requirement.STEEL, 5));
|
||||
@ -176,6 +182,7 @@ public class BobmazonOfferFactory {
|
||||
special.add(new Offer(new ItemStack(ModItems.ammo_container, 16), Requirement.STEEL, 5));
|
||||
special.add(new Offer(new ItemStack(ModItems.nuke_starter_kit), Requirement.STEEL, 5));
|
||||
special.add(new Offer(new ItemStack(ModItems.nuke_advanced_kit), Requirement.STEEL, 5));
|
||||
special.add(new Offer(new ItemStack(ModItems.nuke_commercially_kit), Requirement.STEEL, 5));
|
||||
special.add(new Offer(new ItemStack(ModItems.boy_kit), Requirement.STEEL, 5));
|
||||
special.add(new Offer(new ItemStack(ModItems.prototype_kit), Requirement.STEEL, 10));
|
||||
special.add(new Offer(new ItemStack(ModItems.missile_kit), Requirement.STEEL, 5));
|
||||
@ -200,27 +207,77 @@ public class BobmazonOfferFactory {
|
||||
special.add(new Offer(new ItemStack(ModItems.sat_laser, 1), Requirement.HIDDEN, 8));
|
||||
special.add(new Offer(new ItemStack(ModItems.sat_gerald, 1), Requirement.HIDDEN, 32));
|
||||
special.add(new Offer(new ItemStack(ModItems.billet_yharonite, 4), Requirement.HIDDEN, 16));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_chainsteel, 1), Requirement.HIDDEN, 16));
|
||||
special.add(new Offer(new ItemStack(ModItems.ingot_electronium, 1), Requirement.HIDDEN, 16));
|
||||
special.add(new Offer(new ItemStack(ModItems.book_of_, 1), Requirement.HIDDEN, 16));
|
||||
special.add(new Offer(new ItemStack(ModItems.mese_pickaxe, 1), Requirement.HIDDEN, 16));
|
||||
special.add(new Offer(new ItemStack(ModItems.mysteryshovel, 1), Requirement.HIDDEN, 16));
|
||||
special.add(new Offer(new ItemStack(ModBlocks.ntm_dirt, 1), Requirement.HIDDEN, 16));
|
||||
special.add(new Offer(new ItemStack(ModItems.euphemium_kit, 1), Requirement.HIDDEN, 64));
|
||||
|
||||
special.add(new Offer(ItemKitCustom.create("Fusion Man", "For the nuclear physicist on the go", 0xff00ff, 0x800080,
|
||||
new ItemStack(ModBlocks.iter),
|
||||
new ItemStack(ModBlocks.plasma_heater),
|
||||
new ItemStack(ModItems.fusion_shield_vaporwave),
|
||||
ItemBattery.getFullBattery(ModItems.battery_spark),
|
||||
new ItemStack(ModBlocks.machine_chemplant, 10),
|
||||
new ItemStack(ModBlocks.machine_fluidtank, 8),
|
||||
new ItemStack(ModBlocks.red_wire_coated, 64),
|
||||
new ItemStack(ModBlocks.red_cable, 64),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.DEUTERIUM.getID()),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.TRITIUM.getID()),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.XENON.getID()),
|
||||
new ItemStack(ModItems.fluid_barrel_full, 64, Fluids.MERCURY.getID()),
|
||||
new ItemStack(ModBlocks.red_pylon_large, 8),
|
||||
new ItemStack(ModBlocks.substation, 4),
|
||||
new ItemStack(ModBlocks.red_pylon, 16),
|
||||
new ItemStack(ModBlocks.red_connector, 64),
|
||||
new ItemStack(ModItems.wiring_red_copper, 1),
|
||||
new ItemStack(ModBlocks.machine_chungus, 1),
|
||||
new ItemStack(ModBlocks.machine_large_turbine, 3),
|
||||
new ItemStack(ModItems.template_folder, 1),
|
||||
new ItemStack(Items.paper, 64),
|
||||
new ItemStack(Items.dye, 64)
|
||||
), Requirement.HIDDEN, 64));
|
||||
|
||||
special.add(new Offer(ItemKitCustom.create("Maid's Cleaning Utensils", "For the heard to reach spots", 0x00ff00, 0x008000,
|
||||
new ItemStack(ModItems.gun_calamity),
|
||||
new ItemStack(ModItems.ammo_50bmg_chlorophyte, 64),
|
||||
new ItemStack(ModItems.ammo_50bmg_chlorophyte, 64),
|
||||
new ItemStack(ModItems.ammo_50bmg_chlorophyte, 64),
|
||||
new ItemStack(ModItems.ammo_50bmg_star, 64),
|
||||
new ItemStack(ModItems.ammo_50bmg_star, 64),
|
||||
new ItemStack(ModItems.gun_supershotgun),
|
||||
new ItemStack(ModItems.ammo_12gauge_du, 64),
|
||||
new ItemStack(ModItems.ammo_12gauge_du, 64),
|
||||
new ItemStack(ModItems.ammo_12gauge_shrapnel, 64),
|
||||
new ItemStack(ModItems.ammo_12gauge_shrapnel, 64),
|
||||
new ItemStack(ModItems.ammo_12gauge_marauder, 4),
|
||||
new ItemStack(ModItems.gun_sauer),
|
||||
new ItemStack(ModItems.ammo_4gauge, 64),
|
||||
new ItemStack(ModItems.ammo_4gauge_claw, 64),
|
||||
new ItemStack(ModItems.ammo_4gauge_kampf, 64),
|
||||
new ItemStack(ModItems.ammo_4gauge_flechette, 64),
|
||||
new ItemStack(ModItems.ammo_4gauge_void, 64)
|
||||
), Requirement.HIDDEN, 64));
|
||||
|
||||
special.add(new Offer(ItemKitNBT.create(
|
||||
new ItemStack(ModItems.rod_of_discord).setStackDisplayName("Cock Joke"),
|
||||
new ItemStack(ModItems.canned_jizz, 64).setStackDisplayName("Class A Horse Semen"),
|
||||
new ItemStack(ModItems.pipe_lead).setStackDisplayName("Get Nutted, Dumbass"),
|
||||
new ItemStack(ModItems.gem_alexandrite)
|
||||
).setStackDisplayName("The Nut Bucket"), Requirement.HIDDEN, 64));
|
||||
}
|
||||
|
||||
public static List<Offer> getOffers(ItemStack stack) {
|
||||
|
||||
if(stack != null) {
|
||||
|
||||
if(stack.getItem() == ModItems.bobmazon_materials)
|
||||
return materials;
|
||||
if(stack.getItem() == ModItems.bobmazon_machines)
|
||||
return machines;
|
||||
if(stack.getItem() == ModItems.bobmazon_weapons)
|
||||
return weapons;
|
||||
if(stack.getItem() == ModItems.bobmazon_tools)
|
||||
return tools;
|
||||
if(stack.getItem() == ModItems.bobmazon_hidden)
|
||||
return special;
|
||||
if(stack.getItem() == ModItems.bobmazon_materials) return materials;
|
||||
if(stack.getItem() == ModItems.bobmazon_machines) return machines;
|
||||
if(stack.getItem() == ModItems.bobmazon_weapons) return weapons;
|
||||
if(stack.getItem() == ModItems.bobmazon_tools) return tools;
|
||||
if(stack.getItem() == ModItems.bobmazon_hidden) return special;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@ -327,8 +327,8 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_chemplant: {
|
||||
if(entity instanceof TileEntityMachineChemplant) {
|
||||
return new ContainerMachineChemplant(player.inventory, (TileEntityMachineChemplant) entity);
|
||||
if(entity instanceof TileEntityMachineChemplantNew) {
|
||||
return new ContainerMachineChemplant(player.inventory, (TileEntityMachineChemplantNew) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -1167,8 +1167,8 @@ public class GUIHandler implements IGuiHandler {
|
||||
}
|
||||
|
||||
case ModBlocks.guiID_machine_chemplant: {
|
||||
if(entity instanceof TileEntityMachineChemplant) {
|
||||
return new GUIMachineChemplant(player.inventory, (TileEntityMachineChemplant) entity);
|
||||
if(entity instanceof TileEntityMachineChemplantNew) {
|
||||
return new GUIMachineChemplant(player.inventory, (TileEntityMachineChemplantNew) entity);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -2,13 +2,16 @@ package com.hbm.handler.nei;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.gui.GUIMachineChemplant;
|
||||
import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.lib.RefStrings;
|
||||
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
@ -18,70 +21,78 @@ import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ChemplantRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();
|
||||
public LinkedList<RecipeTransferRect> transferRectsGui = new LinkedList<RecipeTransferRect>();
|
||||
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
|
||||
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||
|
||||
public class SmeltingSet extends TemplateRecipeHandler.CachedRecipe
|
||||
{
|
||||
PositionedStack input1;
|
||||
PositionedStack input2;
|
||||
PositionedStack input3;
|
||||
PositionedStack input4;
|
||||
PositionedStack inputF1;
|
||||
PositionedStack inputF2;
|
||||
PositionedStack output1;
|
||||
PositionedStack output2;
|
||||
PositionedStack output3;
|
||||
PositionedStack output4;
|
||||
PositionedStack outputF1;
|
||||
PositionedStack outputF2;
|
||||
public LinkedList<RecipeTransferRect> transferRectsRec = new LinkedList<RecipeTransferRect>();
|
||||
public LinkedList<RecipeTransferRect> transferRectsGui = new LinkedList<RecipeTransferRect>();
|
||||
public LinkedList<Class<? extends GuiContainer>> guiRec = new LinkedList<Class<? extends GuiContainer>>();
|
||||
public LinkedList<Class<? extends GuiContainer>> guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||
|
||||
public class RecipeSet extends TemplateRecipeHandler.CachedRecipe {
|
||||
PositionedStack[] itemIn = new PositionedStack[4];
|
||||
PositionedStack[] fluidIn = new PositionedStack[2];
|
||||
PositionedStack[] itemOut = new PositionedStack[4];
|
||||
PositionedStack[] fluidOut = new PositionedStack[2];
|
||||
PositionedStack template;
|
||||
|
||||
public SmeltingSet(ItemStack inputF1, ItemStack inputF2, ItemStack input1,
|
||||
ItemStack input2, ItemStack input3, ItemStack input4, ItemStack outputF1,
|
||||
ItemStack outputF2, ItemStack output1, ItemStack output2, ItemStack output3,
|
||||
ItemStack output4, ItemStack template) {
|
||||
this.inputF1 = new PositionedStack(inputF1, 30, 6);
|
||||
this.inputF2 = new PositionedStack(inputF2, 30 + 18, 6);
|
||||
this.input1 = new PositionedStack(input1, 30, 6 + 18);
|
||||
this.input2 = new PositionedStack(input2, 30 + 18, 6 + 18);
|
||||
this.input3 = new PositionedStack(input3, 30, 6 + 36);
|
||||
this.input4 = new PositionedStack(input4, 30 + 18, 6 + 36);
|
||||
this.outputF1 = new PositionedStack(outputF1, 120, 6);
|
||||
this.outputF2 = new PositionedStack(outputF2, 120 + 18, 6);
|
||||
this.output1 = new PositionedStack(output1, 120, 6 + 18);
|
||||
this.output2 = new PositionedStack(output2, 120 + 18, 6 + 18);
|
||||
this.output3 = new PositionedStack(output3, 120, 6 + 36);
|
||||
this.output4 = new PositionedStack(output4, 120 + 18, 6 + 36);
|
||||
this.template = new PositionedStack(template, 84, 6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecipeSet(ChemRecipe recipe) {
|
||||
|
||||
for(int i = 0; i < recipe.inputs.length; i++) {
|
||||
AStack in = recipe.inputs[i];
|
||||
if(in == null) continue;
|
||||
this.itemIn[i] = new PositionedStack(in.extractForNEI(), 30 + (i % 2) * 18, 24 + (i / 2) * 18);
|
||||
}
|
||||
|
||||
for(int i = 0; i < recipe.inputFluids.length; i++) {
|
||||
FluidStack in = recipe.inputFluids[i];
|
||||
if(in == null) continue;
|
||||
ItemStack drop = ItemFluidIcon.make(in.type, in.fill);
|
||||
this.fluidIn[i] = new PositionedStack(drop, 30 + (i % 2) * 18, 6);
|
||||
}
|
||||
|
||||
for(int i = 0; i < recipe.outputs.length; i++) {
|
||||
ItemStack out = recipe.outputs[i];
|
||||
if(out == null) continue;
|
||||
this.itemOut[i] = new PositionedStack(out, 120 + (i % 2) * 18, 24 + (i / 2) * 18);
|
||||
}
|
||||
|
||||
for(int i = 0; i < recipe.outputFluids.length; i++) {
|
||||
FluidStack out = recipe.outputFluids[i];
|
||||
if(out == null) continue;
|
||||
ItemStack drop = ItemFluidIcon.make(out.type, out.fill);
|
||||
this.fluidOut[i] = new PositionedStack(drop, 120 + (i % 2) * 18, 6);
|
||||
}
|
||||
|
||||
this.template = new PositionedStack(new ItemStack(ModItems.chemistry_template, 1, recipe.getId()), 84, 6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients() {
|
||||
return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] {input1, input2, input3, input4, inputF1, inputF2, template}));
|
||||
}
|
||||
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
|
||||
|
||||
for(PositionedStack stack : itemIn) if(stack != null) stacks.add(stack);
|
||||
for(PositionedStack stack : fluidIn) if(stack != null) stacks.add(stack);
|
||||
stacks.add(template);
|
||||
|
||||
return getCycledIngredients(cycleticks / 20, stacks);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public List<PositionedStack> getOtherStacks() {
|
||||
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
|
||||
stacks.add(output1);
|
||||
stacks.add(output2);
|
||||
stacks.add(output3);
|
||||
stacks.add(output4);
|
||||
stacks.add(outputF1);
|
||||
stacks.add(outputF2);
|
||||
return stacks;
|
||||
}
|
||||
List<PositionedStack> stacks = new ArrayList<PositionedStack>();
|
||||
|
||||
for(PositionedStack stack : itemOut) if(stack != null) stacks.add(stack);
|
||||
for(PositionedStack stack : fluidOut) if(stack != null) stacks.add(stack);
|
||||
stacks.add(template);
|
||||
|
||||
return stacks;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public PositionedStack getResult() {
|
||||
return output1;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeName() {
|
||||
return "Chemical Plant";
|
||||
@ -91,26 +102,14 @@ public class ChemplantRecipeHandler extends TemplateRecipeHandler {
|
||||
public String getGuiTexture() {
|
||||
return RefStrings.MODID + ":textures/gui/nei/gui_nei_chemplant.png";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results) {
|
||||
if ((outputId.equals("chemistry")) && getClass() == ChemplantRecipeHandler.class) {
|
||||
Map<Object[], Object[]> recipes = MachineRecipes.instance().getChemistryRecipes();
|
||||
for (Map.Entry<Object[], Object[]> recipe : recipes.entrySet()) {
|
||||
this.arecipes.add(new SmeltingSet(
|
||||
(ItemStack)recipe.getKey()[0],
|
||||
(ItemStack)recipe.getKey()[1],
|
||||
(ItemStack)recipe.getKey()[2],
|
||||
(ItemStack)recipe.getKey()[3],
|
||||
(ItemStack)recipe.getKey()[4],
|
||||
(ItemStack)recipe.getKey()[5],
|
||||
(ItemStack)recipe.getValue()[0],
|
||||
(ItemStack)recipe.getValue()[1],
|
||||
(ItemStack)recipe.getValue()[2],
|
||||
(ItemStack)recipe.getValue()[3],
|
||||
(ItemStack)recipe.getValue()[4],
|
||||
(ItemStack)recipe.getValue()[5],
|
||||
(ItemStack)recipe.getKey()[6]));
|
||||
|
||||
if((outputId.equals("chemistry")) && getClass() == ChemplantRecipeHandler.class) {
|
||||
|
||||
for(ChemRecipe recipe : ChemplantRecipes.recipes) {
|
||||
this.arecipes.add(new RecipeSet(recipe));
|
||||
}
|
||||
} else {
|
||||
super.loadCraftingRecipes(outputId, results);
|
||||
@ -119,34 +118,35 @@ public class ChemplantRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result) {
|
||||
Map<Object[], Object[]> recipes = MachineRecipes.instance().getChemistryRecipes();
|
||||
for (Map.Entry<Object[], Object[]> recipe : recipes.entrySet()) {
|
||||
if (compareFluidStacks(result, (ItemStack)recipe.getValue()[0]) ||
|
||||
compareFluidStacks(result, (ItemStack)recipe.getValue()[1]) ||
|
||||
NEIServerUtils.areStacksSameTypeCrafting(result, (ItemStack)recipe.getValue()[2]) ||
|
||||
NEIServerUtils.areStacksSameTypeCrafting(result, (ItemStack)recipe.getValue()[3]) ||
|
||||
NEIServerUtils.areStacksSameTypeCrafting(result, (ItemStack)recipe.getValue()[4]) ||
|
||||
NEIServerUtils.areStacksSameTypeCrafting(result, (ItemStack)recipe.getValue()[5]))
|
||||
this.arecipes.add(new SmeltingSet(
|
||||
(ItemStack)recipe.getKey()[0],
|
||||
(ItemStack)recipe.getKey()[1],
|
||||
(ItemStack)recipe.getKey()[2],
|
||||
(ItemStack)recipe.getKey()[3],
|
||||
(ItemStack)recipe.getKey()[4],
|
||||
(ItemStack)recipe.getKey()[5],
|
||||
(ItemStack)recipe.getValue()[0],
|
||||
(ItemStack)recipe.getValue()[1],
|
||||
(ItemStack)recipe.getValue()[2],
|
||||
(ItemStack)recipe.getValue()[3],
|
||||
(ItemStack)recipe.getValue()[4],
|
||||
(ItemStack)recipe.getValue()[5],
|
||||
(ItemStack)recipe.getKey()[6]));
|
||||
|
||||
outer:
|
||||
for(ChemRecipe recipe : ChemplantRecipes.recipes) {
|
||||
|
||||
for(ItemStack out : recipe.outputs) {
|
||||
|
||||
if(out != null && NEIServerUtils.areStacksSameTypeCrafting(result, out)) {
|
||||
this.arecipes.add(new RecipeSet(recipe));
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
|
||||
for(FluidStack out : recipe.outputFluids) {
|
||||
|
||||
if(out != null) {
|
||||
ItemStack drop = ItemFluidIcon.make(out.type, out.fill);
|
||||
|
||||
if(compareFluidStacks(result, drop)) {
|
||||
this.arecipes.add(new RecipeSet(recipe));
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(String inputId, Object... ingredients) {
|
||||
if ((inputId.equals("chemistry")) && getClass() == ChemplantRecipeHandler.class) {
|
||||
if((inputId.equals("chemistry")) && getClass() == ChemplantRecipeHandler.class) {
|
||||
loadCraftingRecipes("chemistry", new Object[0]);
|
||||
} else {
|
||||
super.loadUsageRecipes(inputId, ingredients);
|
||||
@ -155,64 +155,68 @@ public class ChemplantRecipeHandler extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient) {
|
||||
Map<Object[], Object[]> recipes = MachineRecipes.instance().getChemistryRecipes();
|
||||
for (Map.Entry<Object[], Object[]> recipe : recipes.entrySet()) {
|
||||
if (compareFluidStacks(ingredient, (ItemStack)recipe.getKey()[0]) ||
|
||||
compareFluidStacks(ingredient, (ItemStack)recipe.getKey()[1]) ||
|
||||
NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()[2]) ||
|
||||
NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()[3]) ||
|
||||
NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()[4]) ||
|
||||
NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()[5]) ||
|
||||
NEIServerUtils.areStacksSameTypeCrafting(ingredient, (ItemStack)recipe.getKey()[6]))
|
||||
this.arecipes.add(new SmeltingSet(
|
||||
(ItemStack)recipe.getKey()[0],
|
||||
(ItemStack)recipe.getKey()[1],
|
||||
(ItemStack)recipe.getKey()[2],
|
||||
(ItemStack)recipe.getKey()[3],
|
||||
(ItemStack)recipe.getKey()[4],
|
||||
(ItemStack)recipe.getKey()[5],
|
||||
(ItemStack)recipe.getValue()[0],
|
||||
(ItemStack)recipe.getValue()[1],
|
||||
(ItemStack)recipe.getValue()[2],
|
||||
(ItemStack)recipe.getValue()[3],
|
||||
(ItemStack)recipe.getValue()[4],
|
||||
(ItemStack)recipe.getValue()[5],
|
||||
(ItemStack)recipe.getKey()[6]));
|
||||
|
||||
outer:
|
||||
for(ChemRecipe recipe : ChemplantRecipes.recipes) {
|
||||
|
||||
for(AStack in : recipe.inputs) {
|
||||
|
||||
if(in != null) {
|
||||
List<ItemStack> stacks = in.extractForNEI();
|
||||
|
||||
for(ItemStack stack : stacks) {
|
||||
if(NEIServerUtils.areStacksSameTypeCrafting(ingredient, stack)) {
|
||||
this.arecipes.add(new RecipeSet(recipe));
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(FluidStack in : recipe.inputFluids) {
|
||||
|
||||
if(in != null) {
|
||||
ItemStack drop = ItemFluidIcon.make(in.type, in.fill);
|
||||
|
||||
if(compareFluidStacks(ingredient, drop)) {
|
||||
this.arecipes.add(new RecipeSet(recipe));
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private boolean compareFluidStacks(ItemStack sta1, ItemStack sta2) {
|
||||
return sta1.getItem() == sta2.getItem() && sta1.getItemDamage() == sta2.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
//return GUITestDiFurnace.class;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRectsGui = new LinkedList<RecipeTransferRect>();
|
||||
guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||
@Override
|
||||
public Class<? extends GuiContainer> getGuiClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(138 - 1 - 72, 23, 18 * 3, 18), "chemistry"));
|
||||
transferRectsGui.add(new RecipeTransferRect(new Rectangle(18 * 2 + 2, 89 - 7 - 11, 18 * 5 - 4, 18 + 16), "chemistry"));
|
||||
guiGui.add(GUIMachineChemplant.class);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
|
||||
}
|
||||
@Override
|
||||
public void loadTransferRects() {
|
||||
transferRectsGui = new LinkedList<RecipeTransferRect>();
|
||||
guiGui = new LinkedList<Class<? extends GuiContainer>>();
|
||||
|
||||
@Override
|
||||
public void drawExtras(int recipe) {
|
||||
transferRects.add(new RecipeTransferRect(new Rectangle(138 - 1 - 72, 23, 18 * 3, 18), "chemistry"));
|
||||
transferRectsGui.add(new RecipeTransferRect(new Rectangle(18 * 2 + 2, 89 - 7 - 11, 18 * 5 - 4, 18 + 16), "chemistry"));
|
||||
guiGui.add(GUIMachineChemplant.class);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(getRecipeTransferRectGuis(), transferRects);
|
||||
RecipeTransferRectHandler.registerRectsToGuis(guiGui, transferRectsGui);
|
||||
}
|
||||
|
||||
drawProgressBar(83 - (18 * 4) - 9 + 1, 6, 0, 86, 16, 18 * 3 - 2, 480, 7);
|
||||
|
||||
drawProgressBar(83 - 3 + 16 + 5 - 36, 5 + 18, 16, 86, 18 * 3, 18, 48, 0);
|
||||
}
|
||||
@Override
|
||||
public void drawExtras(int recipe) {
|
||||
|
||||
@Override
|
||||
public TemplateRecipeHandler newInstance() {
|
||||
return super.newInstance();
|
||||
}
|
||||
drawProgressBar(83 - (18 * 4) - 9 + 1, 6, 0, 86, 16, 18 * 3 - 2, 480, 7);
|
||||
drawProgressBar(83 - 3 + 16 + 5 - 36, 5 + 18, 16, 86, 18 * 3, 18, 48, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateRecipeHandler newInstance() {
|
||||
return super.newInstance();
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ public class SILEXRecipeHandler extends TemplateRecipeHandler {
|
||||
this.outputs = new ArrayList<PositionedStack>();
|
||||
this.chances = new ArrayList<Double>();
|
||||
this.produced = recipe.fluidProduced / recipe.fluidConsumed;
|
||||
this.crystalStrength = EnumWavelengths.values()[recipe.laserStrength];
|
||||
this.crystalStrength = recipe.laserStrength;
|
||||
|
||||
double weight = 0;
|
||||
|
||||
|
||||
@ -3,10 +3,8 @@ package com.hbm.hazard.type;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.handler.ArmorModHandler;
|
||||
import com.hbm.hazard.modifier.HazardModifier;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.armor.ItemModGloves;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
|
||||
@ -4,6 +4,16 @@ import com.hbm.inventory.fluid.FluidType;
|
||||
|
||||
public interface IFluidAcceptor extends IFluidContainer {
|
||||
|
||||
int getMaxFluidFill(FluidType type);
|
||||
int getMaxFillForReceive(FluidType type);
|
||||
|
||||
/*
|
||||
* Behavior for overriding when a fluid container has matching types as in and outputs
|
||||
* Only a temporary fix until the fluid system is rewritten
|
||||
*/
|
||||
default void setFillForTransferIncoming(int fill, FluidType type) {
|
||||
this.setFillForTransfer(fill, type);
|
||||
}
|
||||
default int getFluidFillIncoming(FluidType type) {
|
||||
return this.getFluidFill(type);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,22 +1,17 @@
|
||||
package com.hbm.interfaces;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
|
||||
public interface IFluidContainer {
|
||||
|
||||
//Args: fill, what the fill should be set to; index, index for array if there are multiple tanks
|
||||
public void setFillstate(int fill, int index);
|
||||
public void setFillForSync(int fill, int index);
|
||||
|
||||
//Args: fill: what the fill should be set to; type, what type the tank in question has
|
||||
void setFluidFill(int fill, FluidType type);
|
||||
void setFillForTransfer(int fill, FluidType type);
|
||||
|
||||
//Args: type, what the type should be set to; index, index for array if there are multiple tanks
|
||||
public void setType(FluidType type, int index);
|
||||
|
||||
public List<FluidTank> getTanks();
|
||||
public void setTypeForSync(FluidType type, int index);
|
||||
|
||||
//Args: type, what type the tank in question has
|
||||
int getFluidFill(FluidType type);
|
||||
|
||||
@ -14,4 +14,15 @@ public interface IFluidSource extends IFluidContainer {
|
||||
List<IFluidAcceptor> getFluidList(FluidType type);
|
||||
void clearFluidList(FluidType type);
|
||||
|
||||
/*
|
||||
* Behavior for overriding when a fluid container has matching types as in and outputs
|
||||
* Only a temporary fix until the fluid system is rewritten
|
||||
*/
|
||||
default void setFillForTransferOutgoing(int fill, FluidType type) {
|
||||
this.setFillForTransfer(fill, type);
|
||||
}
|
||||
default int getFluidFillOutgoing(FluidType type) {
|
||||
return this.getFluidFill(type);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@ import com.hbm.items.ModItems;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class FluidContainerRegistry {
|
||||
|
||||
@ -74,6 +75,9 @@ public class FluidContainerRegistry {
|
||||
FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.particle_hydrogen), new ItemStack(ModItems.particle_empty), Fluids.HYDROGEN, 1000));
|
||||
FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.particle_amat), new ItemStack(ModItems.particle_empty), Fluids.AMAT, 1000));
|
||||
FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.particle_aschrab), new ItemStack(ModItems.particle_empty), Fluids.ASCHRAB, 1000));
|
||||
|
||||
FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(ModItems.iv_xp), new ItemStack(ModItems.iv_xp_empty), Fluids.XPJUICE, 100));
|
||||
FluidContainerRegistry.registerContainer(new FluidContainer(new ItemStack(Items.experience_bottle), new ItemStack(Items.glass_bottle), Fluids.XPJUICE, 100));
|
||||
|
||||
FluidType[] fluids = Fluids.getAll();
|
||||
for(int i = 1; i < fluids.length; i++) {
|
||||
@ -95,6 +99,7 @@ public class FluidContainerRegistry {
|
||||
|
||||
public static void registerContainer(FluidContainer con) {
|
||||
allContainers.add(con);
|
||||
OreDictionary.registerOre(con.type.getDict(con.content), con.fullContainer);
|
||||
}
|
||||
|
||||
public static int getFluidContent(ItemStack stack, FluidType type) {
|
||||
|
||||
@ -90,7 +90,7 @@ public class FluidTank {
|
||||
}
|
||||
|
||||
//Fills tank from canisters
|
||||
public void loadTank(int in, int out, ItemStack[] slots) {
|
||||
public boolean loadTank(int in, int out, ItemStack[] slots) {
|
||||
|
||||
FluidType inType = Fluids.NONE;
|
||||
if(slots[in] != null) {
|
||||
@ -101,27 +101,27 @@ public class FluidTank {
|
||||
|
||||
if(slots[in].getItem() == ModItems.fluid_barrel_infinite && type != Fluids.NONE) {
|
||||
this.fluid = this.maxFluid;
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
if(slots[in].getItem() == ModItems.inf_water && this.type == Fluids.WATER) {
|
||||
this.fluid += 50;
|
||||
if(this.fluid > this.maxFluid)
|
||||
this.fluid = this.maxFluid;
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
if(slots[in].getItem() == ModItems.inf_water_mk2 && this.type == Fluids.WATER) {
|
||||
this.fluid += 500;
|
||||
if(this.fluid > this.maxFluid)
|
||||
this.fluid = this.maxFluid;
|
||||
return;
|
||||
return true;
|
||||
}
|
||||
|
||||
if(FluidContainerRegistry.getFluidContent(slots[in], type) <= 0)
|
||||
return;
|
||||
return false;
|
||||
} else {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(slots[in] != null && inType.getName().equals(type.getName()) && fluid + FluidContainerRegistry.getFluidContent(slots[in], type) <= maxFluid) {
|
||||
@ -141,7 +141,11 @@ public class FluidTank {
|
||||
if(slots[in].stackSize <= 0)
|
||||
slots[in] = null;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//Fills canisters from tank
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
package com.hbm.inventory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
//i love you
|
||||
@ -15,15 +18,21 @@ import com.hbm.hazard.HazardRegistry;
|
||||
import com.hbm.hazard.HazardSystem;
|
||||
import com.hbm.items.ItemEnums.EnumCokeType;
|
||||
import com.hbm.items.ItemEnums.EnumTarType;
|
||||
import com.hbm.main.MainRegistry;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent;
|
||||
|
||||
//the more i optimize this, the more it starts looking like gregtech
|
||||
public class OreDictManager {
|
||||
|
||||
/** Alternate, additional names for ore dict registration. Used mostly for DictGroups */
|
||||
private static final HashMap<String, HashSet<String>> reRegistration = new HashMap();
|
||||
|
||||
/*
|
||||
* Standard keys
|
||||
@ -63,6 +72,10 @@ public class OreDictManager {
|
||||
public static final String KEY_CRACK_TAR = "cracktar";
|
||||
public static final String KEY_COAL_TAR = "coaltar";
|
||||
|
||||
public static final String KEY_UNIVERSAL_TANK = "ntmuniversaltank";
|
||||
public static final String KEY_HAZARD_TANK = "ntmuhazardtank";
|
||||
public static final String KEY_UNIVERSAL_BARREL = "ntmuniversalbarrel";
|
||||
|
||||
public static final String KEY_TOOL_SCREWDRIVER = "ntmscrewdriver";
|
||||
public static final String KEY_TOOL_HANDDRILL = "ntmhanddrill";
|
||||
public static final String KEY_TOOL_CHEMISTRYSET = "ntmchemistryset";
|
||||
@ -220,14 +233,14 @@ public class OreDictManager {
|
||||
/*
|
||||
* COLLECTIONS
|
||||
*/
|
||||
public static final DictFrame ANY_PLASTIC = new DictFrame("AnyPlastic"); //using the Any prefix means that it's jsut the secondary prefix, and that shape prefixes are applicable
|
||||
public static final DictGroup ANY_PLASTIC = new DictGroup("AnyPlastic", POLYMER, BAKELITE); //using the Any prefix means that it's jsut the secondary prefix, and that shape prefixes are applicable
|
||||
public static final DictFrame ANY_GUNPOWDER = new DictFrame("AnyPropellant");
|
||||
public static final DictFrame ANY_SMOKELESS = new DictFrame("AnySmokeless");
|
||||
public static final DictFrame ANY_PLASTICEXPLOSIVE = new DictFrame("AnyPlasticexplosive");
|
||||
public static final DictFrame ANY_HIGHEXPLOSIVE = new DictFrame("AnyHighexplosive");
|
||||
public static final DictFrame ANY_COKE = new DictFrame("AnyCoke", "Coke");
|
||||
public static final DictFrame ANY_CONCRETE = new DictFrame("Concrete"); //no any prefix means that any has to be appended with the any() or anys() getters, registering works with the any (i.e. no shape) setter
|
||||
public static final DictFrame ANY_TAR = new DictFrame("Tar");
|
||||
public static final DictGroup ANY_TAR = new DictGroup("Tar", KEY_OIL_TAR, KEY_COAL_TAR, KEY_CRACK_TAR);
|
||||
|
||||
public static void registerOres() {
|
||||
|
||||
@ -372,19 +385,21 @@ public class OreDictManager {
|
||||
/*
|
||||
* COLLECTIONS
|
||||
*/
|
||||
ANY_PLASTIC .ingot(ingot_polymer, ingot_bakelite).dust(powder_polymer, powder_bakelite);
|
||||
ANY_GUNPOWDER .dust(Items.gunpowder, ballistite, cordite);
|
||||
ANY_SMOKELESS .dust(ballistite, cordite);
|
||||
ANY_PLASTICEXPLOSIVE .ingot(ingot_semtex);
|
||||
ANY_HIGHEXPLOSIVE .ingot(ball_tnt);
|
||||
ANY_CONCRETE .any(concrete, concrete_smooth, concrete_colored, concrete_asbestos, ducrete, ducrete_smooth);
|
||||
ANY_COKE .gem(fromAll(coke, EnumCokeType.class));
|
||||
ANY_TAR .any(fromAll(oil_tar, EnumTarType.class));
|
||||
|
||||
OreDictionary.registerOre(KEY_OIL_TAR, fromOne(oil_tar, EnumTarType.CRUDE));
|
||||
OreDictionary.registerOre(KEY_CRACK_TAR, fromOne(oil_tar, EnumTarType.CRACK));
|
||||
OreDictionary.registerOre(KEY_COAL_TAR, fromOne(oil_tar, EnumTarType.COAL));
|
||||
|
||||
OreDictionary.registerOre(KEY_UNIVERSAL_TANK, new ItemStack(fluid_tank_full, 1, OreDictionary.WILDCARD_VALUE));
|
||||
OreDictionary.registerOre(KEY_HAZARD_TANK, new ItemStack(fluid_tank_lead_full, 1, OreDictionary.WILDCARD_VALUE));
|
||||
OreDictionary.registerOre(KEY_UNIVERSAL_BARREL, new ItemStack(fluid_barrel_full, 1, OreDictionary.WILDCARD_VALUE));
|
||||
|
||||
OreDictionary.registerOre(KEY_TOOL_SCREWDRIVER, new ItemStack(screwdriver, 1, OreDictionary.WILDCARD_VALUE));
|
||||
OreDictionary.registerOre(KEY_TOOL_SCREWDRIVER, new ItemStack(screwdriver_desh, 1, OreDictionary.WILDCARD_VALUE));
|
||||
OreDictionary.registerOre(KEY_TOOL_HANDDRILL, new ItemStack(hand_drill, 1, OreDictionary.WILDCARD_VALUE));
|
||||
@ -439,6 +454,33 @@ public class OreDictManager {
|
||||
return GeneralConfig.enableReflectorCompat ? "plateDenseLead" : "plateTungCar"; //let's just mangle the name into "tungCar" so that it can't conflict with anything ever
|
||||
}
|
||||
|
||||
public static void registerGroups() {
|
||||
ANY_PLASTIC.addPrefix(INGOT, true).addPrefix(DUST, true);
|
||||
ANY_TAR.addPrefix(ANY, false);
|
||||
}
|
||||
|
||||
private static boolean recursionBrake = false;
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRegisterOre(OreRegisterEvent event) {
|
||||
|
||||
if(recursionBrake)
|
||||
return;
|
||||
|
||||
recursionBrake = true;
|
||||
|
||||
HashSet<String> strings = reRegistration.get(event.Name);
|
||||
|
||||
if(strings != null) {
|
||||
for(String name : strings) {
|
||||
OreDictionary.registerOre(name, event.Ore);
|
||||
MainRegistry.logger.info("Re-registration for " + event.Name + " to " + name);
|
||||
}
|
||||
}
|
||||
|
||||
recursionBrake = false;
|
||||
}
|
||||
|
||||
public static class DictFrame {
|
||||
String[] mats;
|
||||
float hazMult = 1.0F;
|
||||
@ -604,4 +646,85 @@ public class OreDictManager {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class DictGroup {
|
||||
|
||||
private String groupName;
|
||||
private HashSet<String> names = new HashSet();
|
||||
|
||||
public DictGroup(String groupName) {
|
||||
this.groupName = groupName;
|
||||
}
|
||||
public DictGroup(String groupName, String... names) {
|
||||
this(groupName);
|
||||
this.addNames(names);
|
||||
}
|
||||
public DictGroup(String groupName, DictFrame... frames) {
|
||||
this(groupName);
|
||||
this.addFrames(frames);
|
||||
}
|
||||
|
||||
public DictGroup addNames(String... names) {
|
||||
for(String mat : names) this.names.add(mat);
|
||||
return this;
|
||||
}
|
||||
public DictGroup addFrames(DictFrame... frames) {
|
||||
for(DictFrame frame : frames) this.addNames(frame.mats);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Will add a reregistration entry for every mat name of every added DictFrame for the given prefix
|
||||
* @param prefix The prefix of both the input and result of the reregistration
|
||||
* @return
|
||||
*/
|
||||
public DictGroup addPrefix(String prefix, boolean inputPrefix) {
|
||||
|
||||
String group = prefix + groupName;
|
||||
|
||||
for(String name : names) {
|
||||
String original = (inputPrefix ? prefix : "") + name;
|
||||
addReRegistration(original, group);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* Same thing as addPrefix, but the input for the reregistration is not bound by the prefix or any mat names
|
||||
* @param prefix The prefix for the resulting reregistration entry (in full: prefix + group name)
|
||||
* @param original The full original ore dict key, not bound by any naming conventions
|
||||
* @return
|
||||
*/
|
||||
public DictGroup addFixed(String prefix, String original) {
|
||||
|
||||
String group = prefix + groupName;
|
||||
addReRegistration(original, group);
|
||||
return this;
|
||||
}
|
||||
|
||||
public String any() { return ANY + groupName; }
|
||||
public String nugget() { return NUGGET + groupName; }
|
||||
public String tiny() { return TINY + groupName; }
|
||||
public String ingot() { return INGOT + groupName; }
|
||||
public String dustTiny() { return DUSTTINY + groupName; }
|
||||
public String dust() { return DUST + groupName; }
|
||||
public String gem() { return GEM + groupName; }
|
||||
public String crystal() { return CRYSTAL + groupName; }
|
||||
public String plate() { return PLATE + groupName; }
|
||||
public String billet() { return BILLET + groupName; }
|
||||
public String block() { return BLOCK + groupName; }
|
||||
public String ore() { return ORE + groupName; }
|
||||
}
|
||||
|
||||
private static void addReRegistration(String original, String additional) {
|
||||
|
||||
HashSet<String> strings = reRegistration.get(original);
|
||||
|
||||
if(strings == null)
|
||||
strings = new HashSet();
|
||||
|
||||
strings.add(additional);
|
||||
|
||||
reRegistration.put(original, strings);
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,6 +93,14 @@ public class RecipesCommon {
|
||||
* @return
|
||||
*/
|
||||
public abstract List<ItemStack> extractForNEI();
|
||||
|
||||
public ItemStack extractForCyclingDisplay(int cycle) {
|
||||
List<ItemStack> list = extractForNEI();
|
||||
|
||||
cycle *= 50;
|
||||
|
||||
return list.get((int)(System.currentTimeMillis() % (cycle * list.size()) / cycle));
|
||||
}
|
||||
}
|
||||
|
||||
public static class ComparableStack extends AStack {
|
||||
|
||||
@ -1,143 +1,93 @@
|
||||
package com.hbm.inventory.container;
|
||||
|
||||
import com.hbm.inventory.SlotMachineOutput;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplantNew;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ContainerMachineChemplant extends Container {
|
||||
|
||||
private TileEntityMachineChemplant nukeBoy;
|
||||
private TileEntityMachineChemplantNew nukeBoy;
|
||||
|
||||
private int progress;
|
||||
private int maxProgress;
|
||||
|
||||
public ContainerMachineChemplant(InventoryPlayer invPlayer, TileEntityMachineChemplant tedf) {
|
||||
progress = 0;
|
||||
public ContainerMachineChemplant(InventoryPlayer invPlayer, TileEntityMachineChemplantNew tedf) {
|
||||
nukeBoy = tedf;
|
||||
|
||||
//Battery
|
||||
// Battery
|
||||
this.addSlotToContainer(new Slot(tedf, 0, 80, 18));
|
||||
//Upgrades
|
||||
// Upgrades
|
||||
this.addSlotToContainer(new Slot(tedf, 1, 116, 18));
|
||||
this.addSlotToContainer(new Slot(tedf, 2, 116, 36));
|
||||
this.addSlotToContainer(new Slot(tedf, 3, 116, 54));
|
||||
//Schematic
|
||||
// Schematic
|
||||
this.addSlotToContainer(new Slot(tedf, 4, 80, 54));
|
||||
//Outputs
|
||||
// Outputs
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 5, 134, 90));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 6, 152, 90));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 7, 134, 108));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 8, 152, 108));
|
||||
//Fluid Output In
|
||||
// Fluid Output In
|
||||
this.addSlotToContainer(new Slot(tedf, 9, 134, 54));
|
||||
this.addSlotToContainer(new Slot(tedf, 10, 152, 54));
|
||||
//Fluid Outputs Out
|
||||
// Fluid Outputs Out
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 11, 134, 72));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 12, 152, 72));
|
||||
//Input
|
||||
// Input
|
||||
this.addSlotToContainer(new Slot(tedf, 13, 8, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 14, 26, 90));
|
||||
this.addSlotToContainer(new Slot(tedf, 15, 8, 108));
|
||||
this.addSlotToContainer(new Slot(tedf, 16, 26, 108));
|
||||
//Fluid Input In
|
||||
// Fluid Input In
|
||||
this.addSlotToContainer(new Slot(tedf, 17, 8, 54));
|
||||
this.addSlotToContainer(new Slot(tedf, 18, 26, 54));
|
||||
//Fluid Input Out
|
||||
// Fluid Input Out
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 19, 8, 72));
|
||||
this.addSlotToContainer(new SlotMachineOutput(tedf, 20, 26, 72));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
{
|
||||
for(int j = 0; j < 9; j++)
|
||||
{
|
||||
|
||||
for(int i = 0; i < 3; i++) {
|
||||
for(int j = 0; j < 9; j++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 84 + i * 18 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 9; i++)
|
||||
{
|
||||
|
||||
for(int i = 0; i < 9; i++) {
|
||||
this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 142 + 56));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2)
|
||||
{
|
||||
public ItemStack transferStackInSlot(EntityPlayer p_82846_1_, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot) this.inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack())
|
||||
{
|
||||
|
||||
if(var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
var3 = var5.copy();
|
||||
SlotMachineOutput.checkAchievements(p_82846_1_, var5);
|
||||
|
||||
if (par2 <= 20) {
|
||||
if (!this.mergeItemStack(var5, 21, this.inventorySlots.size(), true))
|
||||
{
|
||||
|
||||
if(par2 <= 20) {
|
||||
if(!this.mergeItemStack(var5, 21, this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (!this.mergeItemStack(var5, 4, 5, false))
|
||||
if (!this.mergeItemStack(var5, 13, 19, false))
|
||||
} else if(!this.mergeItemStack(var5, 4, 5, false))
|
||||
if(!this.mergeItemStack(var5, 13, 19, false))
|
||||
return null;
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
{
|
||||
|
||||
if(var5.stackSize == 0) {
|
||||
var4.putStack((ItemStack) null);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
var4.onSlotChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return var3;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
return nukeBoy.isUseableByPlayer(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for(int i = 0; i < this.crafters.size(); i++)
|
||||
{
|
||||
ICrafting par1 = (ICrafting)this.crafters.get(i);
|
||||
|
||||
if(this.progress != this.nukeBoy.progress)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 1, this.nukeBoy.progress);
|
||||
}
|
||||
|
||||
if(this.maxProgress != this.nukeBoy.maxProgress)
|
||||
{
|
||||
par1.sendProgressBarUpdate(this, 2, this.nukeBoy.maxProgress);
|
||||
}
|
||||
}
|
||||
|
||||
this.progress= this.nukeBoy.progress;
|
||||
this.maxProgress= this.nukeBoy.maxProgress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateProgressBar(int i, int j) {
|
||||
if(i == 1)
|
||||
{
|
||||
nukeBoy.progress = j;
|
||||
}
|
||||
if(i == 2)
|
||||
{
|
||||
nukeBoy.maxProgress = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,6 +80,9 @@ public class FluidType {
|
||||
public String getUnlocalizedName() {
|
||||
return this.unlocalized;
|
||||
}
|
||||
public String getDict(int quantity) {
|
||||
return "container" + quantity + this.stringId.replace("_", "");
|
||||
}
|
||||
|
||||
public boolean isHot() {
|
||||
return this.temperature >= 100;
|
||||
|
||||
@ -80,6 +80,8 @@ public class Fluids {
|
||||
public static FluidType ETHANOL;
|
||||
public static FluidType HEAVYWATER;
|
||||
public static FluidType SALIENT;
|
||||
public static FluidType XPJUICE;
|
||||
public static FluidType ENDERJUICE;
|
||||
|
||||
private static final HashMap<Integer, FluidType> idMapping = new HashMap();
|
||||
private static final HashMap<String, FluidType> nameMapping = new HashMap();
|
||||
@ -170,6 +172,8 @@ public class Fluids {
|
||||
AROMATICS = new FluidTypeFlammable( "AROMATICS", 0xfffeed, 1, 4, 1, EnumSymbol.NONE);
|
||||
UNSATURATEDS = new FluidTypeFlammable( "UNSATURATEDS", 0xfffeed, 1, 4, 1, EnumSymbol.NONE);
|
||||
SALIENT = new FluidType(69, "SALIENT", 0x457F2D, 0, 0, 0, EnumSymbol.NONE);
|
||||
XPJUICE = new FluidType( "XPJUICE", 0xBBFF09, 0, 0, 0, EnumSymbol.NONE);
|
||||
ENDERJUICE = new FluidType( "ENDERJUICE", 0x127766, 0, 0, 0, EnumSymbol.NONE);
|
||||
|
||||
|
||||
// ^ ^ ^ ^ ^ ^ ^ ^
|
||||
@ -251,6 +255,9 @@ public class Fluids {
|
||||
//nuclear waste
|
||||
metaOrder.add(WASTEFLUID);
|
||||
metaOrder.add(WASTEGAS);
|
||||
//garbage
|
||||
metaOrder.add(XPJUICE);
|
||||
metaOrder.add(ENDERJUICE);
|
||||
//plasma
|
||||
metaOrder.add(PLASMA_DT);
|
||||
metaOrder.add(PLASMA_HD);
|
||||
|
||||
@ -33,7 +33,7 @@ public class GUIMachineBattery extends GuiInfoContainer {
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 62, guiTop + 69 - 52, 52, 52, battery.power, battery.maxPower);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 62, guiTop + 69 - 52, 52, 52, battery.power, battery.getMaxPower());
|
||||
|
||||
long delta = battery.log[19] - battery.log[0];
|
||||
String deltaText = BobMathUtil.getShortNumber(Math.abs(delta)) + "HE/s";
|
||||
@ -46,7 +46,7 @@ public class GUIMachineBattery extends GuiInfoContainer {
|
||||
deltaText = EnumChatFormatting.YELLOW + "+" + deltaText;
|
||||
|
||||
String[] info = {
|
||||
BobMathUtil.getShortNumber(battery.power) + "/" + BobMathUtil.getShortNumber(battery.maxPower) + "HE",
|
||||
BobMathUtil.getShortNumber(battery.power) + "/" + BobMathUtil.getShortNumber(battery.getMaxPower()) + "HE",
|
||||
deltaText
|
||||
};
|
||||
|
||||
|
||||
@ -2,11 +2,10 @@ package com.hbm.inventory.gui;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.container.ContainerMachineChemplant;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplantNew;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@ -17,9 +16,9 @@ import net.minecraft.util.ResourceLocation;
|
||||
public class GUIMachineChemplant extends GuiInfoContainer {
|
||||
|
||||
private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/gui_chemplant.png");
|
||||
private TileEntityMachineChemplant chemplant;
|
||||
private TileEntityMachineChemplantNew chemplant;
|
||||
|
||||
public GUIMachineChemplant(InventoryPlayer invPlayer, TileEntityMachineChemplant tedf) {
|
||||
public GUIMachineChemplant(InventoryPlayer invPlayer, TileEntityMachineChemplantNew tedf) {
|
||||
super(new ContainerMachineChemplant(invPlayer, tedf));
|
||||
chemplant = tedf;
|
||||
|
||||
@ -68,10 +67,10 @@ public class GUIMachineChemplant extends GuiInfoContainer {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
||||
|
||||
int i = (int)chemplant.getPowerScaled(52);
|
||||
int i = (int) (chemplant.power * 52 / chemplant.maxPower);
|
||||
drawTexturedModalRect(guiLeft + 44, guiTop + 70 - i, 176, 52 - i, 16, i);
|
||||
|
||||
int j = chemplant.getProgressScaled(90);
|
||||
int j = chemplant.progress * 90 / chemplant.maxProgress;
|
||||
drawTexturedModalRect(guiLeft + 43, guiTop + 89, 0, 222, j, 18);
|
||||
|
||||
this.drawInfoPanel(guiLeft + 105, guiTop + 40, 8, 8, 8);
|
||||
|
||||
@ -10,11 +10,12 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.AssemblerRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemCassette;
|
||||
import com.hbm.items.machine.ItemChemistryTemplate;
|
||||
import com.hbm.items.machine.ItemStamp;
|
||||
import com.hbm.items.machine.ItemChemistryTemplate.EnumChemistryTemplate;
|
||||
import com.hbm.items.machine.ItemStamp.StampType;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.packet.ItemFolderPacket;
|
||||
@ -80,11 +81,9 @@ public class GUIScreenTemplateFolder extends GuiScreen {
|
||||
}
|
||||
}
|
||||
// Chemistry Templates
|
||||
for(int i = 0; i < ItemChemistryTemplate.EnumChemistryTemplate.values().length; i++) {
|
||||
EnumChemistryTemplate chem = EnumChemistryTemplate.getEnum(i);
|
||||
if(!chem.isDisabled()) {
|
||||
allStacks.add(new ItemStack(ModItems.chemistry_template, 1, i));
|
||||
}
|
||||
for(int i = 0; i < ChemplantRecipes.recipes.size(); i++) {
|
||||
ChemRecipe chem = ChemplantRecipes.recipes.get(i);
|
||||
allStacks.add(new ItemStack(ModItems.chemistry_template, 1, chem.getId()));
|
||||
}
|
||||
} else {
|
||||
|
||||
|
||||
@ -859,6 +859,14 @@ public class AssemblerRecipes {
|
||||
new ComparableStack(ModItems.crt_display, 8),
|
||||
}, 300);
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.rbmk_crane_console, 1), new AStack[] {
|
||||
new OreDictStack(STEEL.ingot(), 16),
|
||||
new OreDictStack(AL.plate(), 8),
|
||||
new ComparableStack(ModItems.plate_polymer, 4),
|
||||
new ComparableStack(ModItems.circuit_gold, 1),
|
||||
new ComparableStack(ModItems.circuit_tantalium, 10),
|
||||
}, 300);
|
||||
|
||||
makeRecipe(new ComparableStack(ModBlocks.hadron_core, 1), new AStack[] {
|
||||
new ComparableStack(ModBlocks.hadron_coil_alloy, 24),
|
||||
new OreDictStack(STEEL.ingot(), 8),
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
@ -11,229 +13,364 @@ import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.RecipesCommon.OreDictStack;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.ItemEnums.EnumTarType;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ChemplantRecipes {
|
||||
|
||||
/**
|
||||
* Nice order: The order in which the ChemRecipe are added to the recipes list
|
||||
* Meta order: Fixed using the id param, saved in indexMapping
|
||||
*/
|
||||
|
||||
public static HashMap<Integer, ChemRecipe> indexMapping = new HashMap();
|
||||
public static List<ChemRecipe> recipes = new ArrayList();
|
||||
|
||||
public static void register() {
|
||||
|
||||
registerFuelProcessing();
|
||||
registerFuelCracking();
|
||||
registerCoalCracking();
|
||||
registerSolidFuel();
|
||||
//6-30, formerly oil cracking, coal liquefaction and solidifciation
|
||||
registerOtherOil();
|
||||
recipes.add(new ChemRecipe("COOLANT", 0));
|
||||
recipes.add(new ChemRecipe("CRYOGEL", 0));
|
||||
recipes.add(new ChemRecipe("DESH", 0));
|
||||
recipes.add(new ChemRecipe("NITAN", 0));
|
||||
recipes.add(new ChemRecipe("PEROXIDE", 0));
|
||||
recipes.add(new ChemRecipe("CIRCUIT_4", 0));
|
||||
recipes.add(new ChemRecipe("CIRCUIT_5", 0));
|
||||
recipes.add(new ChemRecipe("POLYMER", 0));
|
||||
recipes.add(new ChemRecipe("DEUTERIUM", 0));
|
||||
recipes.add(new ChemRecipe("STEAM", 0));
|
||||
recipes.add(new ChemRecipe("YELLOWCAKE", 0));
|
||||
recipes.add(new ChemRecipe("UF6", 0));
|
||||
recipes.add(new ChemRecipe("PUF6", 0));
|
||||
recipes.add(new ChemRecipe("SAS3", 0));
|
||||
recipes.add(new ChemRecipe("DYN_SCHRAB", 0));
|
||||
recipes.add(new ChemRecipe("DYN_EUPH", 0));
|
||||
recipes.add(new ChemRecipe("DYN_DNT", 0));
|
||||
recipes.add(new ChemRecipe("CORDITE", 0));
|
||||
recipes.add(new ChemRecipe("KEVLAR", 0));
|
||||
recipes.add(new ChemRecipe("CONCRETE", 0));
|
||||
recipes.add(new ChemRecipe("CONCRETE_ASBESTOS", 0));
|
||||
recipes.add(new ChemRecipe("SOLID_FUEL", 0));
|
||||
recipes.add(new ChemRecipe("ELECTROLYSIS", 0));
|
||||
recipes.add(new ChemRecipe("XENON", 0));
|
||||
recipes.add(new ChemRecipe("XENON_OXY", 0));
|
||||
recipes.add(new ChemRecipe("SATURN", 0));
|
||||
recipes.add(new ChemRecipe("BALEFIRE", 0));
|
||||
recipes.add(new ChemRecipe("SCHRABIDIC", 0));
|
||||
recipes.add(new ChemRecipe("SCHRABIDATE", 0));
|
||||
recipes.add(new ChemRecipe("COLTAN_CLEANING", 0));
|
||||
recipes.add(new ChemRecipe("COLTAN_PAIN", 0));
|
||||
recipes.add(new ChemRecipe("COLTAN_CRYSTAL", 0));
|
||||
recipes.add(new ChemRecipe("VIT_LIQUID", 0));
|
||||
recipes.add(new ChemRecipe("VIT_GAS", 0));
|
||||
recipes.add(new ChemRecipe("TEL", 0));
|
||||
recipes.add(new ChemRecipe("GASOLINE", 0));
|
||||
recipes.add(new ChemRecipe("FRACKSOL", 0));
|
||||
recipes.add(new ChemRecipe("DUCRETE", 0));
|
||||
|
||||
recipes.add(new ChemRecipe(36, "COOLANT", 50)
|
||||
.inputItems(new OreDictStack(KNO.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 1800))
|
||||
.outputFluids(new FluidStack(Fluids.COOLANT, 2000)));
|
||||
recipes.add(new ChemRecipe(37, "CRYOGEL", 50)
|
||||
.inputItems(new ComparableStack(ModItems.powder_ice))
|
||||
.inputFluids(new FluidStack(Fluids.COOLANT, 1800))
|
||||
.outputFluids(new FluidStack(Fluids.CRYOGEL, 2000)));
|
||||
recipes.add(new ChemRecipe(38, "DESH", 300)
|
||||
.inputItems(new ComparableStack(ModItems.powder_desh_mix))
|
||||
.inputFluids(
|
||||
GeneralConfig.enableBabyMode ?
|
||||
new FluidStack[] {new FluidStack(Fluids.LIGHTOIL, 200)} :
|
||||
new FluidStack[] {new FluidStack(Fluids.MERCURY, 200), new FluidStack(Fluids.LIGHTOIL, 200)})
|
||||
.outputItems(new ItemStack(ModItems.ingot_desh)));
|
||||
recipes.add(new ChemRecipe(39, "NITAN", 50)
|
||||
.inputItems(new ComparableStack(ModItems.powder_nitan_mix))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.KEROSENE, 600),
|
||||
new FluidStack(Fluids.MERCURY, 200))
|
||||
.outputFluids(new FluidStack(Fluids.NITAN, 1000)));
|
||||
recipes.add(new ChemRecipe(40, "PEROXIDE", 50)
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 1000))
|
||||
.outputFluids(new FluidStack(Fluids.ACID, 800)));
|
||||
recipes.add(new ChemRecipe(41, "CIRCUIT_4", 200)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.circuit_red_copper),
|
||||
new ComparableStack(ModItems.wire_gold, 4),
|
||||
new OreDictStack(LAPIS.dust()),
|
||||
new OreDictStack(ANY_PLASTIC.ingot()))
|
||||
.inputFluids(new FluidStack(Fluids.ACID, 400), new FluidStack(Fluids.PETROLEUM, 200))
|
||||
.outputItems(new ItemStack(ModItems.circuit_gold)));
|
||||
recipes.add(new ChemRecipe(42, "CIRCUIT_5", 250)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.circuit_gold),
|
||||
new ComparableStack(ModItems.wire_schrabidium, 4),
|
||||
new OreDictStack(DIAMOND.dust()),
|
||||
new OreDictStack(DESH.ingot()))
|
||||
.inputFluids(new FluidStack(Fluids.ACID, 800), new FluidStack(Fluids.MERCURY, 200))
|
||||
.outputItems(new ItemStack(ModItems.circuit_schrabidium)));
|
||||
recipes.add(new ChemRecipe(43, "POLYMER", 100)
|
||||
.inputItems(
|
||||
new OreDictStack(COAL.dust(), 2),
|
||||
new OreDictStack(F.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.PETROLEUM, 600))
|
||||
.outputItems(new ItemStack(ModItems.ingot_polymer)));
|
||||
//44, formerly deuterium
|
||||
//45, formerly steam
|
||||
recipes.add(new ChemRecipe(46, "YELLOWCAKE", 250)
|
||||
.inputItems(
|
||||
new OreDictStack(U.billet(), 2), //TODO: that's 12 nuggets right there, check if those numbers match up
|
||||
new OreDictStack(S.dust(), 2))
|
||||
.inputFluids(new FluidStack(Fluids.ACID, 500))
|
||||
.outputItems(new ItemStack(ModItems.powder_yellowcake)));
|
||||
recipes.add(new ChemRecipe(47, "UF6", 100)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.powder_yellowcake),
|
||||
new OreDictStack(F.dust(), 4))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 1000))
|
||||
.outputItems(new ItemStack(ModItems.sulfur, 2))
|
||||
.outputFluids(new FluidStack(Fluids.UF6, 1200)));
|
||||
recipes.add(new ChemRecipe(48, "PUF6", 150)
|
||||
.inputItems(
|
||||
new OreDictStack(PU.dust()),
|
||||
new OreDictStack(F.dust(), 3))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 1000))
|
||||
.outputFluids(new FluidStack(Fluids.PUF6, 900)));
|
||||
recipes.add(new ChemRecipe(49, "SAS3", 200)
|
||||
.inputItems(
|
||||
new OreDictStack(SA326.dust()),
|
||||
new OreDictStack(S.dust(), 2))
|
||||
.inputFluids(new FluidStack(Fluids.ACID, 2000))
|
||||
.outputFluids(new FluidStack(Fluids.SAS3, 1000)));
|
||||
recipes.add(new ChemRecipe(50, "DYN_SCHRAB", 1200)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.dynosphere_desh_charged, 3),
|
||||
new OreDictStack(U.ingot()),
|
||||
new ComparableStack(ModItems.catalyst_clay, 8))
|
||||
.outputItems(
|
||||
new ItemStack(ModItems.ingot_schrabidium),
|
||||
new ItemStack(ModItems.powder_desh),
|
||||
new ItemStack(ModItems.powder_desh_mix))
|
||||
.outputFluids(new FluidStack(Fluids.WATZ, 50)));
|
||||
recipes.add(new ChemRecipe(51, "DYN_EUPH", 3600)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.dynosphere_schrabidium_charged, 1),
|
||||
new OreDictStack(PU.ingot()),
|
||||
new ComparableStack(ModItems.catalyst_clay, 16),
|
||||
new OreDictStack(EUPH.ingot()))
|
||||
.outputItems(
|
||||
new ItemStack(ModItems.nugget_euphemium, 12),
|
||||
new ItemStack(ModItems.powder_schrabidium, 4),
|
||||
new ItemStack(ModItems.powder_power, 4))
|
||||
.outputFluids(new FluidStack(Fluids.WATZ, 100)));
|
||||
recipes.add(new ChemRecipe(52, "DYN_DNT", 6000)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.dynosphere_euphemium_charged, 2),
|
||||
new ComparableStack(ModItems.powder_spark_mix),
|
||||
new ComparableStack(ModItems.ingot_starmetal),
|
||||
new ComparableStack(ModItems.catalyst_clay, 32))
|
||||
.outputItems(
|
||||
new ItemStack(ModItems.ingot_dineutronium),
|
||||
new ItemStack(ModItems.powder_euphemium, 8),
|
||||
new ItemStack(ModItems.powder_nitan_mix, 8))
|
||||
.outputFluids(new FluidStack(Fluids.WATZ, 150)));
|
||||
recipes.add(new ChemRecipe(53, "CORDITE", 40)
|
||||
.inputItems(
|
||||
new OreDictStack(KNO.dust(), 2),
|
||||
new OreDictStack(KEY_PLANKS),
|
||||
new ComparableStack(Items.sugar))
|
||||
.inputFluids(new FluidStack(Fluids.HEATINGOIL, 200))
|
||||
.outputItems(new ItemStack(ModItems.cordite, 4)));
|
||||
recipes.add(new ChemRecipe(54, "KEVLAR", 40)
|
||||
.inputItems(
|
||||
new OreDictStack(KNO.dust(), 2),
|
||||
new ComparableStack(Items.brick),
|
||||
new OreDictStack(COAL.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.PETROLEUM, 100))
|
||||
.outputItems(new ItemStack(ModItems.plate_kevlar, 4)));
|
||||
recipes.add(new ChemRecipe(55, "CONCRETE", 100)
|
||||
.inputItems(
|
||||
new ComparableStack(Blocks.gravel, 8),
|
||||
new ComparableStack(Blocks.sand, 8))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 2000))
|
||||
.outputItems(new ItemStack(ModBlocks.concrete_smooth, 16)));
|
||||
recipes.add(new ChemRecipe(56, "CONCRETE_ASBESTOS", 100)
|
||||
.inputItems(
|
||||
new ComparableStack(Blocks.gravel, 2),
|
||||
new ComparableStack(Blocks.sand, 2),
|
||||
new OreDictStack(ASBESTOS.ingot(), 4))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 2000))
|
||||
.outputItems(new ItemStack(ModBlocks.concrete_asbestos, 16)));
|
||||
recipes.add(new ChemRecipe(79, "DUCRETE", 150)
|
||||
.inputItems(
|
||||
new ComparableStack(Blocks.sand, 8),
|
||||
new OreDictStack(U238.billet(), 2),
|
||||
new ComparableStack(Items.clay_ball, 4))
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 2000))
|
||||
.outputItems(new ItemStack(ModBlocks.ducrete_smooth, 8)));
|
||||
recipes.add(new ChemRecipe(57, "SOLID_FUEL", 200)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.solid_fuel, 2),
|
||||
new OreDictStack(KNO.dust()),
|
||||
new OreDictStack(REDSTONE.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.PETROLEUM, 200))
|
||||
.outputItems(new ItemStack(ModItems.rocket_fuel, 4)));
|
||||
recipes.add(new ChemRecipe(58, "ELECTROLYSIS", 150)
|
||||
.inputFluids(new FluidStack(Fluids.WATER, 8000))
|
||||
.outputFluids(
|
||||
new FluidStack(Fluids.HYDROGEN, 800),
|
||||
new FluidStack(Fluids.OXYGEN, 800)));
|
||||
recipes.add(new ChemRecipe(59, "XENON", 300)
|
||||
.inputFluids(new FluidStack(Fluids.NONE, 0))
|
||||
.outputFluids(new FluidStack(Fluids.XENON, 50)));
|
||||
recipes.add(new ChemRecipe(60, "XENON_OXY", 20)
|
||||
.inputFluids(new FluidStack(Fluids.OXYGEN, 250))
|
||||
.outputFluids(new FluidStack(Fluids.XENON, 50)));
|
||||
recipes.add(new ChemRecipe(61, "SATURN", 60)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.powder_dura_steel),
|
||||
new OreDictStack(P_RED.dust()))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.ACID, 100),
|
||||
new FluidStack(Fluids.MERCURY, 50))
|
||||
.outputItems(new ItemStack(ModItems.ingot_saturnite, 2)));
|
||||
recipes.add(new ChemRecipe(62, "BALEFIRE", 100)
|
||||
.inputItems(new ComparableStack(ModItems.egg_balefire_shard))
|
||||
.inputFluids(new FluidStack(Fluids.KEROSENE, 6000))
|
||||
.outputItems(new ItemStack(ModItems.powder_balefire))
|
||||
.outputFluids(new FluidStack(Fluids.BALEFIRE, 8000)));
|
||||
recipes.add(new ChemRecipe(63, "SCHRABIDIC", 100)
|
||||
.inputItems(new ComparableStack(ModItems.pellet_charged))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.SAS3, 8000),
|
||||
new FluidStack(Fluids.ACID, 6000))
|
||||
.outputFluids(new FluidStack(Fluids.SCHRABIDIC, 16000)));
|
||||
recipes.add(new ChemRecipe(64, "SCHRABIDATE", 150)
|
||||
.inputItems(new OreDictStack(IRON.dust()))
|
||||
.inputFluids(new FluidStack(Fluids.SCHRABIDIC, 250))
|
||||
.outputItems(new ItemStack(ModItems.powder_schrabidate)));
|
||||
recipes.add(new ChemRecipe(65, "COLTAN_CLEANING", 60)
|
||||
.inputItems(
|
||||
new OreDictStack(COLTAN.dust(), 2),
|
||||
new OreDictStack(COAL.dust()))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.ACID, 250),
|
||||
new FluidStack(Fluids.HYDROGEN, 500))
|
||||
.outputItems(
|
||||
new ItemStack(ModItems.powder_coltan),
|
||||
new ItemStack(ModItems.powder_niobium),
|
||||
new ItemStack(ModItems.dust))
|
||||
.outputFluids(new FluidStack(Fluids.WATER, 500)));
|
||||
recipes.add(new ChemRecipe(66, "COLTAN_PAIN", 120)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.powder_coltan),
|
||||
new OreDictStack(F.dust()))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.GAS, 1000),
|
||||
new FluidStack(Fluids.OXYGEN, 500))
|
||||
.outputFluids(new FluidStack(Fluids.PAIN, 1000)));
|
||||
recipes.add(new ChemRecipe(67, "COLTAN_CRYSTAL", 80)
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.PAIN, 1000),
|
||||
new FluidStack(Fluids.ACID, 500))
|
||||
.outputItems(
|
||||
new ItemStack(ModItems.gem_tantalium),
|
||||
new ItemStack(ModItems.dust, 3))
|
||||
.outputFluids(new FluidStack(Fluids.WATER, 250)));
|
||||
recipes.add(new ChemRecipe(68, "VIT_LIQUID", 100)
|
||||
.inputItems(new ComparableStack(ModBlocks.sand_lead))
|
||||
.inputFluids(new FluidStack(Fluids.WASTEFLUID, 1000))
|
||||
.outputItems(new ItemStack(ModItems.nuclear_waste_vitrified)));
|
||||
recipes.add(new ChemRecipe(69, "VIT_GAS", 100)
|
||||
.inputItems(new ComparableStack(ModBlocks.sand_lead))
|
||||
.inputFluids(new FluidStack(Fluids.WASTEGAS, 1000))
|
||||
.outputItems(new ItemStack(ModItems.nuclear_waste_vitrified)));
|
||||
recipes.add(new ChemRecipe(70, "TEL", 40)
|
||||
.inputItems(
|
||||
new OreDictStack(ANY_TAR.any()),
|
||||
new OreDictStack(PB.dust()))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.PETROLEUM, 100),
|
||||
new FluidStack(Fluids.STEAM, 1000))
|
||||
.outputItems(new ItemStack(ModItems.antiknock)));
|
||||
recipes.add(new ChemRecipe(71, "GASOLINE", 40)
|
||||
.inputItems(new ComparableStack(ModItems.antiknock))
|
||||
.inputFluids(new FluidStack(Fluids.PETROIL, 10_000))
|
||||
.outputFluids(new FluidStack(Fluids.GASOLINE, 12_000)));
|
||||
recipes.add(new ChemRecipe(72, "FRACKSOL", 20)
|
||||
.inputItems(new OreDictStack(S.dust()))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.PETROLEUM, 100),
|
||||
new FluidStack(Fluids.WATER, 1000))
|
||||
.outputFluids(new FluidStack(Fluids.FRACKSOL, 1000)));
|
||||
recipes.add(new ChemRecipe(73, "HELIUM3", 200)
|
||||
.inputItems(new ComparableStack(ModBlocks.moon_turf, 8))
|
||||
.outputFluids(new FluidStack(Fluids.HELIUM3, 1000)));
|
||||
recipes.add(new ChemRecipe(74, "OSMIRIDIUM_DEATH", 240)
|
||||
.inputItems(
|
||||
new ComparableStack(ModItems.powder_paleogenite),
|
||||
new OreDictStack(F.dust(), 8),
|
||||
new ComparableStack(ModItems.nugget_bismuth, 4))
|
||||
.inputFluids(new FluidStack(Fluids.ACID, 1000))
|
||||
.outputFluids(new FluidStack(Fluids.DEATH, 1000)));
|
||||
recipes.add(new ChemRecipe(75, "ETHANOL", 50)
|
||||
.inputItems(new ComparableStack(Items.sugar, 6))
|
||||
.outputFluids(new FluidStack(Fluids.ETHANOL, 1000)));
|
||||
recipes.add(new ChemRecipe(76, "METH", 30)
|
||||
.inputItems(
|
||||
new ComparableStack(Items.wheat),
|
||||
new ComparableStack(Items.dye, 2, 3))
|
||||
.inputFluids(
|
||||
new FluidStack(Fluids.LUBRICANT, 400),
|
||||
new FluidStack(Fluids.ACID, 400))
|
||||
.outputItems(new ItemStack(ModItems.chocolate, 4)));
|
||||
recipes.add(new ChemRecipe(77, "CO2", 60)
|
||||
.inputFluids(new FluidStack(Fluids.GAS, 1000))
|
||||
.outputFluids(new FluidStack(Fluids.CARBONDIOXIDE, 1000)));
|
||||
recipes.add(new ChemRecipe(78, "HEAVY_ELECTROLYSIS", 150)
|
||||
.inputFluids(new FluidStack(Fluids.HEAVYWATER, 8000))
|
||||
.outputFluids(
|
||||
new FluidStack(Fluids.DEUTERIUM, 400),
|
||||
new FluidStack(Fluids.OXYGEN, 400)));
|
||||
recipes.add(new ChemRecipe(80, "EPEARL", 100)
|
||||
.inputItems(new OreDictStack(DIAMOND.dust(), 1))
|
||||
.inputFluids(new FluidStack(Fluids.XPJUICE, 500))
|
||||
.outputFluids(new FluidStack(Fluids.ENDERJUICE, 100)));
|
||||
|
||||
}
|
||||
|
||||
public static void registerFuelProcessing() {
|
||||
recipes.add(new ChemRecipe("FP_HEAVYOIL", 50)
|
||||
recipes.add(new ChemRecipe(0, "FP_HEAVYOIL", 50)
|
||||
.inputFluids(new FluidStack(1000, Fluids.HEAVYOIL))
|
||||
.outputFluids(
|
||||
new FluidStack(RefineryRecipes.heavy_frac_bitu * 10, Fluids.BITUMEN),
|
||||
new FluidStack(RefineryRecipes.heavy_frac_smear * 10, Fluids.SMEAR)
|
||||
));
|
||||
recipes.add(new ChemRecipe("FP_SMEAR", 50)
|
||||
recipes.add(new ChemRecipe(1, "FP_SMEAR", 50)
|
||||
.inputFluids(new FluidStack(1000, Fluids.SMEAR))
|
||||
.outputFluids(
|
||||
new FluidStack(RefineryRecipes.smear_frac_heat * 10, Fluids.HEATINGOIL),
|
||||
new FluidStack(RefineryRecipes.smear_frac_lube * 10, Fluids.LUBRICANT)
|
||||
));
|
||||
recipes.add(new ChemRecipe("FP_NAPHTHA", 50)
|
||||
recipes.add(new ChemRecipe(2, "FP_NAPHTHA", 50)
|
||||
.inputFluids(new FluidStack(1000, Fluids.NAPHTHA))
|
||||
.outputFluids(
|
||||
new FluidStack(RefineryRecipes.napht_frac_heat * 10, Fluids.HEATINGOIL),
|
||||
new FluidStack(RefineryRecipes.napht_frac_diesel * 10, Fluids.DIESEL)
|
||||
));
|
||||
recipes.add(new ChemRecipe("FP_LIGHTOIL", 50)
|
||||
recipes.add(new ChemRecipe(3, "FP_LIGHTOIL", 50)
|
||||
.inputFluids(new FluidStack(1000, Fluids.LIGHTOIL))
|
||||
.outputFluids(
|
||||
new FluidStack(RefineryRecipes.light_frac_diesel * 10, Fluids.DIESEL),
|
||||
new FluidStack(RefineryRecipes.light_frac_kero * 10, Fluids.KEROSENE)
|
||||
));
|
||||
recipes.add(new ChemRecipe("FR_REOIL", 30)
|
||||
recipes.add(new ChemRecipe(4, "FR_REOIL", 30)
|
||||
.inputFluids(new FluidStack(1000, Fluids.SMEAR))
|
||||
.outputFluids(new FluidStack(800, Fluids.RECLAIMED)));
|
||||
recipes.add(new ChemRecipe("FR_PETROIL", 30)
|
||||
recipes.add(new ChemRecipe(5, "FR_PETROIL", 30)
|
||||
.inputFluids(
|
||||
new FluidStack(800, Fluids.RECLAIMED),
|
||||
new FluidStack(200, Fluids.LUBRICANT))
|
||||
.outputFluids(new FluidStack(1000, Fluids.PETROIL)));
|
||||
}
|
||||
|
||||
public static void registerFuelCracking() {
|
||||
recipes.add(new ChemRecipe("FC_BITUMEN", 100)
|
||||
.inputFluids(
|
||||
new FluidStack(1200, Fluids.BITUMEN),
|
||||
new FluidStack(2400, Fluids.STEAM))
|
||||
.outputFluids(
|
||||
new FluidStack(1000, Fluids.OIL),
|
||||
new FluidStack(200, Fluids.PETROLEUM)));
|
||||
recipes.add(new ChemRecipe("FC_I_NAPHTHA", 150)
|
||||
.inputFluids(
|
||||
new FluidStack(1400, Fluids.SMEAR),
|
||||
new FluidStack(800, Fluids.WATER))
|
||||
.outputFluids(new FluidStack(800, Fluids.NAPHTHA)));
|
||||
recipes.add(new ChemRecipe("FC_GAS_PETROLEUM", 100)
|
||||
.inputFluids(
|
||||
new FluidStack(1800, Fluids.GAS),
|
||||
new FluidStack(1200, Fluids.WATER))
|
||||
.outputFluids(new FluidStack(800, Fluids.PETROLEUM)));
|
||||
recipes.add(new ChemRecipe("FC_DIESEL_KEROSENE", 150)
|
||||
.inputFluids(
|
||||
new FluidStack(1200, Fluids.DIESEL),
|
||||
new FluidStack(2000, Fluids.STEAM))
|
||||
.outputFluids(new FluidStack(400, Fluids.KEROSENE)));
|
||||
recipes.add(new ChemRecipe("FC_KEROSENE_PETROLEUM", 150)
|
||||
.inputFluids(
|
||||
new FluidStack(1400, Fluids.KEROSENE),
|
||||
new FluidStack(2000, Fluids.STEAM))
|
||||
.outputFluids(new FluidStack(800, Fluids.PETROLEUM)));
|
||||
}
|
||||
|
||||
public static void registerCoalCracking() {
|
||||
recipes.add(new ChemRecipe("CC_OIL", 150)
|
||||
.inputItems(new OreDictStack(COAL.dust(), 8), new OreDictStack(ANY_TAR.any(), 4))
|
||||
.inputFluids(new FluidStack(1400, Fluids.STEAM))
|
||||
.outputFluids(new FluidStack(2000, Fluids.OIL)));
|
||||
recipes.add(new ChemRecipe("CC_I", 200)
|
||||
.inputItems(new OreDictStack(COAL.dust(), 6), new OreDictStack(ANY_TAR.any(), 4))
|
||||
.inputFluids(new FluidStack(1800, Fluids.WATER))
|
||||
.outputFluids(new FluidStack(1600, Fluids.SMEAR)));
|
||||
recipes.add(new ChemRecipe("CC_HEATING", 250)
|
||||
.inputItems(new OreDictStack(COAL.dust(), 6), new OreDictStack(ANY_TAR.any(), 4))
|
||||
.inputFluids(new FluidStack(2000, Fluids.STEAM))
|
||||
.outputFluids(new FluidStack(1800, Fluids.HEATINGOIL)));
|
||||
recipes.add(new ChemRecipe("CC_HEAVY", 200)
|
||||
.inputItems(new OreDictStack(COAL.dust(), 8), new OreDictStack(ANY_TAR.any(), 4))
|
||||
.inputFluids(new FluidStack(1400, Fluids.WATER))
|
||||
.outputFluids(new FluidStack(1800, Fluids.HEAVYOIL)));
|
||||
recipes.add(new ChemRecipe("CC_NAPHTHA", 300)
|
||||
.inputItems(new OreDictStack(COAL.dust(), 8), new OreDictStack(ANY_TAR.any(), 4))
|
||||
.inputFluids(new FluidStack(2400, Fluids.STEAM))
|
||||
.outputFluids(new FluidStack(2000, Fluids.NAPHTHA)));
|
||||
}
|
||||
|
||||
public static void registerSolidFuel() {
|
||||
recipes.add(new ChemRecipe("SF_OIL", 20)
|
||||
.inputFluids(new FluidStack(350, Fluids.OIL))
|
||||
.outputItems(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE), DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE)));
|
||||
recipes.add(new ChemRecipe("SF_HEAVYOIL", 20)
|
||||
.inputFluids(new FluidStack(250, Fluids.HEAVYOIL))
|
||||
.outputItems(DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE), DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE)));
|
||||
recipes.add(new ChemRecipe("SF_SMEAR", 20)
|
||||
.inputFluids(new FluidStack(200, Fluids.SMEAR))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_HEATINGOIL", 20)
|
||||
.inputFluids(new FluidStack(100, Fluids.HEATINGOIL))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_RECLAIMED", 20)
|
||||
.inputFluids(new FluidStack(200, Fluids.RECLAIMED))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_PETROIL", 20)
|
||||
.inputFluids(new FluidStack(250, Fluids.PETROIL))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_LUBRICANT", 20)
|
||||
.inputFluids(new FluidStack(250, Fluids.LUBRICANT))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_NAPHTHA", 20)
|
||||
.inputFluids(new FluidStack(300, Fluids.NAPHTHA))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_DIESEL", 20)
|
||||
.inputFluids(new FluidStack(400, Fluids.DIESEL))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_LIGHTOIL", 20)
|
||||
.inputFluids(new FluidStack(450, Fluids.LIGHTOIL))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_KEROSENE", 20)
|
||||
.inputFluids(new FluidStack(550, Fluids.KEROSENE))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_GAS", 20)
|
||||
.inputFluids(new FluidStack(750, Fluids.GAS))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_PETROLEUM", 20)
|
||||
.inputFluids(new FluidStack(600, Fluids.PETROLEUM))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_BIOGAS", 20)
|
||||
.inputFluids(new FluidStack(3500, Fluids.BIOGAS))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));
|
||||
recipes.add(new ChemRecipe("SF_BIOFUEL", 20)
|
||||
.inputFluids(new FluidStack(1500, Fluids.BIOFUEL))
|
||||
.outputItems(new ItemStack(ModItems.solid_fuel, 1), new ItemStack(ModItems.solid_fuel, 1)));;
|
||||
}
|
||||
|
||||
public static void registerOtherOil() {
|
||||
recipes.add(new ChemRecipe("BP_BIOGAS", 200)
|
||||
recipes.add(new ChemRecipe(31, "BP_BIOGAS", 200)
|
||||
.inputItems(new ComparableStack(ModItems.biomass, 16))
|
||||
.outputFluids(new FluidStack(4000, Fluids.BIOGAS)));
|
||||
recipes.add(new ChemRecipe("BP_BIOFUEL", 100)
|
||||
recipes.add(new ChemRecipe(32, "BP_BIOFUEL", 100)
|
||||
.inputFluids(new FluidStack(2000, Fluids.BIOGAS))
|
||||
.outputFluids(new FluidStack(1000, Fluids.BIOFUEL)));
|
||||
recipes.add(new ChemRecipe("LPG", 100)
|
||||
recipes.add(new ChemRecipe(33, "LPG", 100)
|
||||
.inputFluids(new FluidStack(2000, Fluids.PETROLEUM))
|
||||
.outputFluids(new FluidStack(1000, Fluids.LPG)));
|
||||
recipes.add(new ChemRecipe("OIL_SAND", 200)
|
||||
recipes.add(new ChemRecipe(34, "OIL_SAND", 200)
|
||||
.inputItems(new ComparableStack(ModBlocks.ore_oil_sand, 16), new OreDictStack(ANY_TAR.any(), 1))
|
||||
.outputItems(new ItemStack(Blocks.sand, 4), new ItemStack(Blocks.sand, 4), new ItemStack(Blocks.sand, 4), new ItemStack(Blocks.sand, 4))
|
||||
.outputFluids(new FluidStack(1000, Fluids.BITUMEN)));
|
||||
recipes.add(new ChemRecipe("ASPHALT", 100)
|
||||
recipes.add(new ChemRecipe(35, "ASPHALT", 100)
|
||||
.inputItems(new ComparableStack(Blocks.gravel, 2), new ComparableStack(Blocks.sand, 6))
|
||||
.inputFluids(new FluidStack(1000, Fluids.BITUMEN))
|
||||
.outputItems(new ItemStack(ModBlocks.asphalt, 4), new ItemStack(ModBlocks.asphalt, 4), new ItemStack(ModBlocks.asphalt, 4), new ItemStack(ModBlocks.asphalt, 4)));
|
||||
.outputItems(new ItemStack(ModBlocks.asphalt, 16)));
|
||||
}
|
||||
|
||||
public static class ChemRecipe {
|
||||
|
||||
private int id;
|
||||
public String name;
|
||||
private AStack[] inputs;
|
||||
private FluidStack[] inputFluids;
|
||||
private ItemStack[] outputs;
|
||||
private FluidStack[] outputFluids;
|
||||
public AStack[] inputs;
|
||||
public FluidStack[] inputFluids;
|
||||
public ItemStack[] outputs;
|
||||
public FluidStack[] outputFluids;
|
||||
private int duration;
|
||||
|
||||
public ChemRecipe(String name, int duration) {
|
||||
public ChemRecipe(int index, String name, int duration) {
|
||||
this.id = index;
|
||||
this.name = name;
|
||||
this.duration = duration;
|
||||
|
||||
@ -241,6 +378,12 @@ public class ChemplantRecipes {
|
||||
this.outputs = new ItemStack[4];
|
||||
this.inputFluids = new FluidStack[2];
|
||||
this.outputFluids = new FluidStack[2];
|
||||
|
||||
if(!indexMapping.containsKey(id)) {
|
||||
indexMapping.put(id, this);
|
||||
} else {
|
||||
throw new IllegalStateException("Chemical plant recipe " + name + " has been registered with duplicate id " + id + " used by " + indexMapping.get(id).name + "!");
|
||||
}
|
||||
}
|
||||
|
||||
public ChemRecipe inputItems(AStack... in) {
|
||||
@ -262,5 +405,13 @@ public class ChemplantRecipes {
|
||||
for(int i = 0; i < out.length; i++) this.outputFluids[i] = out[i];
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public int getDuration() {
|
||||
return this.duration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,18 +1,14 @@
|
||||
package com.hbm.inventory.recipes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIcon;
|
||||
import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
@ -38,6 +38,7 @@ public class LiquefactionRecipes {
|
||||
recipes.put(new ComparableStack(Blocks.snow), new FluidStack(500, Fluids.WATER));
|
||||
recipes.put(new ComparableStack(Blocks.ice), new FluidStack(1000, Fluids.WATER));
|
||||
recipes.put(new ComparableStack(Blocks.packed_ice), new FluidStack(1000, Fluids.WATER));
|
||||
recipes.put(new ComparableStack(Items.ender_pearl), new FluidStack(100, Fluids.ENDERJUICE));
|
||||
|
||||
recipes.put(new ComparableStack(Items.sugar), new FluidStack(150, Fluids.ETHANOL));
|
||||
recipes.put(new ComparableStack(ModItems.biomass), new FluidStack(250, Fluids.BIOGAS));
|
||||
|
||||
@ -1117,50 +1117,6 @@ public class MachineRecipes {
|
||||
return false;
|
||||
}
|
||||
|
||||
public Map<Object[], Object[]> getChemistryRecipes() {
|
||||
|
||||
Map<Object[], Object[]> recipes = new HashMap<Object[], Object[]>();
|
||||
|
||||
for (int i = 0; i < ItemChemistryTemplate.EnumChemistryTemplate.values().length; ++i)
|
||||
{
|
||||
ItemStack[] inputs = new ItemStack[7];
|
||||
ItemStack[] outputs = new ItemStack[6];
|
||||
inputs[6] = new ItemStack(ModItems.chemistry_template, 1, i);
|
||||
|
||||
List<ItemStack> listIn = MachineRecipes.getChemInputFromTempate(inputs[6]);
|
||||
if(listIn != null)
|
||||
for(int j = 0; j < listIn.size(); j++)
|
||||
if(listIn.get(j) != null)
|
||||
inputs[j + 2] = listIn.get(j).copy();
|
||||
|
||||
FluidStack[] fluidIn = MachineRecipes.getFluidInputFromTempate(inputs[6]);
|
||||
for(int j = 0; j < fluidIn.length; j++)
|
||||
if(fluidIn[j] != null)
|
||||
inputs[j] = ItemFluidIcon.addQuantity(new ItemStack(ModItems.fluid_icon, 1, fluidIn[j].type.getID()), fluidIn[j].fill);
|
||||
|
||||
ItemStack[] listOut = MachineRecipes.getChemOutputFromTempate(inputs[6]);
|
||||
for(int j = 0; j < listOut.length; j++)
|
||||
if(listOut[j] != null)
|
||||
outputs[j + 2] = listOut[j].copy();
|
||||
|
||||
FluidStack[] fluidOut = MachineRecipes.getFluidOutputFromTempate(inputs[6]);
|
||||
for(int j = 0; j < fluidOut.length; j++)
|
||||
if(fluidOut[j] != null)
|
||||
outputs[j] = ItemFluidIcon.addQuantity(new ItemStack(ModItems.fluid_icon, 1, fluidOut[j].type.getID()), fluidOut[j].fill);
|
||||
|
||||
for(int j = 0; j < inputs.length; j++)
|
||||
if(inputs[j] == null)
|
||||
inputs[j] = new ItemStack(ModItems.nothing);
|
||||
|
||||
for(int j = 0; j < outputs.length; j++)
|
||||
if(outputs[j] == null)
|
||||
outputs[j] = new ItemStack(ModItems.nothing);
|
||||
|
||||
recipes.put(inputs, outputs);
|
||||
}
|
||||
|
||||
return recipes;
|
||||
}
|
||||
|
||||
public Map<Object, Object> getBoilerRecipes() {
|
||||
|
||||
@ -1186,805 +1142,6 @@ public class MachineRecipes {
|
||||
return recipes;
|
||||
}
|
||||
|
||||
public static List<ItemStack> getChemInputFromTempate(ItemStack stack) {
|
||||
|
||||
if(stack == null || !(stack.getItem() instanceof ItemChemistryTemplate))
|
||||
return null;
|
||||
|
||||
List<ItemStack> list = new ArrayList<ItemStack>();
|
||||
ItemChemistryTemplate.EnumChemistryTemplate chem = ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage());
|
||||
|
||||
if(chem.isDisabled())
|
||||
return list;
|
||||
|
||||
switch(chem) {
|
||||
case CC_OIL:
|
||||
list.add(new ItemStack(ModItems.powder_coal, 8));
|
||||
list.add(new ItemStack(ModItems.oil_tar, 4));
|
||||
break;
|
||||
case CC_I:
|
||||
list.add(new ItemStack(ModItems.powder_coal, 6));
|
||||
list.add(new ItemStack(ModItems.oil_tar, 4));
|
||||
break;
|
||||
case CC_HEATING:
|
||||
list.add(new ItemStack(ModItems.powder_coal, 6));
|
||||
list.add(new ItemStack(ModItems.oil_tar, 4));
|
||||
break;
|
||||
case CC_HEAVY:
|
||||
list.add(new ItemStack(ModItems.powder_coal, 8));
|
||||
list.add(new ItemStack(ModItems.oil_tar, 4));
|
||||
break;
|
||||
case CC_NAPHTHA:
|
||||
list.add(new ItemStack(ModItems.powder_coal, 8));
|
||||
list.add(new ItemStack(ModItems.oil_tar, 4));
|
||||
break;
|
||||
case ASPHALT:
|
||||
list.add(new ItemStack(Blocks.gravel, 2));
|
||||
list.add(new ItemStack(Blocks.sand, 6));
|
||||
break;
|
||||
case CONCRETE:
|
||||
list.add(new ItemStack(Blocks.gravel, 8));
|
||||
list.add(new ItemStack(Blocks.sand, 8));
|
||||
break;
|
||||
case CONCRETE_ASBESTOS:
|
||||
list.add(new ItemStack(Blocks.gravel, 2));
|
||||
list.add(new ItemStack(Blocks.sand, 2));
|
||||
list.add(new ItemStack(ModItems.ingot_asbestos, 4));
|
||||
break;
|
||||
case COOLANT:
|
||||
list.add(new ItemStack(ModItems.niter, 1));
|
||||
break;
|
||||
case CRYOGEL:
|
||||
list.add(new ItemStack(ModItems.powder_ice, 1));
|
||||
break;
|
||||
case DESH:
|
||||
list.add(new ItemStack(ModItems.powder_desh_mix, 1));
|
||||
break;
|
||||
case CIRCUIT_4:
|
||||
list.add(new ItemStack(ModItems.circuit_red_copper, 1));
|
||||
list.add(new ItemStack(ModItems.wire_gold, 4));
|
||||
list.add(new ItemStack(ModItems.powder_lapis, 1));
|
||||
list.add(new ItemStack(ModItems.ingot_polymer, 1));
|
||||
break;
|
||||
case CIRCUIT_5:
|
||||
list.add(new ItemStack(ModItems.circuit_gold, 1));
|
||||
list.add(new ItemStack(ModItems.wire_schrabidium, 4));
|
||||
list.add(new ItemStack(ModItems.powder_diamond, 1));
|
||||
list.add(new ItemStack(ModItems.ingot_desh, 1));
|
||||
break;
|
||||
case POLYMER:
|
||||
list.add(new ItemStack(ModItems.powder_coal, 2));
|
||||
list.add(new ItemStack(ModItems.fluorite, 1));
|
||||
break;
|
||||
case DEUTERIUM:
|
||||
list.add(new ItemStack(ModItems.sulfur, 1));
|
||||
break;
|
||||
case BP_BIOGAS:
|
||||
list.add(new ItemStack(ModItems.biomass, 16));
|
||||
break;
|
||||
case YELLOWCAKE:
|
||||
list.add(new ItemStack(ModItems.billet_uranium, 2));
|
||||
list.add(new ItemStack(ModItems.sulfur, 2));
|
||||
break;
|
||||
case UF6:
|
||||
list.add(new ItemStack(ModItems.powder_yellowcake, 1));
|
||||
list.add(new ItemStack(ModItems.fluorite, 4));
|
||||
break;
|
||||
case PUF6:
|
||||
list.add(new ItemStack(ModItems.powder_plutonium, 1));
|
||||
list.add(new ItemStack(ModItems.fluorite, 3));
|
||||
break;
|
||||
case SAS3:
|
||||
list.add(new ItemStack(ModItems.powder_schrabidium, 1));
|
||||
list.add(new ItemStack(ModItems.sulfur, 2));
|
||||
break;
|
||||
case NITAN:
|
||||
list.add(new ItemStack(ModItems.powder_nitan_mix, 2));
|
||||
break;
|
||||
case OIL_SAND:
|
||||
list.add(new ItemStack(ModBlocks.ore_oil_sand, 16));
|
||||
break;
|
||||
case DYN_SCHRAB:
|
||||
list.add(new ItemStack(ModItems.dynosphere_desh_charged, 3));
|
||||
list.add(new ItemStack(ModItems.ingot_uranium, 1));
|
||||
list.add(new ItemStack(ModItems.catalyst_clay, 8));
|
||||
break;
|
||||
case DYN_EUPH:
|
||||
list.add(new ItemStack(ModItems.dynosphere_schrabidium_charged, 1));
|
||||
list.add(new ItemStack(ModItems.ingot_plutonium, 1));
|
||||
list.add(new ItemStack(ModItems.catalyst_clay, 16));
|
||||
list.add(new ItemStack(ModItems.ingot_euphemium, 1));
|
||||
break;
|
||||
case DYN_DNT:
|
||||
list.add(new ItemStack(ModItems.dynosphere_euphemium_charged, 2));
|
||||
list.add(new ItemStack(ModItems.powder_spark_mix, 1));
|
||||
list.add(new ItemStack(ModItems.ingot_starmetal, 1));
|
||||
list.add(new ItemStack(ModItems.catalyst_clay, 32));
|
||||
break;
|
||||
case CORDITE:
|
||||
list.add(new ItemStack(ModItems.niter, 2));
|
||||
list.add(new ItemStack(Blocks.planks, 1));
|
||||
list.add(new ItemStack(Items.sugar, 1));
|
||||
break;
|
||||
case KEVLAR:
|
||||
list.add(new ItemStack(ModItems.niter, 2));
|
||||
list.add(new ItemStack(Items.brick, 1));
|
||||
list.add(new ItemStack(ModItems.powder_coal, 1));
|
||||
break;
|
||||
case SOLID_FUEL:
|
||||
list.add(new ItemStack(ModItems.solid_fuel, 2));
|
||||
list.add(new ItemStack(ModItems.niter, 1));
|
||||
list.add(new ItemStack(Items.redstone, 1));
|
||||
break;
|
||||
case SATURN:
|
||||
list.add(new ItemStack(ModItems.powder_dura_steel, 1));
|
||||
list.add(new ItemStack(ModItems.powder_fire, 1));
|
||||
break;
|
||||
case BALEFIRE:
|
||||
list.add(new ItemStack(ModItems.egg_balefire_shard, 1));
|
||||
break;
|
||||
case SCHRABIDIC:
|
||||
list.add(new ItemStack(ModItems.pellet_charged, 1));
|
||||
break;
|
||||
case SCHRABIDATE:
|
||||
list.add(new ItemStack(ModItems.powder_iron, 1));
|
||||
break;
|
||||
case COLTAN_CLEANING:
|
||||
list.add(new ItemStack(ModItems.powder_coltan_ore, 2));
|
||||
list.add(new ItemStack(ModItems.powder_coal, 1));
|
||||
break;
|
||||
case COLTAN_PAIN:
|
||||
list.add(new ItemStack(ModItems.powder_coltan, 1));
|
||||
list.add(new ItemStack(ModItems.fluorite, 1));
|
||||
break;
|
||||
case VIT_LIQUID:
|
||||
case VIT_GAS:
|
||||
list.add(new ItemStack(ModBlocks.sand_lead, 1));
|
||||
break;
|
||||
case TEL:
|
||||
list.add(new ItemStack(ModItems.oil_tar, 1));
|
||||
list.add(new ItemStack(ModItems.powder_lead, 1));
|
||||
break;
|
||||
case GASOLINE:
|
||||
list.add(new ItemStack(ModItems.antiknock, 1));
|
||||
break;
|
||||
case FRACKSOL:
|
||||
list.add(new ItemStack(ModItems.sulfur, 1));
|
||||
break;
|
||||
case HELIUM3:
|
||||
list.add(new ItemStack(ModBlocks.moon_turf, 8));
|
||||
break;
|
||||
case OSMIRIDIUM_DEATH:
|
||||
list.add(new ItemStack(ModItems.powder_paleogenite, 1));
|
||||
list.add(new ItemStack(ModItems.fluorite, 8));
|
||||
list.add(new ItemStack(ModItems.nugget_bismuth, 4));
|
||||
break;
|
||||
case ETHANOL:
|
||||
list.add(new ItemStack(Items.sugar, 6));
|
||||
break;
|
||||
case METH:
|
||||
list.add(new ItemStack(Items.wheat, 1));
|
||||
list.add(new ItemStack(Items.dye, 2, 3));
|
||||
break;
|
||||
case DUCRETE:
|
||||
list.add(new ItemStack(Blocks.sand, 8));
|
||||
list.add(new ItemStack(ModItems.billet_u238, 2));
|
||||
list.add(new ItemStack(Items.clay_ball, 4));
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if(list.isEmpty())
|
||||
return null;
|
||||
else
|
||||
return list;
|
||||
}
|
||||
|
||||
public static FluidStack[] getFluidInputFromTempate(ItemStack stack) {
|
||||
|
||||
if(stack == null || !(stack.getItem() instanceof ItemChemistryTemplate))
|
||||
return null;
|
||||
|
||||
FluidStack[] input = new FluidStack[2];
|
||||
|
||||
ItemChemistryTemplate.EnumChemistryTemplate chem = ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage());
|
||||
|
||||
if(chem.isDisabled())
|
||||
return input;
|
||||
|
||||
switch(chem) {
|
||||
case FP_HEAVYOIL:
|
||||
input[0] = new FluidStack(1000, Fluids.HEAVYOIL);
|
||||
break;
|
||||
case FP_SMEAR:
|
||||
input[0] = new FluidStack(1000, Fluids.SMEAR);
|
||||
break;
|
||||
case FP_NAPHTHA:
|
||||
input[0] = new FluidStack(1000, Fluids.NAPHTHA);
|
||||
break;
|
||||
case FP_LIGHTOIL:
|
||||
input[0] = new FluidStack(1000, Fluids.LIGHTOIL);
|
||||
break;
|
||||
case FR_REOIL:
|
||||
input[0] = new FluidStack(1000, Fluids.SMEAR);
|
||||
break;
|
||||
case FR_PETROIL:
|
||||
input[0] = new FluidStack(800, Fluids.RECLAIMED);
|
||||
input[1] = new FluidStack(200, Fluids.LUBRICANT);
|
||||
break;
|
||||
case FC_BITUMEN:
|
||||
input[0] = new FluidStack(1200, Fluids.BITUMEN);
|
||||
input[1] = new FluidStack(2400, Fluids.STEAM);
|
||||
break;
|
||||
case FC_I_NAPHTHA:
|
||||
input[0] = new FluidStack(1400, Fluids.SMEAR);
|
||||
input[1] = new FluidStack(800, Fluids.WATER);
|
||||
break;
|
||||
case FC_GAS_PETROLEUM:
|
||||
input[0] = new FluidStack(1800, Fluids.GAS);
|
||||
input[1] = new FluidStack(1200, Fluids.WATER);
|
||||
break;
|
||||
case FC_DIESEL_KEROSENE:
|
||||
input[0] = new FluidStack(1200, Fluids.DIESEL);
|
||||
input[1] = new FluidStack(2000, Fluids.STEAM);
|
||||
break;
|
||||
case FC_KEROSENE_PETROLEUM:
|
||||
input[0] = new FluidStack(1400, Fluids.KEROSENE);
|
||||
input[1] = new FluidStack(2000, Fluids.STEAM);
|
||||
break;
|
||||
case CC_I:
|
||||
input[0] = new FluidStack(1800, Fluids.WATER);
|
||||
break;
|
||||
case CC_OIL:
|
||||
input[0] = new FluidStack(1400, Fluids.STEAM);
|
||||
break;
|
||||
case CC_HEATING:
|
||||
input[0] = new FluidStack(2000, Fluids.STEAM);
|
||||
break;
|
||||
case CC_HEAVY:
|
||||
input[0] = new FluidStack(1400, Fluids.WATER);
|
||||
break;
|
||||
case CC_NAPHTHA:
|
||||
input[0] = new FluidStack(2400, Fluids.STEAM);
|
||||
break;
|
||||
case ASPHALT:
|
||||
input[0] = new FluidStack(1000, Fluids.BITUMEN);
|
||||
break;
|
||||
case CONCRETE:
|
||||
input[0] = new FluidStack(2000, Fluids.WATER);
|
||||
break;
|
||||
case CONCRETE_ASBESTOS:
|
||||
input[0] = new FluidStack(2000, Fluids.WATER);
|
||||
break;
|
||||
case COOLANT:
|
||||
input[0] = new FluidStack(1800, Fluids.WATER);
|
||||
break;
|
||||
case CRYOGEL:
|
||||
input[0] = new FluidStack(1800, Fluids.COOLANT);
|
||||
break;
|
||||
case DESH:
|
||||
if(GeneralConfig.enableBabyMode) {
|
||||
input[0] = new FluidStack(200, Fluids.LIGHTOIL);
|
||||
} else {
|
||||
input[0] = new FluidStack(200, Fluids.MERCURY);
|
||||
input[1] = new FluidStack(200, Fluids.LIGHTOIL);
|
||||
}
|
||||
break;
|
||||
case PEROXIDE:
|
||||
input[0] = new FluidStack(1000, Fluids.WATER);
|
||||
break;
|
||||
case CIRCUIT_4:
|
||||
input[0] = new FluidStack(400, Fluids.ACID);
|
||||
input[1] = new FluidStack(200, Fluids.PETROLEUM);
|
||||
break;
|
||||
case CIRCUIT_5:
|
||||
input[0] = new FluidStack(800, Fluids.ACID);
|
||||
input[1] = new FluidStack(200, Fluids.MERCURY);
|
||||
break;
|
||||
case SF_OIL:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_OIL * 2, Fluids.OIL);
|
||||
break;
|
||||
case SF_HEAVYOIL:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_HEAVY * 2, Fluids.HEAVYOIL);
|
||||
break;
|
||||
case SF_SMEAR:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_SMEAR * 2, Fluids.SMEAR);
|
||||
break;
|
||||
case SF_HEATINGOIL:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_HEATING * 2, Fluids.HEATINGOIL);
|
||||
break;
|
||||
case SF_RECLAIMED:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_RECLAIMED * 2, Fluids.RECLAIMED);
|
||||
break;
|
||||
case SF_PETROIL:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_PETROIL * 2, Fluids.PETROIL);
|
||||
break;
|
||||
case SF_LUBRICANT:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_LUBE * 2, Fluids.LUBRICANT);
|
||||
break;
|
||||
case SF_NAPHTHA:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_NAPH * 2, Fluids.NAPHTHA);
|
||||
break;
|
||||
case SF_DIESEL:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_DIESEL * 2, Fluids.DIESEL);
|
||||
break;
|
||||
case SF_LIGHTOIL:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_LIGHT * 2, Fluids.LIGHTOIL);
|
||||
break;
|
||||
case SF_KEROSENE:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_KEROSENE * 2, Fluids.KEROSENE);
|
||||
break;
|
||||
case SF_GAS:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_GAS * 2, Fluids.GAS);
|
||||
break;
|
||||
case SF_PETROLEUM:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_PETROLEUM * 2, Fluids.PETROLEUM);
|
||||
break;
|
||||
case SF_BIOGAS:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_BIOGAS * 2, Fluids.BIOGAS);
|
||||
break;
|
||||
case SF_BIOFUEL:
|
||||
input[0] = new FluidStack(SolidificationRecipes.SF_BIOFUEL * 2, Fluids.BIOFUEL);
|
||||
break;
|
||||
case POLYMER:
|
||||
input[0] = new FluidStack(600, Fluids.PETROLEUM);
|
||||
break;
|
||||
case DEUTERIUM:
|
||||
input[0] = new FluidStack(4000, Fluids.WATER);
|
||||
break;
|
||||
case STEAM:
|
||||
input[0] = new FluidStack(1000, Fluids.WATER);
|
||||
break;
|
||||
case LPG:
|
||||
input[0] = new FluidStack(2000, Fluids.PETROLEUM);
|
||||
break;
|
||||
case BP_BIOFUEL:
|
||||
input[0] = new FluidStack(2000, Fluids.BIOGAS);
|
||||
break;
|
||||
case YELLOWCAKE:
|
||||
input[0] = new FluidStack(500, Fluids.ACID);
|
||||
break;
|
||||
case UF6:
|
||||
input[0] = new FluidStack(1000, Fluids.WATER);
|
||||
break;
|
||||
case PUF6:
|
||||
input[0] = new FluidStack(1000, Fluids.WATER);
|
||||
break;
|
||||
case SAS3:
|
||||
input[0] = new FluidStack(2000, Fluids.ACID);
|
||||
break;
|
||||
case NITAN:
|
||||
input[0] = new FluidStack(600, Fluids.KEROSENE);
|
||||
input[1] = new FluidStack(200, Fluids.MERCURY);
|
||||
break;
|
||||
case OIL_SAND:
|
||||
input[0] = new FluidStack(400, Fluids.BITUMEN);
|
||||
break;
|
||||
case CORDITE:
|
||||
input[0] = new FluidStack(200, Fluids.HEATINGOIL);
|
||||
break;
|
||||
case KEVLAR:
|
||||
input[0] = new FluidStack(100, Fluids.PETROLEUM);
|
||||
break;
|
||||
case SOLID_FUEL:
|
||||
input[0] = new FluidStack(200, Fluids.PETROLEUM);
|
||||
break;
|
||||
case ELECTROLYSIS:
|
||||
input[0] = new FluidStack(8000, Fluids.WATER);
|
||||
break;
|
||||
case XENON:
|
||||
input[0] = new FluidStack(0, Fluids.NONE);
|
||||
break;
|
||||
case XENON_OXY:
|
||||
input[0] = new FluidStack(250, Fluids.OXYGEN);
|
||||
break;
|
||||
case SATURN:
|
||||
input[0] = new FluidStack(100, Fluids.ACID);
|
||||
input[1] = new FluidStack(50, Fluids.MERCURY);
|
||||
break;
|
||||
case BALEFIRE:
|
||||
input[0] = new FluidStack(6000, Fluids.KEROSENE);
|
||||
break;
|
||||
case SCHRABIDIC:
|
||||
input[0] = new FluidStack(8000, Fluids.SAS3);
|
||||
input[1] = new FluidStack(6000, Fluids.ACID);
|
||||
break;
|
||||
case SCHRABIDATE:
|
||||
input[0] = new FluidStack(250, Fluids.SCHRABIDIC);
|
||||
break;
|
||||
case COLTAN_CLEANING:
|
||||
input[0] = new FluidStack(250, Fluids.ACID);
|
||||
input[1] = new FluidStack(500, Fluids.HYDROGEN);
|
||||
break;
|
||||
case COLTAN_PAIN:
|
||||
input[0] = new FluidStack(1000, Fluids.GAS);
|
||||
input[1] = new FluidStack(500, Fluids.OXYGEN);
|
||||
break;
|
||||
case COLTAN_CRYSTAL:
|
||||
input[0] = new FluidStack(1000, Fluids.PAIN);
|
||||
input[1] = new FluidStack(500, Fluids.ACID);
|
||||
break;
|
||||
case VIT_LIQUID:
|
||||
input[0] = new FluidStack(1000, Fluids.WASTEFLUID);
|
||||
break;
|
||||
case VIT_GAS:
|
||||
input[0] = new FluidStack(1000, Fluids.WASTEGAS);
|
||||
break;
|
||||
case TEL:
|
||||
input[0] = new FluidStack(100, Fluids.PETROLEUM);
|
||||
input[1] = new FluidStack(1000, Fluids.STEAM);
|
||||
break;
|
||||
case GASOLINE:
|
||||
input[0] = new FluidStack(10000, Fluids.PETROIL);
|
||||
break;
|
||||
case FRACKSOL:
|
||||
input[0] = new FluidStack(100, Fluids.PETROLEUM);
|
||||
input[1] = new FluidStack(1000, Fluids.WATER);
|
||||
break;
|
||||
case OSMIRIDIUM_DEATH:
|
||||
input[0] = new FluidStack(1000, Fluids.ACID);
|
||||
break;
|
||||
case METH:
|
||||
input[0] = new FluidStack(400, Fluids.LUBRICANT);
|
||||
input[1] = new FluidStack(400, Fluids.ACID);
|
||||
break;
|
||||
case CO2:
|
||||
input[0] = new FluidStack(1000, Fluids.GAS);
|
||||
break;
|
||||
case HEAVY_ELECTROLYSIS:
|
||||
input[0] = new FluidStack(8000, Fluids.HEAVYWATER);
|
||||
break;
|
||||
case DUCRETE:
|
||||
input[0] = new FluidStack(2000, Fluids.WATER);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return input;
|
||||
}
|
||||
|
||||
public static ItemStack[] getChemOutputFromTempate(ItemStack stack) {
|
||||
|
||||
if(stack == null || !(stack.getItem() instanceof ItemChemistryTemplate))
|
||||
return null;
|
||||
|
||||
ItemStack[] output = new ItemStack[4];
|
||||
|
||||
ItemChemistryTemplate.EnumChemistryTemplate chem = ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage());
|
||||
|
||||
if(chem.isDisabled())
|
||||
return output;
|
||||
|
||||
switch(chem) {
|
||||
case ASPHALT:
|
||||
output[0] = new ItemStack(ModBlocks.asphalt, 4);
|
||||
output[1] = new ItemStack(ModBlocks.asphalt, 4);
|
||||
output[2] = new ItemStack(ModBlocks.asphalt, 4);
|
||||
output[3] = new ItemStack(ModBlocks.asphalt, 4);
|
||||
break;
|
||||
case CONCRETE:
|
||||
output[0] = new ItemStack(ModBlocks.concrete_smooth, 4);
|
||||
output[1] = new ItemStack(ModBlocks.concrete_smooth, 4);
|
||||
output[2] = new ItemStack(ModBlocks.concrete_smooth, 4);
|
||||
output[3] = new ItemStack(ModBlocks.concrete_smooth, 4);
|
||||
break;
|
||||
case CONCRETE_ASBESTOS:
|
||||
output[0] = new ItemStack(ModBlocks.concrete_asbestos, 4);
|
||||
output[1] = new ItemStack(ModBlocks.concrete_asbestos, 4);
|
||||
output[2] = new ItemStack(ModBlocks.concrete_asbestos, 4);
|
||||
output[3] = new ItemStack(ModBlocks.concrete_asbestos, 4);
|
||||
break;
|
||||
case DESH:
|
||||
output[0] = new ItemStack(ModItems.ingot_desh, 1);
|
||||
break;
|
||||
case CIRCUIT_4:
|
||||
output[0] = new ItemStack(ModItems.circuit_gold, 1);
|
||||
break;
|
||||
case CIRCUIT_5:
|
||||
output[0] = new ItemStack(ModItems.circuit_schrabidium, 1);
|
||||
break;
|
||||
case SF_OIL:
|
||||
output[0] = DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE);
|
||||
output[1] = DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE);
|
||||
break;
|
||||
case SF_HEAVYOIL:
|
||||
output[0] = DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE);
|
||||
output[1] = DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE);
|
||||
break;
|
||||
case SF_SMEAR:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_HEATINGOIL:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_RECLAIMED:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_PETROIL:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_LUBRICANT:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_NAPHTHA:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_DIESEL:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_LIGHTOIL:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_KEROSENE:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_GAS:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_PETROLEUM:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_BIOGAS:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case SF_BIOFUEL:
|
||||
output[0] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
output[1] = new ItemStack(ModItems.solid_fuel, 1);
|
||||
break;
|
||||
case POLYMER:
|
||||
output[0] = new ItemStack(ModItems.ingot_polymer, 1);
|
||||
break;
|
||||
case YELLOWCAKE:
|
||||
output[0] = new ItemStack(ModItems.powder_yellowcake, 1);
|
||||
break;
|
||||
case UF6:
|
||||
output[0] = new ItemStack(ModItems.sulfur, 2);
|
||||
break;
|
||||
case DYN_SCHRAB:
|
||||
output[0] = new ItemStack(ModItems.ingot_schrabidium, 1);
|
||||
output[1] = new ItemStack(ModItems.powder_desh, 12);
|
||||
output[2] = new ItemStack(ModItems.powder_desh_mix, 12);
|
||||
break;
|
||||
case DYN_EUPH:
|
||||
output[0] = new ItemStack(ModItems.nugget_euphemium, 12);
|
||||
output[1] = new ItemStack(ModItems.powder_schrabidium, 4);
|
||||
output[2] = new ItemStack(ModItems.powder_power, 4);
|
||||
break;
|
||||
case DYN_DNT:
|
||||
output[0] = new ItemStack(ModItems.ingot_dineutronium, 1);
|
||||
output[1] = new ItemStack(ModItems.powder_euphemium, 8);
|
||||
output[2] = new ItemStack(ModItems.powder_nitan_mix, 8);
|
||||
break;
|
||||
case CORDITE:
|
||||
output[0] = new ItemStack(ModItems.cordite, 4);
|
||||
break;
|
||||
case KEVLAR:
|
||||
output[0] = new ItemStack(ModItems.plate_kevlar, 4);
|
||||
break;
|
||||
case SOLID_FUEL:
|
||||
output[0] = new ItemStack(ModItems.rocket_fuel, 4);
|
||||
break;
|
||||
case SATURN:
|
||||
output[0] = new ItemStack(ModItems.ingot_saturnite, 2);
|
||||
break;
|
||||
case BALEFIRE:
|
||||
output[0] = new ItemStack(ModItems.powder_balefire, 1);
|
||||
break;
|
||||
case SCHRABIDATE:
|
||||
output[0] = new ItemStack(ModItems.powder_schrabidate, 1);
|
||||
break;
|
||||
case COLTAN_CLEANING:
|
||||
output[0] = new ItemStack(ModItems.powder_coltan, 1);
|
||||
output[1] = new ItemStack(ModItems.powder_niobium, 1);
|
||||
output[2] = new ItemStack(ModItems.dust, 1);
|
||||
break;
|
||||
case COLTAN_CRYSTAL:
|
||||
output[0] = new ItemStack(ModItems.gem_tantalium, 1);
|
||||
output[1] = new ItemStack(ModItems.dust, 3);
|
||||
break;
|
||||
case VIT_LIQUID:
|
||||
case VIT_GAS:
|
||||
output[0] = new ItemStack(ModItems.nuclear_waste_vitrified, 1);
|
||||
break;
|
||||
case TEL:
|
||||
output[0] = new ItemStack(ModItems.antiknock, 1);
|
||||
break;
|
||||
case METH:
|
||||
output[0] = new ItemStack(ModItems.chocolate, 2);
|
||||
output[1] = new ItemStack(ModItems.chocolate, 2);
|
||||
break;
|
||||
case DUCRETE:
|
||||
output[0] = new ItemStack(ModBlocks.ducrete_smooth, 2);
|
||||
output[1] = new ItemStack(ModBlocks.ducrete_smooth, 2);
|
||||
output[2] = new ItemStack(ModBlocks.ducrete_smooth, 2);
|
||||
output[3] = new ItemStack(ModBlocks.ducrete_smooth, 2);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
public static FluidStack[] getFluidOutputFromTempate(ItemStack stack) {
|
||||
|
||||
if(stack == null || !(stack.getItem() instanceof ItemChemistryTemplate))
|
||||
return null;
|
||||
|
||||
FluidStack[] output = new FluidStack[2];
|
||||
|
||||
ItemChemistryTemplate.EnumChemistryTemplate chem = ItemChemistryTemplate.EnumChemistryTemplate.getEnum(stack.getItemDamage());
|
||||
|
||||
if(chem.isDisabled())
|
||||
return output;
|
||||
|
||||
switch(chem) {
|
||||
case FP_HEAVYOIL:
|
||||
output[0] = new FluidStack(RefineryRecipes.heavy_frac_bitu * 10, Fluids.BITUMEN);
|
||||
output[1] = new FluidStack(RefineryRecipes.heavy_frac_smear * 10, Fluids.SMEAR);
|
||||
break;
|
||||
case FP_SMEAR:
|
||||
output[0] = new FluidStack(RefineryRecipes.smear_frac_heat * 10, Fluids.HEATINGOIL);
|
||||
output[1] = new FluidStack(RefineryRecipes.smear_frac_lube * 10, Fluids.LUBRICANT);
|
||||
break;
|
||||
case FP_NAPHTHA:
|
||||
output[0] = new FluidStack(RefineryRecipes.napht_frac_heat * 10, Fluids.HEATINGOIL);
|
||||
output[1] = new FluidStack(RefineryRecipes.napht_frac_diesel * 10, Fluids.DIESEL);
|
||||
break;
|
||||
case FP_LIGHTOIL:
|
||||
output[0] = new FluidStack(RefineryRecipes.light_frac_diesel * 10, Fluids.DIESEL);
|
||||
output[1] = new FluidStack(RefineryRecipes.light_frac_kero * 10, Fluids.KEROSENE);
|
||||
break;
|
||||
case FR_REOIL:
|
||||
output[0] = new FluidStack(800, Fluids.RECLAIMED);
|
||||
break;
|
||||
case FR_PETROIL:
|
||||
output[0] = new FluidStack(1000, Fluids.PETROIL);
|
||||
break;
|
||||
case FC_BITUMEN:
|
||||
output[0] = new FluidStack(1000, Fluids.OIL);
|
||||
output[1] = new FluidStack(200, Fluids.PETROLEUM);
|
||||
break;
|
||||
case FC_I_NAPHTHA:
|
||||
output[0] = new FluidStack(800, Fluids.NAPHTHA);
|
||||
break;
|
||||
case FC_GAS_PETROLEUM:
|
||||
output[0] = new FluidStack(800, Fluids.PETROLEUM);
|
||||
break;
|
||||
case FC_DIESEL_KEROSENE:
|
||||
output[0] = new FluidStack(400, Fluids.KEROSENE);
|
||||
break;
|
||||
case FC_KEROSENE_PETROLEUM:
|
||||
output[0] = new FluidStack(800, Fluids.PETROLEUM);
|
||||
break;
|
||||
case CC_OIL:
|
||||
output[0] = new FluidStack(2000, Fluids.OIL);
|
||||
break;
|
||||
case CC_I:
|
||||
output[0] = new FluidStack(1600, Fluids.SMEAR);
|
||||
break;
|
||||
case CC_HEATING:
|
||||
output[0] = new FluidStack(1800, Fluids.HEATINGOIL);
|
||||
break;
|
||||
case CC_HEAVY:
|
||||
output[0] = new FluidStack(1800, Fluids.HEAVYOIL);
|
||||
break;
|
||||
case CC_NAPHTHA:
|
||||
output[0] = new FluidStack(2000, Fluids.NAPHTHA);
|
||||
break;
|
||||
case COOLANT:
|
||||
output[0] = new FluidStack(2000, Fluids.COOLANT);
|
||||
break;
|
||||
case CRYOGEL:
|
||||
output[0] = new FluidStack(2000, Fluids.CRYOGEL);
|
||||
break;
|
||||
case PEROXIDE:
|
||||
output[0] = new FluidStack(800, Fluids.ACID);
|
||||
break;
|
||||
case DEUTERIUM:
|
||||
output[0] = new FluidStack(500, Fluids.DEUTERIUM);
|
||||
break;
|
||||
case STEAM:
|
||||
output[0] = new FluidStack(1000, Fluids.STEAM);
|
||||
break;
|
||||
case BP_BIOGAS:
|
||||
output[0] = new FluidStack(4000, Fluids.BIOGAS);
|
||||
break;
|
||||
case BP_BIOFUEL:
|
||||
output[0] = new FluidStack(1000, Fluids.BIOFUEL);
|
||||
break;
|
||||
case LPG:
|
||||
output[0] = new FluidStack(1000, Fluids.LPG);
|
||||
break;
|
||||
case UF6:
|
||||
output[0] = new FluidStack(1200, Fluids.UF6);
|
||||
break;
|
||||
case PUF6:
|
||||
output[0] = new FluidStack(900, Fluids.PUF6);
|
||||
break;
|
||||
case SAS3:
|
||||
output[0] = new FluidStack(1000, Fluids.SAS3);
|
||||
break;
|
||||
case NITAN:
|
||||
output[0] = new FluidStack(1000, Fluids.NITAN);
|
||||
break;
|
||||
case OIL_SAND:
|
||||
output[0] = new FluidStack(1000, Fluids.BITUMEN);
|
||||
break;
|
||||
case DYN_SCHRAB:
|
||||
output[0] = new FluidStack(50, Fluids.WATZ);
|
||||
break;
|
||||
case DYN_EUPH:
|
||||
output[0] = new FluidStack(100, Fluids.WATZ);
|
||||
break;
|
||||
case DYN_DNT:
|
||||
output[0] = new FluidStack(150, Fluids.WATZ);
|
||||
break;
|
||||
case ELECTROLYSIS:
|
||||
output[0] = new FluidStack(400, Fluids.HYDROGEN);
|
||||
output[1] = new FluidStack(400, Fluids.OXYGEN);
|
||||
break;
|
||||
case XENON:
|
||||
output[0] = new FluidStack(50, Fluids.XENON);
|
||||
break;
|
||||
case XENON_OXY:
|
||||
output[0] = new FluidStack(50, Fluids.XENON);
|
||||
break;
|
||||
case BALEFIRE:
|
||||
output[0] = new FluidStack(8000, Fluids.BALEFIRE);
|
||||
break;
|
||||
case SCHRABIDIC:
|
||||
output[0] = new FluidStack(16000, Fluids.SCHRABIDIC);
|
||||
break;
|
||||
case COLTAN_CLEANING:
|
||||
output[0] = new FluidStack(500, Fluids.WATER);
|
||||
break;
|
||||
case COLTAN_PAIN:
|
||||
output[0] = new FluidStack(1000, Fluids.PAIN);
|
||||
break;
|
||||
case COLTAN_CRYSTAL:
|
||||
output[0] = new FluidStack(250, Fluids.WATER);
|
||||
break;
|
||||
case GASOLINE:
|
||||
output[0] = new FluidStack(12000, Fluids.GASOLINE);
|
||||
break;
|
||||
case FRACKSOL:
|
||||
output[0] = new FluidStack(1000, Fluids.FRACKSOL);
|
||||
break;
|
||||
case HELIUM3:
|
||||
output[0] = new FluidStack(1000, Fluids.HELIUM3);
|
||||
break;
|
||||
case OSMIRIDIUM_DEATH:
|
||||
output[0] = new FluidStack(1000, Fluids.DEATH);
|
||||
break;
|
||||
case ETHANOL:
|
||||
output[0] = new FluidStack(1000, Fluids.ETHANOL);
|
||||
break;
|
||||
case CO2:
|
||||
output[0] = new FluidStack(1000, Fluids.CARBONDIOXIDE);
|
||||
break;
|
||||
case HEAVY_ELECTROLYSIS:
|
||||
output[0] = new FluidStack(400, Fluids.DEUTERIUM);
|
||||
output[1] = new FluidStack(400, Fluids.OXYGEN);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
public Map<Object, Object> getFluidContainers() {
|
||||
Map<Object, Object> map = new HashMap<Object, Object>();
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@ import java.util.Map.Entry;
|
||||
import com.hbm.inventory.RecipesCommon.ComparableStack;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths;
|
||||
import com.hbm.items.special.ItemWasteLong;
|
||||
import com.hbm.items.special.ItemWasteShort;
|
||||
import com.hbm.util.WeightedRandomObject;
|
||||
@ -532,7 +533,7 @@ public class SILEXRecipes {
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 1))
|
||||
);
|
||||
|
||||
recipes.put(new ComparableStack(Blocks.gravel, 1), new SILEXRecipe(1000, 250, 0)
|
||||
recipes.put(new ComparableStack(Blocks.gravel, 1), new SILEXRecipe(1000, 250, EnumWavelengths.VISIBLE)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(Items.flint), 80))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_boron), 5))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_lithium), 10))
|
||||
@ -627,15 +628,19 @@ public static class SILEXRecipe {
|
||||
|
||||
public int fluidProduced;
|
||||
public int fluidConsumed;
|
||||
public int laserStrength;
|
||||
public EnumWavelengths laserStrength;
|
||||
public List<WeightedRandomObject> outputs = new ArrayList();
|
||||
|
||||
public SILEXRecipe(int fluidProduced, int fluidConsumed, int laserStrength) {
|
||||
public SILEXRecipe(int fluidProduced, int fluidConsumed, EnumWavelengths laserStrength) {
|
||||
this.fluidProduced = fluidProduced;
|
||||
this.fluidConsumed = fluidConsumed;
|
||||
this.laserStrength = laserStrength;
|
||||
}
|
||||
|
||||
public SILEXRecipe(int fluidProduced, int fluidConsumed, int laserStrength) {
|
||||
this(fluidProduced, fluidConsumed, EnumWavelengths.values()[laserStrength]);
|
||||
}
|
||||
|
||||
public SILEXRecipe addOut(WeightedRandomObject entry) {
|
||||
outputs.add(entry);
|
||||
return this;
|
||||
|
||||
@ -14,6 +14,7 @@ import com.hbm.util.Tuple.Pair;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@ -54,6 +55,7 @@ public class SolidificationRecipes {
|
||||
registerRecipe(MERCURY, 125, ModItems.ingot_mercury);
|
||||
registerRecipe(BIOGAS, 250, ModItems.biomass_compressed);
|
||||
registerRecipe(SALIENT, 1280, new ItemStack(ModItems.bio_wafer, 8)); //4 (food val) * 2 (sat mod) * 2 (constant) * 10 (quanta) * 8 (batch size)
|
||||
registerRecipe(ENDERJUICE, 100, Items.ender_pearl);
|
||||
|
||||
registerRecipe(OIL, SF_OIL, DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRUDE));
|
||||
registerRecipe(CRACKOIL, SF_OIL, DictFrame.fromOne(ModItems.oil_tar, EnumTarType.CRACK));
|
||||
|
||||
@ -4730,7 +4730,7 @@ public class ModItems {
|
||||
fluid_icon = new ItemFluidIcon().setUnlocalizedName("fluid_icon").setCreativeTab(null).setTextureName(RefStrings.MODID + ":fluid_icon");
|
||||
fluid_tank_full = new ItemFluidTank().setUnlocalizedName("fluid_tank_full").setContainerItem(ModItems.fluid_tank_empty).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_tank");
|
||||
fluid_tank_empty = new Item().setUnlocalizedName("fluid_tank_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_tank");
|
||||
fluid_tank_lead_full = new ItemFluidTank().setUnlocalizedName("fluid_tank_lead_full").setContainerItem(ModItems.fluid_tank_empty).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_tank_lead");
|
||||
fluid_tank_lead_full = new ItemFluidTank().setUnlocalizedName("fluid_tank_lead_full").setContainerItem(ModItems.fluid_tank_lead_empty).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_tank_lead");
|
||||
fluid_tank_lead_empty = new Item().setUnlocalizedName("fluid_tank_lead_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_tank_lead");
|
||||
fluid_barrel_full = new ItemFluidTank().setUnlocalizedName("fluid_barrel_full").setContainerItem(ModItems.fluid_barrel_empty).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_barrel");
|
||||
fluid_barrel_empty = new Item().setUnlocalizedName("fluid_barrel_empty").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":fluid_barrel");
|
||||
|
||||
@ -78,11 +78,6 @@ public class ItemBlockLore extends ItemBlock {
|
||||
list.add("Come on, get a derrick you doofus.");
|
||||
}
|
||||
|
||||
if(this.field_150939_a == ModBlocks.machine_mining_laser) {
|
||||
list.add("3x3x3 Multiblock");
|
||||
list.add("Only placeable on a ceiling.");
|
||||
}
|
||||
|
||||
if(this.field_150939_a == ModBlocks.gravel_diamond) {
|
||||
list.add("There is some kind of joke here,");
|
||||
list.add("but I can't quite tell what it is.");
|
||||
|
||||
@ -2,8 +2,9 @@ package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemChemistryTemplate.EnumChemistryTemplate;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@ -16,55 +17,50 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class ItemChemistryIcon extends Item {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
public ItemChemistryIcon()
|
||||
{
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
public String getItemStackDisplayName(ItemStack stack)
|
||||
{
|
||||
String s = ("" + StatCollector.translateToLocal(ModItems.chemistry_template.getUnlocalizedName() + ".name")).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal("chem." + EnumChemistryTemplate.getEnum(stack.getItemDamage()).name())).trim();
|
||||
|
||||
if (s1 != null)
|
||||
{
|
||||
s = s + " " + s1;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
||||
{
|
||||
for (int i = 0; i < EnumChemistryTemplate.values().length; ++i)
|
||||
{
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
private IIcon[] icons;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister reg)
|
||||
{
|
||||
this.icons = new IIcon[EnumChemistryTemplate.values().length];
|
||||
public ItemChemistryIcon() {
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
}
|
||||
|
||||
for (int i = 0; i < icons.length; ++i)
|
||||
{
|
||||
this.icons[i] = reg.registerIcon("hbm:chem_icon_" + EnumChemistryTemplate.getEnum(i).name());
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int i)
|
||||
{
|
||||
int j = MathHelper.clamp_int(i, 0, icons.length - 1);
|
||||
return this.icons[j];
|
||||
}
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
|
||||
ChemRecipe chem = ChemplantRecipes.recipes.get(stack.getItemDamage() % ChemplantRecipes.recipes.size());
|
||||
|
||||
String s = ("" + StatCollector.translateToLocal(ModItems.chemistry_template.getUnlocalizedName() + ".name")).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal("chem." + chem.name)).trim();
|
||||
|
||||
if(s1 != null) {
|
||||
s = s + " " + s1;
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for(int i = 0; i < ChemplantRecipes.recipes.size(); i++) {
|
||||
list.add(new ItemStack(item, 1, ChemplantRecipes.recipes.get(i).getId()));
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister reg) {
|
||||
this.icons = new IIcon[ChemplantRecipes.recipes.size()];
|
||||
|
||||
for(int i = 0; i < icons.length; ++i) {
|
||||
this.icons[i] = reg.registerIcon("hbm:chem_icon_" + ChemplantRecipes.recipes.get(i).name);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int i) {
|
||||
int j = MathHelper.clamp_int(i, 0, icons.length - 1);
|
||||
return this.icons[j];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -2,9 +2,8 @@ package com.hbm.items.machine;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.inventory.FluidStack;
|
||||
import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.util.I18nUtil;
|
||||
|
||||
@ -19,122 +18,6 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class ItemChemistryTemplate extends Item {
|
||||
|
||||
@Spaghetti("this system is so utterly and horribly fucking retarded i can not believe i haven't been shot for this yet")
|
||||
public enum EnumChemistryTemplate {
|
||||
|
||||
//FP - Fuel Processing
|
||||
//FR - Fuel Reprocessing
|
||||
//FC - Fuel Cracking
|
||||
//CC - Coal Cracking
|
||||
//SF - Solid Fuel Production
|
||||
//BP - Biofuel Production
|
||||
|
||||
FP_HEAVYOIL,
|
||||
FP_SMEAR,
|
||||
FP_NAPHTHA,
|
||||
FP_LIGHTOIL,
|
||||
FR_REOIL,
|
||||
FR_PETROIL,
|
||||
FC_BITUMEN(true),
|
||||
FC_I_NAPHTHA(true),
|
||||
FC_GAS_PETROLEUM(true),
|
||||
FC_DIESEL_KEROSENE(true),
|
||||
FC_KEROSENE_PETROLEUM(true),
|
||||
CC_OIL(true),
|
||||
CC_I(true),
|
||||
CC_HEATING(true),
|
||||
CC_HEAVY(true),
|
||||
CC_NAPHTHA(true),
|
||||
SF_OIL(true),
|
||||
SF_HEAVYOIL(true),
|
||||
SF_SMEAR(true),
|
||||
SF_HEATINGOIL(true),
|
||||
SF_RECLAIMED(true),
|
||||
SF_PETROIL(true),
|
||||
SF_LUBRICANT(true),
|
||||
SF_NAPHTHA(true),
|
||||
SF_DIESEL(true),
|
||||
SF_LIGHTOIL(true),
|
||||
SF_KEROSENE(true),
|
||||
SF_GAS(true),
|
||||
SF_PETROLEUM(true),
|
||||
SF_BIOGAS(true),
|
||||
SF_BIOFUEL(true),
|
||||
BP_BIOGAS,
|
||||
BP_BIOFUEL,
|
||||
LPG,
|
||||
OIL_SAND,
|
||||
ASPHALT,
|
||||
COOLANT,
|
||||
CRYOGEL,
|
||||
DESH,
|
||||
NITAN,
|
||||
PEROXIDE,
|
||||
CIRCUIT_4,
|
||||
CIRCUIT_5,
|
||||
POLYMER,
|
||||
DEUTERIUM,
|
||||
STEAM,
|
||||
YELLOWCAKE,
|
||||
UF6,
|
||||
PUF6,
|
||||
SAS3,
|
||||
DYN_SCHRAB,
|
||||
DYN_EUPH,
|
||||
DYN_DNT,
|
||||
CORDITE,
|
||||
KEVLAR,
|
||||
CONCRETE,
|
||||
CONCRETE_ASBESTOS,
|
||||
SOLID_FUEL,
|
||||
ELECTROLYSIS,
|
||||
XENON,
|
||||
XENON_OXY,
|
||||
SATURN,
|
||||
BALEFIRE,
|
||||
SCHRABIDIC,
|
||||
SCHRABIDATE,
|
||||
COLTAN_CLEANING,
|
||||
COLTAN_PAIN,
|
||||
COLTAN_CRYSTAL,
|
||||
VIT_LIQUID,
|
||||
VIT_GAS,
|
||||
TEL,
|
||||
GASOLINE,
|
||||
FRACKSOL,
|
||||
HELIUM3,
|
||||
OSMIRIDIUM_DEATH,
|
||||
ETHANOL,
|
||||
METH,
|
||||
CO2,
|
||||
HEAVY_ELECTROLYSIS,
|
||||
DUCRETE;
|
||||
|
||||
private boolean disabled = false;
|
||||
|
||||
private EnumChemistryTemplate() { }
|
||||
|
||||
/** Alternate ctor for disabling recipes to prevent recipe shifting armageddon */
|
||||
private EnumChemistryTemplate(boolean disabled) {
|
||||
this.disabled = disabled;
|
||||
}
|
||||
|
||||
public static EnumChemistryTemplate getEnum(int i) {
|
||||
if(i < EnumChemistryTemplate.values().length)
|
||||
return EnumChemistryTemplate.values()[i];
|
||||
else
|
||||
return FP_HEAVYOIL;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.toString();
|
||||
}
|
||||
|
||||
public boolean isDisabled() {
|
||||
return this.disabled;
|
||||
}
|
||||
}
|
||||
|
||||
public ItemChemistryTemplate() {
|
||||
this.setHasSubtypes(true);
|
||||
@ -142,13 +25,14 @@ public class ItemChemistryTemplate extends Item {
|
||||
}
|
||||
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
EnumChemistryTemplate enum1 = EnumChemistryTemplate.getEnum(stack.getItemDamage());
|
||||
|
||||
if(enum1.isDisabled()) {
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(stack.getItemDamage());
|
||||
|
||||
if(recipe == null) {
|
||||
return EnumChatFormatting.RED + "Broken Template" + EnumChatFormatting.RESET;
|
||||
} else {
|
||||
String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal("chem." + enum1.name())).trim();
|
||||
String s1 = ("" + StatCollector.translateToLocal("chem." + recipe.name)).trim();
|
||||
|
||||
if(s1 != null) {
|
||||
s = s + " " + s1;
|
||||
@ -161,105 +45,8 @@ public class ItemChemistryTemplate extends Item {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for(int i = 0; i < EnumChemistryTemplate.values().length; ++i) {
|
||||
EnumChemistryTemplate enum1 = EnumChemistryTemplate.getEnum(i);
|
||||
|
||||
if(!enum1.isDisabled()) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int getProcessTime(ItemStack stack) {
|
||||
|
||||
if(!(stack.getItem() instanceof ItemChemistryTemplate))
|
||||
return 100;
|
||||
|
||||
int i = stack.getItemDamage();
|
||||
EnumChemistryTemplate enum1 = EnumChemistryTemplate.getEnum(i);
|
||||
|
||||
switch(enum1) {
|
||||
case FP_HEAVYOIL: return 50;
|
||||
case FP_SMEAR: return 50;
|
||||
case FP_NAPHTHA: return 50;
|
||||
case FP_LIGHTOIL: return 50;
|
||||
case FR_REOIL: return 30;
|
||||
case FR_PETROIL: return 30;
|
||||
case OIL_SAND: return 200;
|
||||
case FC_BITUMEN: return 100;
|
||||
case FC_I_NAPHTHA: return 150;
|
||||
case FC_GAS_PETROLEUM: return 100;
|
||||
case FC_DIESEL_KEROSENE: return 150;
|
||||
case FC_KEROSENE_PETROLEUM: return 150;
|
||||
case CC_OIL: return 150;
|
||||
case CC_I: return 200;
|
||||
case CC_HEATING: return 250;
|
||||
case CC_HEAVY: return 200;
|
||||
case CC_NAPHTHA: return 300;
|
||||
case ASPHALT: return 100;
|
||||
case COOLANT: return 50;
|
||||
case CRYOGEL: return 50;
|
||||
case DESH: return 300;
|
||||
case NITAN: return 50;
|
||||
case PEROXIDE: return 50;
|
||||
case CIRCUIT_4: return 200;
|
||||
case CIRCUIT_5: return 250;
|
||||
case SF_OIL: return 20;
|
||||
case SF_HEAVYOIL: return 20;
|
||||
case SF_SMEAR: return 20;
|
||||
case SF_HEATINGOIL: return 20;
|
||||
case SF_RECLAIMED: return 20;
|
||||
case SF_PETROIL: return 20;
|
||||
case SF_LUBRICANT: return 20;
|
||||
case SF_NAPHTHA: return 20;
|
||||
case SF_DIESEL: return 20;
|
||||
case SF_LIGHTOIL: return 20;
|
||||
case SF_KEROSENE: return 20;
|
||||
case SF_GAS: return 20;
|
||||
case SF_PETROLEUM: return 20;
|
||||
case SF_BIOGAS: return 20;
|
||||
case SF_BIOFUEL: return 20;
|
||||
case POLYMER: return 100;
|
||||
case DEUTERIUM: return 200;
|
||||
case STEAM: return 20;
|
||||
case BP_BIOGAS: return 200;
|
||||
case BP_BIOFUEL: return 100;
|
||||
case LPG: return 100;
|
||||
case YELLOWCAKE: return 250;
|
||||
case UF6: return 100;
|
||||
case PUF6: return 150;
|
||||
case SAS3: return 200;
|
||||
case DYN_SCHRAB: return 1 * 60 * 20;
|
||||
case DYN_EUPH: return 3 * 60 * 20;
|
||||
case DYN_DNT: return 5 * 60 * 20;
|
||||
case CORDITE: return 40;
|
||||
case KEVLAR: return 40;
|
||||
case CONCRETE: return 100;
|
||||
case CONCRETE_ASBESTOS: return 100;
|
||||
case SOLID_FUEL: return 200;
|
||||
case ELECTROLYSIS: return 150;
|
||||
case XENON: return 300;
|
||||
case XENON_OXY: return 20;
|
||||
case SATURN: return 60;
|
||||
case BALEFIRE: return 100;
|
||||
case SCHRABIDIC: return 100;
|
||||
case SCHRABIDATE: return 150;
|
||||
case COLTAN_CLEANING: return 60;
|
||||
case COLTAN_PAIN: return 120;
|
||||
case COLTAN_CRYSTAL: return 80;
|
||||
case VIT_LIQUID: return 100;
|
||||
case VIT_GAS: return 100;
|
||||
case TEL: return 40;
|
||||
case GASOLINE: return 40;
|
||||
case FRACKSOL: return 20;
|
||||
case HELIUM3: return 200;
|
||||
case OSMIRIDIUM_DEATH: return 240;
|
||||
case ETHANOL: return 50;
|
||||
case METH: return 30;
|
||||
case CO2: return 60;
|
||||
case HEAVY_ELECTROLYSIS: return 150;
|
||||
case DUCRETE: return 150;
|
||||
default: return 100;
|
||||
for(int i = 0; i < ChemplantRecipes.recipes.size(); i++) {
|
||||
list.add(new ItemStack(item, 1, ChemplantRecipes.recipes.get(i).getId()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -268,45 +55,49 @@ public class ItemChemistryTemplate extends Item {
|
||||
|
||||
if(!(stack.getItem() instanceof ItemChemistryTemplate))
|
||||
return;
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(stack.getItemDamage());
|
||||
|
||||
if(EnumChemistryTemplate.getEnum(stack.getItemDamage()).isDisabled()) {
|
||||
if(recipe == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<ItemStack> stacks = MachineRecipes.getChemInputFromTempate(stack);
|
||||
FluidStack[] inF = MachineRecipes.getFluidInputFromTempate(stack);
|
||||
ItemStack[] out = MachineRecipes.getChemOutputFromTempate(stack);
|
||||
FluidStack[] outF = MachineRecipes.getFluidOutputFromTempate(stack);
|
||||
|
||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("info.templatefolder", I18nUtil.resolveKey(ModItems.template_folder.getUnlocalizedName() + ".name")));
|
||||
list.add("");
|
||||
|
||||
try {
|
||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_out_p"));
|
||||
for(int i = 0; i < 4; i++)
|
||||
if(out[i] != null)
|
||||
list.add(out[i].stackSize + "x " + out[i].getDisplayName());
|
||||
for(int i = 0; i < 4; i++) {
|
||||
if(recipe.outputs[i] != null) {
|
||||
list.add(recipe.outputs[i].stackSize + "x " + recipe.outputs[i].getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 2; i++)
|
||||
if(outF[i] != null)
|
||||
list.add(outF[i].fill + "mB " + I18n.format(outF[i].type.getUnlocalizedName()));
|
||||
for(int i = 0; i < 2; i++) {
|
||||
if(recipe.outputFluids[i] != null) {
|
||||
list.add(recipe.outputFluids[i].fill + "mB " + I18n.format(recipe.outputFluids[i].type.getUnlocalizedName()));
|
||||
}
|
||||
}
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_in_p"));
|
||||
|
||||
if(stacks != null)
|
||||
for(int i = 0; i < stacks.size(); i++)
|
||||
list.add(stacks.get(i).stackSize + "x " + stacks.get(i).getDisplayName());
|
||||
for(int i = 0; i < recipe.inputs.length; i++) {
|
||||
if(recipe.inputs[i] != null) {
|
||||
list.add(recipe.inputs[i].stacksize + "x " + recipe.inputs[i].extractForCyclingDisplay(20).getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
for(int i = 0; i < 2; i++)
|
||||
if(inF[i] != null)
|
||||
list.add(inF[i].fill + "mB " + I18n.format(inF[i].type.getUnlocalizedName()));
|
||||
for(int i = 0; i < 2; i++) {
|
||||
if(recipe.inputFluids[i] != null) {
|
||||
list.add(recipe.inputFluids[i].fill + "mB " + I18n.format(recipe.inputFluids[i].type.getUnlocalizedName()));
|
||||
}
|
||||
}
|
||||
|
||||
list.add(EnumChatFormatting.BOLD + I18nUtil.resolveKey("info.template_time"));
|
||||
list.add(Math.floor((float) (getProcessTime(stack)) / 20 * 100) / 100 + " " + I18nUtil.resolveKey("info.template_seconds"));
|
||||
list.add(Math.floor((float) (recipe.getDuration()) / 20 * 100) / 100 + " " + I18nUtil.resolveKey("info.template_seconds"));
|
||||
} catch(Exception e) {
|
||||
list.add("###INVALID###");
|
||||
list.add("0x334077-0x6A298F-0xDF3795-0x334077");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ public class ItemFELCrystal extends Item {
|
||||
}
|
||||
|
||||
public static enum EnumWavelengths{
|
||||
NULL("la creatura", "6 dollar", 0x010101, 0x010101, EnumChatFormatting.WHITE),
|
||||
NULL("la creatura", "6 dollar", 0x010101, 0x010101, EnumChatFormatting.WHITE), //why do you exist?
|
||||
|
||||
IR("wavelengths.name.ir", "wavelengths.waveRange.ir", 0xBB1010, 0xCC4040, EnumChatFormatting.RED),
|
||||
VISIBLE("wavelengths.name.visible", "wavelengths.waveRange.visible", 0, 0, EnumChatFormatting.GREEN),
|
||||
|
||||
@ -65,39 +65,6 @@ public class ItemStarterKit extends Item {
|
||||
|
||||
if(this == ModItems.nuke_starter_kit)
|
||||
{
|
||||
/*player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_difurnace_off, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_centrifuge, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_reactor, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_uf6_tank, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_assembler, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_press, 1));
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.template_folder, 1));
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_uranium, 6));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_red_copper, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_tungsten, 4));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_steel, 12));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_lead, 8));
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_titanium, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_aluminium, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_iron, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_steel, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_lead, 16));
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.wire_red_copper, 28));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.wire_tungsten, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.coil_copper, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.tank_steel, 4));
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cell_empty, 32));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cell_uf6, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_empty, 16));*/
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_uranium, 32));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.powder_yellowcake, 32));
|
||||
@ -128,46 +95,6 @@ public class ItemStarterKit extends Item {
|
||||
|
||||
if(this == ModItems.nuke_advanced_kit)
|
||||
{
|
||||
/*player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 2));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_centrifuge), 4));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_reactor), 3));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_uf6_tank), 2));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_puf6_tank), 2));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_assembler, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_chemplant, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_press, 1));
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_uranium, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_u235, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_u238, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_plutonium, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_pu238, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_pu239, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_pu240, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_neptunium, 16));
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.wire_red_copper, 32));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.coil_copper, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.coil_tungsten, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.coil_copper_torus, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.tank_steel, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.motor, 8));
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_aluminium, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_titanium, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_iron, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_steel, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.neutron_reflector, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_lead, 16));
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cell_empty, 64));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_empty, 64));
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));*/
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.powder_yellowcake, 64));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.powder_plutonium, 64));
|
||||
@ -212,68 +139,33 @@ public class ItemStarterKit extends Item {
|
||||
|
||||
if(this == ModItems.nuke_commercially_kit)
|
||||
{
|
||||
/*player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_generator), 4));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_nuke_furnace_off), 2));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_rtg_furnace_off), 2));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off), 4));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.red_cable), 64));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Item.getItemFromBlock(ModBlocks.red_wire_coated), 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_pu238, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_pu238, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_mox_fuel, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_mox_fuel, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_mox_fuel, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_mox_fuel, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_dual_mox_fuel, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_dual_mox_fuel, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_dual_mox_fuel, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_dual_mox_fuel, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_water, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_water, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_water, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_water, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_coolant, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_coolant, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_coolant, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_coolant, 1));*/
|
||||
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_pu238, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_uranium_fuel, 32));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_plutonium_fuel, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_mox_fuel, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rtg_unit, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.motor, 3));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.reactor_core, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.cell_empty, 32));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_empty, 64));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.fluid_barrel_full, 16, Fluids.WATER.getID()));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.fluid_barrel_full, 8, Fluids.COOLANT.getID()));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_assembler, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_chemplant, 3));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_gascent, 2));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_nuke_furnace_off, 2));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_rtg_furnace_off, 3));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_rtg_grey, 2));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.reactor_research, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_turbine, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_lithium_battery, 4));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.red_cable, 32));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.red_wire_coated, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg_weak, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg_weak, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pellet_rtg_weak, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.radaway_strong, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.radaway_flush, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.radx, 2));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pill_iodine, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.geiger_counter, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_reactor_breeding, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.machine_fluidtank, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.billet_pu238be, 40));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_u233, 40));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_uranium_fuel, 32));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_plutonium_fuel, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.ingot_mox_fuel, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.inf_water_mk2, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.inf_water_mk2, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.inf_water_mk2, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_empty, 64));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_dual_empty, 64));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.rod_quad_empty, 64));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.fluid_tank_lead_empty, 64));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.fluid_barrel_empty, 64));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModBlocks.barrel_steel, 16));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.plate_iron, 64));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(Items.dye, 64));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.template_folder, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.radaway_flush, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.iv_blood, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.pill_iodine, 8));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gas_mask_filter_combo, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gas_mask_filter_combo, 1));
|
||||
player.inventory.addItemStackToInventory(new ItemStack(ModItems.gas_mask_filter_combo, 1));
|
||||
|
||||
giveHaz(world, player, 2);
|
||||
}
|
||||
|
||||
@ -76,19 +76,6 @@ public class ItemAnalyzer extends Item {
|
||||
"Electricity: " + ((IEnergyConnector)te).getPower() + " HE"));
|
||||
}
|
||||
|
||||
if(te instanceof IFluidContainer) {
|
||||
|
||||
player.addChatMessage(new ChatComponentText(
|
||||
"Fluid Tanks:"));
|
||||
|
||||
List<FluidTank> tanks = ((IFluidContainer)te).getTanks();
|
||||
|
||||
for(int i = 0; i < tanks.size(); i++) {
|
||||
player.addChatMessage(new ChatComponentText(
|
||||
" *Tank " + (i + 1) + ": " + tanks.get(i).getFill() + "mB " + I18n.format(tanks.get(i).getTankType().getUnlocalizedName())));
|
||||
}
|
||||
}
|
||||
|
||||
if(te instanceof IFluidDuct) {
|
||||
|
||||
player.addChatMessage(new ChatComponentText(
|
||||
|
||||
@ -618,8 +618,8 @@ public class Library {
|
||||
}
|
||||
}
|
||||
|
||||
if(tileentity instanceof IFluidAcceptor && newTact && ((IFluidAcceptor)tileentity).getMaxFluidFill(type) > 0 &&
|
||||
((IFluidAcceptor)tileentity).getMaxFluidFill(type) - ((IFluidAcceptor)tileentity).getFluidFill(type) > 0) {
|
||||
if(tileentity instanceof IFluidAcceptor && newTact && ((IFluidAcceptor)tileentity).getMaxFillForReceive(type) > 0 &&
|
||||
((IFluidAcceptor)tileentity).getMaxFillForReceive(type) - ((IFluidAcceptor)tileentity).getMaxFillForReceive(type) > 0) {
|
||||
that.getFluidList(type).add((IFluidAcceptor)tileentity);
|
||||
}
|
||||
|
||||
@ -628,18 +628,18 @@ public class Library {
|
||||
int size = that.getFluidList(type).size();
|
||||
if(size > 0)
|
||||
{
|
||||
int part = that.getFluidFill(type) / size;
|
||||
int part = that.getFluidFillOutgoing(type) / size;
|
||||
for(IFluidAcceptor consume : that.getFluidList(type))
|
||||
{
|
||||
if(consume.getFluidFill(type) < consume.getMaxFluidFill(type))
|
||||
if(consume.getFluidFillIncoming(type) < consume.getMaxFillForReceive(type))
|
||||
{
|
||||
if(consume.getMaxFluidFill(type) - consume.getFluidFill(type) >= part)
|
||||
if(consume.getMaxFillForReceive(type) - consume.getFluidFillIncoming(type) >= part)
|
||||
{
|
||||
that.setFluidFill(that.getFluidFill(type) - part, type);
|
||||
consume.setFluidFill(consume.getFluidFill(type) + part, type);
|
||||
that.setFillForTransferOutgoing(that.getFluidFillOutgoing(type) - part, type);
|
||||
consume.setFillForTransferIncoming(consume.getFluidFillIncoming(type) + part, type);
|
||||
} else {
|
||||
that.setFluidFill(that.getFluidFill(type) - (consume.getMaxFluidFill(type) - consume.getFluidFill(type)), type);
|
||||
consume.setFluidFill(consume.getMaxFluidFill(type), type);
|
||||
that.setFillForTransferOutgoing(that.getFluidFillOutgoing(type) - (consume.getMaxFillForReceive(type) - consume.getFluidFillIncoming(type)), type);
|
||||
consume.setFillForTransferIncoming(consume.getMaxFillForReceive(type), type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,7 +168,7 @@ public class ClientProxy extends ServerProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMiningDrill.class, new RenderMiningDrill());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineMiningLaser.class, new RenderLaserMiner());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineAssembler.class, new RenderAssembler());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineChemplant.class, new RenderChemplant());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineChemplantNew.class, new RenderChemplant());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineFluidTank.class, new RenderFluidTank());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineBAT9000.class, new RenderBAT9000());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMachineOrbus.class, new RenderOrbus());
|
||||
|
||||
@ -855,9 +855,7 @@ public class CraftingManager {
|
||||
addRecipeAuto(new ItemStack(Items.name_tag), new Object[] { "SB ", "BPB", " BP", 'S', Items.string, 'B', ANY_TAR.any(), 'P', Items.paper });
|
||||
addRecipeAuto(new ItemStack(ModItems.rag, 4), new Object[] { "SW", "WS", 'S', Items.string, 'W', Blocks.wool });
|
||||
|
||||
addShapelessAuto(new ItemStack(ModItems.solid_fuel, 10), new Object[] { ModItems.canister_heatingoil, KEY_TOOL_CHEMISTRYSET });
|
||||
addShapelessAuto(new ItemStack(ModItems.solid_fuel, 10), new Object[] { new ItemStack(ModItems.fluid_tank_full, 1, Fluids.HEATINGOIL.getID()), KEY_TOOL_CHEMISTRYSET });
|
||||
addShapelessAuto(new ItemStack(ModItems.solid_fuel, 10), new Object[] { new ItemStack(ModItems.fluid_tank_lead_full, 1, Fluids.HEATINGOIL.getID()), KEY_TOOL_CHEMISTRYSET });
|
||||
addShapelessAuto(new ItemStack(ModItems.solid_fuel, 10), new Object[] { Fluids.HEATINGOIL.getDict(1000), KEY_TOOL_CHEMISTRYSET });
|
||||
|
||||
addRecipeAuto(new ItemStack(ModBlocks.machine_condenser), new Object[] { "SIS", "ICI", "SIS", 'S', STEEL.ingot(), 'I', IRON.plate(), 'C', ModItems.board_copper });
|
||||
|
||||
|
||||
@ -263,6 +263,7 @@ public class MainRegistry {
|
||||
SiegeTier.registerTiers();
|
||||
HazardRegistry.registerItems();
|
||||
HazardRegistry.registerTrafos();
|
||||
OreDictManager.registerGroups();
|
||||
|
||||
Library.superuser.add("192af5d7-ed0f-48d8-bd89-9d41af8524f8");
|
||||
Library.superuser.add("5aee1e3d-3767-4987-a222-e7ce1fbdf88e");
|
||||
@ -943,6 +944,7 @@ public class MainRegistry {
|
||||
TileEntityNukeFurnace.registerFuels();
|
||||
BreederRecipes.registerRecipes();
|
||||
AssemblerRecipes.loadRecipes();
|
||||
ChemplantRecipes.register();
|
||||
CyclotronRecipes.register();
|
||||
HadronRecipes.register();
|
||||
MagicRecipes.register();
|
||||
@ -984,6 +986,9 @@ public class MainRegistry {
|
||||
SchistStratum schist = new SchistStratum();
|
||||
MinecraftForge.EVENT_BUS.register(schist); //DecorateBiomeEvent.Pre
|
||||
|
||||
OreDictManager oreMan = new OreDictManager();
|
||||
MinecraftForge.EVENT_BUS.register(oreMan); //OreRegisterEvent
|
||||
|
||||
PacketDispatcher.registerPackets();
|
||||
|
||||
ChunkRadiationManager radiationSystem = new ChunkRadiationManager();
|
||||
|
||||
@ -4,13 +4,11 @@ import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.sound.SoundLoopAssembler;
|
||||
import com.hbm.sound.SoundLoopBroadcaster;
|
||||
import com.hbm.sound.SoundLoopCentrifuge;
|
||||
import com.hbm.sound.SoundLoopChemplant;
|
||||
import com.hbm.sound.SoundLoopMiner;
|
||||
import com.hbm.sound.SoundLoopTurbofan;
|
||||
import com.hbm.tileentity.machine.TileEntityBroadcaster;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineAssembler;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineCentrifuge;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineGasCent;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineMiningDrill;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineTurbofan;
|
||||
@ -78,18 +76,6 @@ public class LoopedSoundPacket implements IMessage {
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(new SoundLoopMiner(new ResourceLocation("hbm:block.minerOperate"), te));
|
||||
}
|
||||
|
||||
if (te != null && te instanceof TileEntityMachineChemplant) {
|
||||
|
||||
boolean flag = true;
|
||||
for(int i = 0; i < SoundLoopChemplant.list.size(); i++) {
|
||||
if(SoundLoopChemplant.list.get(i).getTE() == te && !SoundLoopChemplant.list.get(i).isDonePlaying())
|
||||
flag = false;
|
||||
}
|
||||
|
||||
if(flag && te.getWorldObj().isRemote && ((TileEntityMachineChemplant)te).isProgressing)
|
||||
Minecraft.getMinecraft().getSoundHandler().playSound(new SoundLoopChemplant(new ResourceLocation("hbm:block.chemplantOperate"), te));
|
||||
}
|
||||
|
||||
if (te != null && te instanceof TileEntityMachineAssembler) {
|
||||
|
||||
boolean flag = true;
|
||||
|
||||
@ -33,8 +33,6 @@ public class PacketDispatcher {
|
||||
wrapper.registerMessage(TEFluidPacket.Handler.class, TEFluidPacket.class, i++, Side.CLIENT);
|
||||
//Sound packet that keeps client and server separated
|
||||
wrapper.registerMessage(LoopedSoundPacket.Handler.class, LoopedSoundPacket.class, i++, Side.CLIENT);
|
||||
//Chemplant piston rotation for rendering
|
||||
wrapper.registerMessage(TEChemplantPacket.Handler.class, TEChemplantPacket.class, i++, Side.CLIENT);
|
||||
//Turret rotation for rendering
|
||||
wrapper.registerMessage(TETurretPacket.Handler.class, TETurretPacket.class, i++, Side.CLIENT);
|
||||
//Signals server to consume items and create template
|
||||
|
||||
@ -1,62 +0,0 @@
|
||||
package com.hbm.packet;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TEChemplantPacket implements IMessage {
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
boolean isProgressing;
|
||||
|
||||
public TEChemplantPacket()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public TEChemplantPacket(int x, int y, int z, boolean isProgressing)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.isProgressing = isProgressing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
x = buf.readInt();
|
||||
y = buf.readInt();
|
||||
z = buf.readInt();
|
||||
isProgressing = buf.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeInt(x);
|
||||
buf.writeInt(y);
|
||||
buf.writeInt(z);
|
||||
buf.writeBoolean(isProgressing);
|
||||
}
|
||||
|
||||
public static class Handler implements IMessageHandler<TEChemplantPacket, IMessage> {
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(TEChemplantPacket m, MessageContext ctx) {
|
||||
TileEntity te = Minecraft.getMinecraft().theWorld.getTileEntity(m.x, m.y, m.z);
|
||||
|
||||
if (te != null && te instanceof TileEntityMachineChemplant) {
|
||||
|
||||
TileEntityMachineChemplant gen = (TileEntityMachineChemplant) te;
|
||||
gen.isProgressing = m.isProgressing;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -62,8 +62,8 @@ public class TEFluidPacket implements IMessage {
|
||||
if (te != null && te instanceof IFluidContainer) {
|
||||
|
||||
IFluidContainer gen = (IFluidContainer) te;
|
||||
gen.setFillstate(m.fill, m.index);
|
||||
gen.setType(Fluids.fromID(m.type), m.index);
|
||||
gen.setFillForSync(m.fill, m.index);
|
||||
gen.setTypeForSync(Fluids.fromID(m.type), m.index);
|
||||
}
|
||||
} catch(Exception x) { }
|
||||
return null;
|
||||
|
||||
@ -2,10 +2,11 @@ package com.hbm.render.tileentity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.render.loader.HmfController;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplantNew;
|
||||
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@ -22,24 +23,22 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
switch(tileEntity.getBlockMetadata()) {
|
||||
case 2:
|
||||
switch(tileEntity.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 5:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
GL11.glTranslated(0.5D, 0.0D, -0.5D);
|
||||
break;
|
||||
case 2:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F);
|
||||
break;
|
||||
case 4:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F);
|
||||
GL11.glTranslated(0.5D, 0.0D, -0.5D);
|
||||
GL11.glRotatef(0, 0F, 1F, 0F);
|
||||
break;
|
||||
case 3:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F);
|
||||
GL11.glTranslated(0.5D, 0.0D, -0.5D);
|
||||
break;
|
||||
case 5:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
GL11.glTranslated(0.5D, 0.0D, -0.5D);
|
||||
break;
|
||||
}
|
||||
|
||||
GL11.glTranslated(-0.5D, 0.0D, 0.5D);
|
||||
|
||||
bindTexture(ResourceManager.chemplant_body_tex);
|
||||
|
||||
@ -52,29 +51,28 @@ public class RenderChemplant extends TileEntitySpecialRenderer {
|
||||
|
||||
public void renderExtras(TileEntity tileEntity, double x, double y, double z, float f) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
GL11.glTranslated(x + 0.5D, y, z + 0.5D);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
TileEntityMachineChemplant chem = (TileEntityMachineChemplant) tileEntity;
|
||||
switch(chem.getBlockMetadata()) {
|
||||
case 2:
|
||||
GL11.glTranslated(-1, 0, 0);
|
||||
TileEntityMachineChemplantNew chem = (TileEntityMachineChemplantNew) tileEntity;
|
||||
switch(tileEntity.getBlockMetadata() - BlockDummyable.offset) {
|
||||
case 5:
|
||||
GL11.glRotatef(180, 0F, 1F, 0F);
|
||||
break;
|
||||
case 4:
|
||||
case 2:
|
||||
GL11.glRotatef(270, 0F, 1F, 0F);
|
||||
break;
|
||||
case 3:
|
||||
GL11.glTranslated(0, 0, -1);
|
||||
case 4:
|
||||
GL11.glRotatef(0, 0F, 1F, 0F);
|
||||
break;
|
||||
case 5:
|
||||
GL11.glTranslated(-1, 0, -1);
|
||||
case 3:
|
||||
GL11.glRotatef(90, 0F, 1F, 0F);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
GL11.glTranslated(-0.5D, 0.0D, 0.5D);
|
||||
|
||||
bindTexture(ResourceManager.chemplant_spinner_tex);
|
||||
|
||||
int rotation = (int) (System.currentTimeMillis() % (360 * 5)) / 5;
|
||||
|
||||
@ -4,7 +4,7 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineFENSU;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineFENSU;
|
||||
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
|
||||
@ -4,9 +4,9 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.main.ResourceManager;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineFENSU;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole;
|
||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKConsole.RBMKColumn;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityMachineFENSU;
|
||||
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
|
||||
@ -1,38 +0,0 @@
|
||||
package com.hbm.sound;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.tileentity.machine.TileEntityMachineChemplant;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class SoundLoopChemplant extends SoundLoopMachine {
|
||||
|
||||
public static List<SoundLoopChemplant> list = new ArrayList<SoundLoopChemplant>();
|
||||
|
||||
public SoundLoopChemplant(ResourceLocation path, TileEntity te) {
|
||||
super(path, te);
|
||||
list.add(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
super.update();
|
||||
|
||||
if(te instanceof TileEntityMachineChemplant) {
|
||||
TileEntityMachineChemplant plant = (TileEntityMachineChemplant)te;
|
||||
|
||||
if(this.volume != 3)
|
||||
volume = 3;
|
||||
|
||||
if(!plant.isProgressing)
|
||||
this.donePlaying = true;
|
||||
}
|
||||
}
|
||||
|
||||
public TileEntity getTE() {
|
||||
return te;
|
||||
}
|
||||
|
||||
}
|
||||
@ -41,51 +41,38 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
|
||||
if(!fluid)
|
||||
return;
|
||||
|
||||
if(getTile() instanceof IFluidAcceptor) {
|
||||
((IFluidAcceptor)getTile()).setFillstate(fill, index);
|
||||
((IFluidAcceptor)getTile()).setFillForSync(fill, index);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
|
||||
if(!fluid)
|
||||
return;
|
||||
|
||||
if(getTile() instanceof IFluidAcceptor) {
|
||||
((IFluidAcceptor)getTile()).setFluidFill(fill, type);
|
||||
((IFluidAcceptor)getTile()).setFillForTransfer(fill, type);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
|
||||
if(!fluid)
|
||||
return;
|
||||
|
||||
if(getTile() instanceof IFluidAcceptor) {
|
||||
((IFluidAcceptor)getTile()).setType(type, index);
|
||||
((IFluidAcceptor)getTile()).setTypeForSync(type, index);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
|
||||
if(!fluid)
|
||||
return null;
|
||||
|
||||
if(getTile() instanceof IFluidAcceptor) {
|
||||
return ((IFluidAcceptor)getTile()).getTanks();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
|
||||
@ -100,13 +87,13 @@ public class TileEntityProxyCombo extends TileEntityProxyBase implements IEnergy
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
|
||||
if(!fluid)
|
||||
return 0;
|
||||
|
||||
if(getTile() instanceof IFluidAcceptor) {
|
||||
return ((IFluidAcceptor)getTile()).getMaxFluidFill(type);
|
||||
return ((IFluidAcceptor)getTile()).getMaxFillForReceive(type);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@ -79,7 +79,6 @@ public class TileMappings {
|
||||
put(TileEntityMachineAssembler.class, "tileentity_assembly_machine");
|
||||
put(TileEntityFluidDuctSimple.class, "tileentity_universal_duct_simple");
|
||||
put(TileEntityFluidDuct.class, "tileentity_universal_duct");
|
||||
put(TileEntityMachineChemplant.class, "tileentity_chemical_plant");
|
||||
put(TileEntityMachineFluidTank.class, "tileentity_fluid_tank");
|
||||
put(TileEntityTurretHeavy.class, "tileentity_turret_heavy");
|
||||
put(TileEntityTurretRocket.class, "tileentity_turret_rocket");
|
||||
@ -244,7 +243,8 @@ public class TileMappings {
|
||||
put(TileEntityDeuteriumTower.class, "tileentity_deuterium_tower");
|
||||
put(TileEntityMachineLiquefactor.class, "tileentity_liquefactor");
|
||||
put(TileEntityMachineSolidifier.class, "tileentity_solidifier");
|
||||
|
||||
|
||||
put(TileEntityMachineChemplantNew.class, "tileentity_chemical_plant");
|
||||
put(TileEntityMachineOilWell.class, "tileentity_derrick");
|
||||
put(TileEntityMachinePumpjack.class, "tileentity_machine_pumpjack");
|
||||
put(TileEntityMachineFrackingTower.class, "tileentity_fracking_tower");
|
||||
|
||||
@ -503,7 +503,7 @@ public class TileEntityCompactLauncher extends TileEntity implements ISidedInven
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -513,13 +513,13 @@ public class TileEntityCompactLauncher extends TileEntity implements ISidedInven
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(fill);
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -527,20 +527,11 @@ public class TileEntityCompactLauncher extends TileEntity implements ISidedInven
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
|
||||
@ -482,7 +482,7 @@ public class TileEntityLaunchTable extends TileEntity implements ISidedInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -492,13 +492,13 @@ public class TileEntityLaunchTable extends TileEntity implements ISidedInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(fill);
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -506,20 +506,11 @@ public class TileEntityLaunchTable extends TileEntity implements ISidedInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
|
||||
@ -469,7 +469,7 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IF
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -483,7 +483,7 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IF
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -509,13 +509,13 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IF
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 4 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 4 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
@ -531,15 +531,4 @@ public class TileEntityAMSBase extends TileEntity implements ISidedInventory, IF
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
list.add(tanks[2]);
|
||||
list.add(tanks[3]);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@ -365,7 +365,7 @@ public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
@ -379,7 +379,7 @@ public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory,
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
return tank.getMaxFill();
|
||||
else
|
||||
@ -387,12 +387,12 @@ public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@ -407,12 +407,4 @@ public class TileEntityAMSEmitter extends TileEntity implements ISidedInventory,
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tank);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@ -379,7 +379,7 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
@ -393,7 +393,7 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
return tank.getMaxFill();
|
||||
else
|
||||
@ -401,12 +401,12 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@ -421,13 +421,4 @@ public class TileEntityAMSLimiter extends TileEntity implements ISidedInventory,
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tank);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ public class TileEntityChungus extends TileEntity implements IFluidAcceptor, IFl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -184,7 +184,7 @@ public class TileEntityChungus extends TileEntity implements IFluidAcceptor, IFl
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
|
||||
@ -192,25 +192,16 @@ public class TileEntityChungus extends TileEntity implements IFluidAcceptor, IFl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
|
||||
@ -102,7 +102,7 @@ public class TileEntityCondenser extends TileEntity implements IFluidAcceptor, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -120,7 +120,7 @@ public class TileEntityCondenser extends TileEntity implements IFluidAcceptor, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
|
||||
@ -128,25 +128,16 @@ public class TileEntityCondenser extends TileEntity implements IFluidAcceptor, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
|
||||
@ -187,7 +187,7 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements IEne
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
@ -201,7 +201,7 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements IEne
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
return tank.getMaxFill();
|
||||
else
|
||||
@ -209,23 +209,15 @@ public class TileEntityCoreEmitter extends TileEntityMachineBase implements IEne
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tank);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
this.power = i;
|
||||
|
||||
@ -103,7 +103,7 @@ public class TileEntityCoreInjector extends TileEntityMachineBase implements IFl
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -113,7 +113,7 @@ public class TileEntityCoreInjector extends TileEntityMachineBase implements IFl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -131,25 +131,16 @@ public class TileEntityCoreInjector extends TileEntityMachineBase implements IFl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
|
||||
@ -91,7 +91,7 @@ public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEn
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
@ -105,7 +105,7 @@ public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEn
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
return tank.getMaxFill();
|
||||
else
|
||||
@ -113,23 +113,15 @@ public class TileEntityCoreReceiver extends TileEntityMachineBase implements IEn
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tank);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addEnergy(World world, int x, int y, int z, long energy, ForgeDirection dir) {
|
||||
|
||||
|
||||
@ -134,7 +134,7 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -152,7 +152,7 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
|
||||
@ -160,26 +160,17 @@ public class TileEntityDeuteriumExtractor extends TileEntityMachineBase implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list;
|
||||
|
||||
@ -5,31 +5,23 @@ import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.blocks.generic.BlockHazard;
|
||||
import com.hbm.blocks.generic.BlockHazardFalling;
|
||||
import com.hbm.blocks.machine.MachineSILEX;
|
||||
import com.hbm.extprop.HbmLivingProps;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.items.machine.ItemFELCrystal;
|
||||
import com.hbm.items.machine.ItemFELCrystal.EnumWavelengths;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
import com.hbm.util.ContaminationUtil.HazardType;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockTNT;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@ -61,6 +53,7 @@ public class TileEntityFEL extends TileEntityMachineBase implements IEnergyUser
|
||||
return "container.machineFEL";
|
||||
}
|
||||
|
||||
@SuppressWarnings("incomplete-switch")
|
||||
@Override
|
||||
@Spaghetti ("What the fuck were you thinking")
|
||||
public void updateEntity() {
|
||||
@ -83,7 +76,6 @@ public class TileEntityFEL extends TileEntityMachineBase implements IEnergyUser
|
||||
} else { this.mode = EnumWavelengths.NULL; }
|
||||
|
||||
int range = 24;
|
||||
int length = 3;
|
||||
boolean silexSpacing = false;
|
||||
if(this.isOn && power >= powerReq * Math.pow(3, mode.ordinal()) && this.mode != EnumWavelengths.NULL) {
|
||||
|
||||
@ -101,17 +93,15 @@ public class TileEntityFEL extends TileEntityMachineBase implements IEnergyUser
|
||||
switch(this.mode) {
|
||||
case VISIBLE: entity.addPotionEffect(new PotionEffect(Potion.blindness.id, 60 * 60 * 65536, 0));
|
||||
case IR:
|
||||
case UV: entity.setFire(65535); break;
|
||||
case GAMMA: HbmLivingProps.incrementRadiation(entity, 25); break;
|
||||
case DRX: HbmLivingProps.incrementDigamma(entity, 0.1F); break;
|
||||
case UV: entity.setFire(10); break;
|
||||
case GAMMA: ContaminationUtil.contaminate(entity, HazardType.RADIATION, ContaminationType.CREATIVE, 25); break;
|
||||
case DRX: ContaminationUtil.applyDigammaData(entity, 0.1F); break;
|
||||
}
|
||||
}
|
||||
|
||||
power -= powerReq * ((mode.ordinal() == 0) ? 0 : Math.pow(3, mode.ordinal()));
|
||||
for(int i = 3; i < range; i++) {
|
||||
|
||||
length = i;
|
||||
|
||||
int x = xCoord + dir.offsetX * i;
|
||||
int y = yCoord + 1;
|
||||
int z = zCoord + dir.offsetZ * i;
|
||||
@ -175,8 +165,6 @@ public class TileEntityFEL extends TileEntityMachineBase implements IEnergyUser
|
||||
data.setBoolean("valid", missingValidSilex);
|
||||
data.setInteger("distance", distance);
|
||||
this.networkPack(data, 250);
|
||||
|
||||
PacketDispatcher.wrapper.sendToAllAround(new AuxElectricityPacket(xCoord, yCoord, zCoord, power), new TargetPoint(worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 50));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -386,19 +386,19 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 3 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 3 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type.name().equals(tanks[1].getTankType().name()))
|
||||
tanks[1].setFill(i);
|
||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||
@ -416,7 +416,7 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[1].getTankType().name()))
|
||||
return tanks[1].getMaxFill();
|
||||
else if(type.name().equals(tanks[2].getTankType().name()))
|
||||
@ -424,14 +424,4 @@ public class TileEntityFWatzCore extends TileEntity implements ISidedInventory,
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
list.add(tanks[2]);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1197,19 +1197,19 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 3 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 3 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -1231,7 +1231,7 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -1241,15 +1241,4 @@ public class TileEntityFusionMultiblock extends TileEntity implements ISidedInve
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
list.add(tanks[2]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -308,7 +308,7 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
|
||||
@ -317,7 +317,7 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -327,7 +327,7 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
|
||||
@ -335,16 +335,6 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
||||
plasma.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
list.add(plasma);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
@ -388,7 +378,7 @@ public class TileEntityITER extends TileEntityMachineBase implements IEnergyUser
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
|
||||
@ -350,7 +350,7 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -368,7 +368,7 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
|
||||
@ -376,25 +376,16 @@ public class TileEntityMachineBoiler extends TileEntity implements ISidedInvento
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
|
||||
@ -352,7 +352,7 @@ public class TileEntityMachineBoilerElectric extends TileEntity implements ISide
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -370,7 +370,7 @@ public class TileEntityMachineBoilerElectric extends TileEntity implements ISide
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
|
||||
@ -378,25 +378,16 @@ public class TileEntityMachineBoilerElectric extends TileEntity implements ISide
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
|
||||
@ -335,17 +335,17 @@ public class TileEntityMachineCMBFactory extends TileEntity implements ISidedInv
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@ -355,16 +355,8 @@ public class TileEntityMachineCMBFactory extends TileEntity implements ISidedInv
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tank);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,449 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidSource;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.RecipesCommon.AStack;
|
||||
import com.hbm.inventory.UpgradeManager;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes;
|
||||
import com.hbm.inventory.recipes.ChemplantRecipes.ChemRecipe;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.InventoryUtil;
|
||||
|
||||
import api.hbm.energy.IEnergyUser;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TileEntityMachineChemplantNew extends TileEntityMachineBase implements IEnergyUser, IFluidSource, IFluidAcceptor {
|
||||
|
||||
public long power;
|
||||
public static final long maxPower = 100000;
|
||||
public int progress;
|
||||
public int maxProgress = 100;
|
||||
public boolean isProgressing;
|
||||
|
||||
public FluidTank[] tanks;
|
||||
|
||||
//upgraded stats
|
||||
int consumption = 100;
|
||||
int speed = 100;
|
||||
|
||||
public TileEntityMachineChemplantNew() {
|
||||
super(21);
|
||||
/*
|
||||
* 0 Battery
|
||||
* 1-3 Upgrades
|
||||
* 4 Schematic
|
||||
* 5-8 Output
|
||||
* 9-10 FOut In
|
||||
* 11-12 FOut Out
|
||||
* 13-16 Input
|
||||
* 17-18 FIn In
|
||||
* 19-20 FIn Out
|
||||
*/
|
||||
|
||||
tanks = new FluidTank[4];
|
||||
for(int i = 0; i < 4; i++) {
|
||||
tanks[i] = new FluidTank(Fluids.NONE, 24_000, i);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "container.chemplant";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
this.isProgressing = false;
|
||||
this.power = Library.chargeTEFromItems(slots, 0, power, maxPower);
|
||||
|
||||
if(!tanks[0].loadTank(17, 19, slots)) tanks[0].unloadTank(17, 19, slots);
|
||||
if(!tanks[1].loadTank(18, 20, slots)) tanks[1].unloadTank(18, 20, slots);
|
||||
|
||||
tanks[2].unloadTank(9, 11, slots);
|
||||
tanks[3].unloadTank(10, 12, slots);
|
||||
|
||||
loadItems();
|
||||
unloadItems();
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 10 == 0) {
|
||||
this.fillFluidInit(tanks[2].getTankType());
|
||||
this.fillFluidInit(tanks[3].getTankType());
|
||||
}
|
||||
if(worldObj.getTotalWorldTime() % 20 == 0) {
|
||||
this.updateConnections();
|
||||
}
|
||||
|
||||
UpgradeManager.eval(slots, 1, 3);
|
||||
|
||||
int speedLevel = Math.min(UpgradeManager.getLevel(UpgradeType.SPEED), 3);
|
||||
int powerLevel = Math.min(UpgradeManager.getLevel(UpgradeType.POWER), 3);
|
||||
int overLevel = UpgradeManager.getLevel(UpgradeType.OVERDRIVE);
|
||||
|
||||
this.speed -= speedLevel * 25;
|
||||
this.consumption += speedLevel * 300;
|
||||
this.speed += powerLevel * 5;
|
||||
this.consumption -= powerLevel * 30;
|
||||
this.speed /= (overLevel + 1);
|
||||
this.consumption *= (overLevel + 1);
|
||||
|
||||
if(!canProcess()) {
|
||||
this.progress = 0;
|
||||
} else {
|
||||
isProgressing = true;
|
||||
process();
|
||||
}
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
data.setLong("power", this.power);
|
||||
data.setInteger("progress", this.progress);
|
||||
data.setInteger("maxProgress", this.maxProgress);
|
||||
data.setBoolean("isProgressing", isProgressing);
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
tanks[i].writeToNBT(data, "t" + i);
|
||||
}
|
||||
|
||||
this.networkPack(data, 150);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void networkUnpack(NBTTagCompound nbt) {
|
||||
this.power = nbt.getLong("power");
|
||||
this.progress = nbt.getInteger("progress");
|
||||
this.maxProgress = nbt.getInteger("maxProgress");
|
||||
this.isProgressing = nbt.getBoolean("isProgressing");
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
tanks[i].readFromNBT(nbt, "t" + i);
|
||||
}
|
||||
}
|
||||
|
||||
private void updateConnections() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
this.trySubscribe(worldObj, xCoord + rot.offsetX * 3, yCoord, zCoord + rot.offsetZ * 3, rot);
|
||||
this.trySubscribe(worldObj, xCoord - rot.offsetX * 2, yCoord, zCoord - rot.offsetZ * 2, rot.getOpposite());
|
||||
this.trySubscribe(worldObj, xCoord + rot.offsetX * 3 + dir.offsetX, yCoord, zCoord + rot.offsetZ * 3 + dir.offsetZ, rot);
|
||||
this.trySubscribe(worldObj, xCoord - rot.offsetX * 2 + dir.offsetX, yCoord, zCoord - rot.offsetZ * 2 + dir.offsetZ, rot.getOpposite());
|
||||
}
|
||||
|
||||
private boolean canProcess() {
|
||||
|
||||
if(slots[4] == null || slots[4].getItem() != ModItems.chemistry_template)
|
||||
return false;
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[4].getItemDamage());
|
||||
|
||||
if(recipe == null)
|
||||
return false;
|
||||
|
||||
setupTanks(recipe);
|
||||
|
||||
if(this.power < this.consumption) return false;
|
||||
if(!hasRequiredFluids(recipe)) return false;
|
||||
if(!hasSpaceForFluids(recipe)) return false;
|
||||
if(!hasRequiredItems(recipe)) return false;
|
||||
if(!hasSpaceForItems(recipe)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private void setupTanks(ChemRecipe recipe) {
|
||||
if(recipe.inputFluids.length > 0) tanks[0].setTankType(recipe.inputFluids[0].type);
|
||||
if(recipe.inputFluids.length > 1) tanks[1].setTankType(recipe.inputFluids[1].type);
|
||||
if(recipe.outputFluids.length > 0) tanks[2].setTankType(recipe.outputFluids[0].type);
|
||||
if(recipe.outputFluids.length > 1) tanks[3].setTankType(recipe.outputFluids[1].type);
|
||||
}
|
||||
|
||||
private boolean hasRequiredFluids(ChemRecipe recipe) {
|
||||
if(recipe.inputFluids.length > 0 && tanks[0].getFill() < recipe.inputFluids[0].fill) return false;
|
||||
if(recipe.inputFluids.length > 1 && tanks[1].getFill() < recipe.inputFluids[1].fill) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean hasSpaceForFluids(ChemRecipe recipe) {
|
||||
if(recipe.outputFluids.length > 0 && tanks[2].getFill() + recipe.outputFluids[0].fill > tanks[2].getMaxFill()) return false;
|
||||
if(recipe.outputFluids.length > 1 && tanks[3].getFill() + recipe.outputFluids[1].fill > tanks[3].getMaxFill()) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean hasRequiredItems(ChemRecipe recipe) {
|
||||
return InventoryUtil.doesArrayHaveIngredients(slots, 13, 16, recipe.inputs);
|
||||
}
|
||||
|
||||
private boolean hasSpaceForItems(ChemRecipe recipe) {
|
||||
return InventoryUtil.doesArrayHaveSpace(slots, 5, 8, recipe.outputs);
|
||||
}
|
||||
|
||||
private void process() {
|
||||
|
||||
this.power -= this.consumption;
|
||||
this.progress++;
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[4].getItemDamage());
|
||||
|
||||
this.maxProgress = recipe.getDuration() * this.speed / 100;
|
||||
|
||||
if(this.progress >= this.maxProgress) {
|
||||
consumeFluids(recipe);
|
||||
produceFluids(recipe);
|
||||
consumeItems(recipe);
|
||||
produceItems(recipe);
|
||||
}
|
||||
}
|
||||
|
||||
private void consumeFluids(ChemRecipe recipe) {
|
||||
if(recipe.inputFluids.length > 0) tanks[0].setFill(tanks[0].getFill() - recipe.inputFluids[0].fill);
|
||||
if(recipe.inputFluids.length > 1) tanks[1].setFill(tanks[1].getFill() - recipe.inputFluids[1].fill);
|
||||
}
|
||||
|
||||
private void produceFluids(ChemRecipe recipe) {
|
||||
if(recipe.outputFluids.length > 0) tanks[2].setFill(tanks[2].getFill() + recipe.outputFluids[0].fill);
|
||||
if(recipe.outputFluids.length > 1) tanks[3].setFill(tanks[3].getFill() + recipe.outputFluids[1].fill);
|
||||
}
|
||||
|
||||
private void consumeItems(ChemRecipe recipe) {
|
||||
|
||||
for(AStack in : recipe.inputs) {
|
||||
InventoryUtil.tryConsumeAStack(slots, 13, 16, in);
|
||||
}
|
||||
}
|
||||
|
||||
private void produceItems(ChemRecipe recipe) {
|
||||
|
||||
for(ItemStack out : recipe.outputs) {
|
||||
InventoryUtil.tryAddItemToInventory(slots, 5, 8, out);
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: move this into a util class
|
||||
private void loadItems() {
|
||||
|
||||
ChemRecipe recipe = ChemplantRecipes.indexMapping.get(slots[4].getItemDamage());
|
||||
|
||||
if(recipe != null) {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
|
||||
int x = xCoord - dir.offsetX * 2;
|
||||
int z = zCoord - dir.offsetZ * 2;
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(x, yCoord, z);
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
|
||||
for(AStack ingredient : recipe.inputs) {
|
||||
|
||||
if(!InventoryUtil.doesArrayHaveIngredients(slots, 13, 16, ingredient)) {
|
||||
|
||||
for(int i = 0; i < inv.getSizeInventory(); i++) {
|
||||
|
||||
ItemStack stack = inv.getStackInSlot(i);
|
||||
if(ingredient.matchesRecipe(stack, true)) {
|
||||
|
||||
for(int j = 13; j <= 16; j++) {
|
||||
|
||||
if(slots[j] != null && slots[j].stackSize < slots[j].getMaxStackSize() & InventoryUtil.doesStackDataMatch(slots[j], stack)) {
|
||||
inv.decrStackSize(i, 1);
|
||||
slots[j].stackSize++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = 13; j <= 16; j++) {
|
||||
|
||||
if(slots[j] == null) {
|
||||
slots[j] = stack.copy();
|
||||
slots[j].stackSize = 1;
|
||||
inv.decrStackSize(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void unloadItems() {
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
|
||||
int x = xCoord - dir.offsetX * 2;
|
||||
int z = zCoord - dir.offsetZ * 2;
|
||||
|
||||
TileEntity te = worldObj.getTileEntity(x, yCoord, z);
|
||||
|
||||
if(te instanceof IInventory) {
|
||||
|
||||
IInventory inv = (IInventory) te;
|
||||
|
||||
for(int i = 5; i <= 8; i++) {
|
||||
|
||||
ItemStack out = slots[i];
|
||||
|
||||
if(out != null) {
|
||||
|
||||
for(int j = 0; j < inv.getSizeInventory(); j++) {
|
||||
ItemStack target = inv.getStackInSlot(i);
|
||||
|
||||
if(InventoryUtil.doesStackDataMatch(out, target) && target.stackSize < target.getMaxStackSize()) {
|
||||
this.decrStackSize(i, 1);
|
||||
target.stackSize++;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for(int j = 0; j < inv.getSizeInventory(); j++) {
|
||||
|
||||
if(inv.getStackInSlot(j) == null) {
|
||||
inv.setInventorySlotContents(j, out.copy());
|
||||
inv.getStackInSlot(j).stackSize = 1;
|
||||
this.decrStackSize(i, 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPower() {
|
||||
return this.power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long power) {
|
||||
this.power = power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getMaxPower() {
|
||||
return this.maxPower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index >= 0 && index < tanks.length) tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
|
||||
for(FluidTank tank : tanks) {
|
||||
if(tank.getTankType() == type) {
|
||||
tank.setFill(fill);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index >= 0 && index < tanks.length) tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
|
||||
for(FluidTank tank : tanks) {
|
||||
if(tank.getTankType() == type) {
|
||||
return tank.getFill();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
|
||||
for(FluidTank tank : tanks) {
|
||||
if(tank.getTankType() == type) {
|
||||
return tank.getMaxFill();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fillFluidInit(FluidType type) {
|
||||
|
||||
/*
|
||||
* ####
|
||||
* X####X
|
||||
* X##O#X
|
||||
* ####
|
||||
*/
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(this.getBlockMetadata() - BlockDummyable.offset);
|
||||
ForgeDirection rot = dir.getRotation(ForgeDirection.DOWN);
|
||||
|
||||
fillFluid(xCoord + rot.offsetX * 3, yCoord, zCoord + rot.offsetZ * 3, this.getTact(), type);
|
||||
fillFluid(xCoord - rot.offsetX * 2, yCoord, zCoord - rot.offsetZ * 2, this.getTact(), type);
|
||||
fillFluid(xCoord + rot.offsetX * 3 + dir.offsetX, yCoord, zCoord + rot.offsetZ * 3 + dir.offsetZ, this.getTact(), type);
|
||||
fillFluid(xCoord - rot.offsetX * 2 + dir.offsetX, yCoord, zCoord - rot.offsetZ * 2 + dir.offsetZ, this.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() {
|
||||
return worldObj.getTotalWorldTime() % 20 < 10;
|
||||
}
|
||||
|
||||
List<IFluidAcceptor>[] lists = new List[] {
|
||||
new ArrayList(), new ArrayList(), new ArrayList(), new ArrayList()
|
||||
};
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
if(tanks[i].getTankType() == type) {
|
||||
return lists[i];
|
||||
}
|
||||
}
|
||||
|
||||
return new ArrayList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearFluidList(FluidType type) {
|
||||
|
||||
for(int i = 0; i < tanks.length; i++) {
|
||||
if(tanks[i].getTankType() == type) {
|
||||
lists[i].clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -314,7 +314,7 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
@ -325,25 +325,17 @@ public class TileEntityMachineCoal extends TileEntity implements ISidedInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tank);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@ -263,32 +263,27 @@ public class TileEntityMachineCrystallizer extends TileEntityMachineBase impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
return new ArrayList() {{ add(tank); }};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return tank.getFill();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
return tank.getMaxFill();
|
||||
}
|
||||
|
||||
|
||||
@ -351,7 +351,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
|
||||
if(index == 0)
|
||||
coolant.setFill(fill);
|
||||
@ -360,7 +360,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
if(type == Fluids.COOLANT)
|
||||
coolant.setFill(fill);
|
||||
else if(type == Fluids.AMAT)
|
||||
@ -368,18 +368,13 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index == 0)
|
||||
coolant.setTankType(type);
|
||||
else if(index == 1)
|
||||
amat.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
return Arrays.asList(new FluidTank[] {coolant, amat});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type == Fluids.COOLANT)
|
||||
@ -425,7 +420,7 @@ public class TileEntityMachineCyclotron extends TileEntityMachineBase implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
|
||||
if(type == Fluids.COOLANT)
|
||||
return coolant.getMaxFill();
|
||||
|
||||
@ -139,8 +139,7 @@ public class TileEntityMachineDiesel extends TileEntityMachineBase implements IE
|
||||
public static HashMap<FuelGrade, Double> fuelEfficiency = new HashMap();
|
||||
|
||||
static {
|
||||
fuelEfficiency.put(FuelGrade.LOW, 0.5D);
|
||||
fuelEfficiency.put(FuelGrade.MEDIUM, 1.0D);
|
||||
fuelEfficiency.put(FuelGrade.MEDIUM, 0.9D);
|
||||
fuelEfficiency.put(FuelGrade.HIGH, 1.0D);
|
||||
fuelEfficiency.put(FuelGrade.AERO, 0.1D);
|
||||
}
|
||||
@ -206,36 +205,28 @@ public class TileEntityMachineDiesel extends TileEntityMachineBase implements IE
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
return type == this.tank.getTankType() ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||
return type == this.tank.getTankType() ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type == tank.getTankType())
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tank);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,5 @@
|
||||
package com.hbm.tileentity.machine;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.blocks.BlockDummyable;
|
||||
import com.hbm.interfaces.IFluidAcceptor;
|
||||
import com.hbm.interfaces.IFluidContainer;
|
||||
@ -11,14 +7,10 @@ import com.hbm.interfaces.Spaghetti;
|
||||
import com.hbm.inventory.FluidTank;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
import com.hbm.inventory.recipes.GasCentrifugeRecipes;
|
||||
import com.hbm.inventory.recipes.GasCentrifugeRecipes.PseudoFluidType;
|
||||
import com.hbm.inventory.recipes.MachineRecipes;
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.items.machine.ItemFluidIdentifier;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.LoopedSoundPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
@ -27,12 +19,8 @@ import api.hbm.energy.IEnergyUser;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
@ -315,12 +303,12 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@ -330,23 +318,26 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
|
||||
FluidType newType = ItemFluidIdentifier.getType(slots[in]);
|
||||
|
||||
if(tank.getTankType() != newType) {
|
||||
tank.setTankType(newType);
|
||||
tank.setFill(0);
|
||||
|
||||
boolean success = false;
|
||||
|
||||
if(newType == Fluids.UF6) {
|
||||
inputTank.setTankType(PseudoFluidType.NUF6);
|
||||
outputTank.setTankType(PseudoFluidType.NUF6.getOutputFluid());
|
||||
return;
|
||||
}
|
||||
if(newType == Fluids.PUF6) {
|
||||
success = true;
|
||||
} else if(newType == Fluids.PUF6) {
|
||||
inputTank.setTankType(PseudoFluidType.PF6);
|
||||
outputTank.setTankType(PseudoFluidType.PF6.getOutputFluid());
|
||||
return;
|
||||
}
|
||||
if(newType == Fluids.WATZ) {
|
||||
success = true;
|
||||
} else if(newType == Fluids.WATZ) {
|
||||
inputTank.setTankType(PseudoFluidType.MUD);
|
||||
outputTank.setTankType(PseudoFluidType.MUD.getOutputFluid());
|
||||
return;
|
||||
success = true;
|
||||
}
|
||||
|
||||
if(success) {
|
||||
tank.setTankType(newType);
|
||||
tank.setFill(0);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@ -354,7 +345,7 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@ -364,19 +355,11 @@ public class TileEntityMachineGasCent extends TileEntityMachineBase implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tank);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
AxisAlignedBB bb = null;
|
||||
|
||||
@Override
|
||||
|
||||
@ -520,7 +520,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -530,7 +530,7 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -548,23 +548,14 @@ public class TileEntityMachineGenerator extends TileEntity implements ISidedInve
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -211,12 +211,12 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
|
||||
if(type == Fluids.WATER)
|
||||
tanks[0].setFill(fill);
|
||||
@ -227,15 +227,10 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
return Arrays.asList(tanks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
|
||||
@ -247,7 +242,7 @@ public class TileEntityMachineIGenerator extends TileEntityMachineBase implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
if(tanks[i].getTankType() == type)
|
||||
|
||||
@ -283,19 +283,19 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 3 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 3 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -317,7 +317,7 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if(type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -348,14 +348,4 @@ public class TileEntityMachineInserter extends TileEntity implements ISidedInven
|
||||
if(type.name().equals(tanks[2].getTankType().name()))
|
||||
list3.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
list.add(tanks[2]);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,7 +170,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -188,7 +188,7 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
|
||||
@ -196,25 +196,16 @@ public class TileEntityMachineLargeTurbine extends TileEntityMachineBase impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
|
||||
@ -600,26 +600,21 @@ public class TileEntityMachineMiningLaser extends TileEntityMachineBase implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
if(type == Fluids.OIL)
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
return new ArrayList() {{ add(tank); }};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type == Fluids.OIL)
|
||||
|
||||
@ -203,7 +203,7 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -215,7 +215,7 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -237,7 +237,7 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
|
||||
@ -246,7 +246,7 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
|
||||
@ -254,16 +254,6 @@ public class TileEntityMachinePlasmaHeater extends TileEntityMachineBase impleme
|
||||
plasma.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
list.add(plasma);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPower(long i) {
|
||||
this.power = i;
|
||||
|
||||
@ -250,13 +250,13 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
|
||||
/* Fluid Methods */
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 3 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
for(FluidTank tank : tanks) {
|
||||
if(tank.getTankType() == type) {
|
||||
tank.setFill(fill);
|
||||
@ -265,15 +265,10 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
this.tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
return Arrays.asList(this.tanks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
for(FluidTank tank : tanks) {
|
||||
@ -285,7 +280,7 @@ public class TileEntityMachineRadiolysis extends TileEntityMachineBase implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(tanks[0].getTankType() == type) {
|
||||
return tanks[0].getMaxFill();
|
||||
}
|
||||
|
||||
@ -785,7 +785,7 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -795,7 +795,7 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -817,27 +817,17 @@ public class TileEntityMachineReactorLarge extends TileEntity
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 3 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if (index < 3 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
list.add(tanks[2]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
return list;
|
||||
|
||||
@ -326,39 +326,31 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
return type == this.tank.getTankType() ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||
return type == this.tank.getTankType() ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type == tank.getTankType())
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tank);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnect(ForgeDirection dir) {
|
||||
return dir == ForgeDirection.DOWN;
|
||||
|
||||
@ -288,7 +288,7 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(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()))
|
||||
@ -306,7 +306,7 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
|
||||
@ -314,25 +314,16 @@ public class TileEntityMachineTurbine extends TileEntity implements ISidedInvent
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<IFluidAcceptor> getFluidList(FluidType type) {
|
||||
|
||||
@ -497,28 +497,28 @@ public class TileEntityMachineTurbofan extends TileEntity implements ISidedInven
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getMaxFill() : 0;
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
return type == this.tank.getTankType() ? tank.getMaxFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
return type.name().equals(this.tank.getTankType().name()) ? tank.getFill() : 0;
|
||||
return type == this.tank.getTankType() ? tank.getFill() : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
if(type.name().equals(tank.getTankType().name()))
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type == tank.getTankType())
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@ -533,12 +533,4 @@ public class TileEntityMachineTurbofan extends TileEntity implements ISidedInven
|
||||
{
|
||||
return 65536.0D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tank);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@ -407,14 +407,14 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type == Fluids.SUPERHOTSTEAM) return steam.getMaxFill();
|
||||
if(type == Fluids.CARBONDIOXIDE) return carbonDioxide.getMaxFill();
|
||||
if(type == Fluids.WATER) return water.getMaxFill();
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type == Fluids.SUPERHOTSTEAM) steam.setFill(i);
|
||||
if(type == Fluids.CARBONDIOXIDE) carbonDioxide.setFill(i);
|
||||
if(type == Fluids.WATER) water.setFill(i);
|
||||
@ -427,7 +427,7 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
switch (index) {
|
||||
case 0: steam.setFill(fill);
|
||||
break;
|
||||
@ -439,7 +439,7 @@ public class TileEntityReactorZirnox extends TileEntityMachineBase implements IF
|
||||
}
|
||||
}
|
||||
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
switch (index) {
|
||||
case 0: steam.setTankType(type);
|
||||
break;
|
||||
|
||||
@ -185,7 +185,7 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce
|
||||
if(recipe == null)
|
||||
return false;
|
||||
|
||||
if(recipe.laserStrength > this.mode.ordinal())
|
||||
if(recipe.laserStrength.ordinal() > this.mode.ordinal())
|
||||
return false;
|
||||
|
||||
if(currentFill < recipe.fluidConsumed)
|
||||
@ -194,7 +194,7 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce
|
||||
if(slots[4] != null)
|
||||
return false;
|
||||
|
||||
int progressSpeed = (int) Math.pow(2, this.mode.ordinal() - recipe.laserStrength + 1) / 2;
|
||||
int progressSpeed = (int) Math.pow(2, this.mode.ordinal() - recipe.laserStrength.ordinal() + 1) / 2;
|
||||
|
||||
progress += progressSpeed;
|
||||
|
||||
@ -291,31 +291,22 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
|
||||
if(type == tank.getTankType())
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
return new ArrayList() {
|
||||
{
|
||||
add(tank);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
|
||||
@ -326,7 +317,7 @@ public class TileEntitySILEX extends TileEntityMachineBase implements IFluidAcce
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
|
||||
if(type == tank.getTankType())
|
||||
return tank.getMaxFill();
|
||||
|
||||
@ -67,7 +67,7 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index == 0)
|
||||
water.setFill(fill);
|
||||
if(index == 1)
|
||||
@ -75,7 +75,7 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
if(type == Fluids.WATER)
|
||||
water.setFill(fill);
|
||||
if(type == Fluids.STEAM)
|
||||
@ -83,18 +83,13 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index == 0)
|
||||
water.setTankType(type);
|
||||
if(index == 1)
|
||||
steam.setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
return Arrays.asList(new FluidTank[] {water, steam});
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if(type == Fluids.WATER)
|
||||
@ -122,7 +117,7 @@ public class TileEntitySolarBoiler extends TileEntity implements IFluidAcceptor,
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if(type == Fluids.WATER)
|
||||
return water.getMaxFill();
|
||||
if(type == Fluids.STEAM)
|
||||
|
||||
@ -357,7 +357,7 @@ public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements IS
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFluidFill(FluidType type) {
|
||||
public int getMaxFillForReceive(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
return tanks[0].getMaxFill();
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -367,13 +367,13 @@ public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements IS
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int fill, FluidType type) {
|
||||
public void setFillForTransfer(int fill, FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
tanks[0].setFill(fill);
|
||||
else if (type.name().equals(tanks[1].getTankType().name()))
|
||||
@ -381,20 +381,11 @@ public class TileEntitySoyuzLauncher extends TileEntityMachineBase implements IS
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if (index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFluidFill(FluidType type) {
|
||||
if (type.name().equals(tanks[0].getTankType().name()))
|
||||
|
||||
@ -259,7 +259,7 @@ public class TileEntityStorageDrum extends TileEntityMachineBase implements IFlu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
if(type == tanks[0].getTankType())
|
||||
tanks[0].setFill(i);
|
||||
else if(type == tanks[1].getTankType())
|
||||
@ -285,25 +285,16 @@ public class TileEntityStorageDrum extends TileEntityMachineBase implements IFlu
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
if(index < 2 && tanks[index] != null)
|
||||
tanks[index].setTankType(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tanks[0]);
|
||||
list.add(tanks[1]);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
|
||||
@ -701,12 +701,12 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFillstate(int fill, int index) {
|
||||
public void setFillForSync(int fill, int index) {
|
||||
tank.setFill(fill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setType(FluidType type, int index) {
|
||||
public void setTypeForSync(FluidType type, int index) {
|
||||
tank.setTankType(type);
|
||||
}
|
||||
|
||||
@ -730,7 +730,7 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setFluidFill(int i, FluidType type) {
|
||||
public void setFillForTransfer(int i, FluidType type) {
|
||||
tank.setFill(i);
|
||||
}
|
||||
|
||||
@ -743,12 +743,4 @@ public class TileEntityWatzCore extends TileEntity implements ISidedInventory, I
|
||||
public void clearFluidList(FluidType type) {
|
||||
list1.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<FluidTank> getTanks() {
|
||||
List<FluidTank> list = new ArrayList();
|
||||
list.add(tank);
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user