Chemical Injection Chamber initial work
This commit is contained in:
parent
9cc243a244
commit
a41760affd
23 changed files with 368 additions and 26 deletions
|
@ -125,6 +125,22 @@ public final class RecipeHelper
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Chemical Injection Chamber recipe.
|
||||
* @param input - input ItemStack
|
||||
* @param output - output ItemStack
|
||||
*/
|
||||
public static void addChemicalInjectionChamberRecipe(ItemStack input, ItemStack output)
|
||||
{
|
||||
try {
|
||||
Class recipeClass = Class.forName("mekanism.common.RecipeHandler");
|
||||
Method m = recipeClass.getMethod("addChemicalInjectionChamberRecipe", ItemStack.class, ItemStack.class);
|
||||
m.invoke(null, input, output);
|
||||
} catch(Exception e) {
|
||||
System.err.println("[Mekanism] Error while adding recipe: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Metallurgic Infuser recipe.
|
||||
* @param input - input Infusion
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.HashMap;
|
|||
|
||||
import mekanism.client.gui.GuiChemicalFormulator;
|
||||
import mekanism.client.gui.GuiChemicalInfuser;
|
||||
import mekanism.client.gui.GuiChemicalInjectionChamber;
|
||||
import mekanism.client.gui.GuiCombiner;
|
||||
import mekanism.client.gui.GuiConfiguration;
|
||||
import mekanism.client.gui.GuiCredits;
|
||||
|
@ -79,6 +80,7 @@ import mekanism.common.tileentity.TileEntityBin;
|
|||
import mekanism.common.tileentity.TileEntityChargepad;
|
||||
import mekanism.common.tileentity.TileEntityChemicalFormulator;
|
||||
import mekanism.common.tileentity.TileEntityChemicalInfuser;
|
||||
import mekanism.common.tileentity.TileEntityChemicalInjectionChamber;
|
||||
import mekanism.common.tileentity.TileEntityCombiner;
|
||||
import mekanism.common.tileentity.TileEntityCrusher;
|
||||
import mekanism.common.tileentity.TileEntityDigitalMiner;
|
||||
|
@ -267,6 +269,7 @@ public class ClientProxy extends CommonProxy
|
|||
ClientRegistry.registerTileEntity(TileEntityDigitalMiner.class, "DigitalMiner", new RenderDigitalMiner());
|
||||
ClientRegistry.registerTileEntity(TileEntityRotaryCondensentrator.class, "RotaryCondensentrator", new RenderRotaryCondensentrator());
|
||||
ClientRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter", new RenderTeleporter());
|
||||
ClientRegistry.registerTileEntity(TileEntityChemicalInjectionChamber.class, "ChemicalInjectionChamber", new RenderConfigurableMachine());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -387,6 +390,8 @@ public class ClientProxy extends CommonProxy
|
|||
return new GuiChemicalFormulator(player.inventory, (TileEntityChemicalFormulator)tileEntity);
|
||||
case 30:
|
||||
return new GuiChemicalInfuser(player.inventory, (TileEntityChemicalInfuser)tileEntity);
|
||||
case 31:
|
||||
return new GuiChemicalInjectionChamber(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
15
common/mekanism/client/gui/GuiChemicalInjectionChamber.java
Normal file
15
common/mekanism/client/gui/GuiChemicalInjectionChamber.java
Normal file
|
@ -0,0 +1,15 @@
|
|||
package mekanism.client.gui;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mekanism.common.tileentity.TileEntityAdvancedElectricMachine;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiChemicalInjectionChamber extends GuiAdvancedElectricMachine
|
||||
{
|
||||
public GuiChemicalInjectionChamber(InventoryPlayer inventory, TileEntityAdvancedElectricMachine tentity)
|
||||
{
|
||||
super(inventory, tentity);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package mekanism.client.nei;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import mekanism.client.gui.GuiChemicalInjectionChamber;
|
||||
import mekanism.common.RecipeHandler.Recipe;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ChemicalInjectionChamberRecipeHandler extends AdvancedMachineRecipeHandler
|
||||
{
|
||||
@Override
|
||||
public String getRecipeName()
|
||||
{
|
||||
return "Chemical Injection Chamber";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRecipeId()
|
||||
{
|
||||
return "mekanism.chemicalinjectionchamber";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOverlayIdentifier()
|
||||
{
|
||||
return "chemicalinjectionchamber";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set getRecipes()
|
||||
{
|
||||
return Recipe.PURIFICATION_CHAMBER.get().entrySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGuiTexture()
|
||||
{
|
||||
return "mekanism:gui/GuiChemicalInjectionChamber.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getFuelStack()
|
||||
{
|
||||
return new ItemStack(Item.gunpowder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getGuiClass()
|
||||
{
|
||||
return GuiChemicalInjectionChamber.class;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package mekanism.client.nei;
|
||||
|
||||
import mekanism.client.gui.GuiChemicalInjectionChamber;
|
||||
import mekanism.client.gui.GuiCombiner;
|
||||
import mekanism.client.gui.GuiCrusher;
|
||||
import mekanism.client.gui.GuiEnrichmentChamber;
|
||||
|
@ -33,6 +34,9 @@ public class NEIMekanismConfig implements IConfigureNEI
|
|||
API.registerRecipeHandler(new PurificationChamberRecipeHandler());
|
||||
API.registerUsageHandler(new PurificationChamberRecipeHandler());
|
||||
|
||||
API.registerRecipeHandler(new ChemicalInjectionChamberRecipeHandler());
|
||||
API.registerUsageHandler(new ChemicalInjectionChamberRecipeHandler());
|
||||
|
||||
API.registerRecipeHandler(new MekanismRecipeHandler());
|
||||
API.registerUsageHandler(new MekanismRecipeHandler());
|
||||
|
||||
|
@ -41,6 +45,7 @@ public class NEIMekanismConfig implements IConfigureNEI
|
|||
API.setGuiOffset(GuiCrusher.class, 16, 6);
|
||||
API.setGuiOffset(GuiCombiner.class, 16, 6);
|
||||
API.setGuiOffset(GuiPurificationChamber.class, 16, 6);
|
||||
API.setGuiOffset(GuiChemicalInjectionChamber.class, 16, 6);
|
||||
API.setGuiOffset(GuiMetallurgicInfuser.class, 5, 15);
|
||||
|
||||
API.hideItem(Mekanism.boundingBlockID);
|
||||
|
|
|
@ -29,6 +29,7 @@ import mekanism.common.tileentity.TileEntityBin;
|
|||
import mekanism.common.tileentity.TileEntityChargepad;
|
||||
import mekanism.common.tileentity.TileEntityChemicalFormulator;
|
||||
import mekanism.common.tileentity.TileEntityChemicalInfuser;
|
||||
import mekanism.common.tileentity.TileEntityChemicalInjectionChamber;
|
||||
import mekanism.common.tileentity.TileEntityCombiner;
|
||||
import mekanism.common.tileentity.TileEntityContainerBlock;
|
||||
import mekanism.common.tileentity.TileEntityCrusher;
|
||||
|
@ -108,6 +109,7 @@ public class CommonProxy
|
|||
GameRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter");
|
||||
GameRegistry.registerTileEntity(TileEntityChemicalFormulator.class, "ChemicalFormulator");
|
||||
GameRegistry.registerTileEntity(TileEntityChemicalInfuser.class, "ChemicalInfuser");
|
||||
GameRegistry.registerTileEntity(TileEntityChemicalInjectionChamber.class, "ChemicalInjectionChamber");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -199,12 +201,13 @@ public class CommonProxy
|
|||
Mekanism.crusherUsage = Mekanism.configuration.get("usage", "CrusherUsage", 50D).getDouble(50D);
|
||||
Mekanism.factoryUsage = Mekanism.configuration.get("usage", "FactoryUsage", 50D).getDouble(50D);
|
||||
Mekanism.metallurgicInfuserUsage = Mekanism.configuration.get("usage", "MetallurgicInfuserUsage", 50D).getDouble(50D);
|
||||
Mekanism.purificationChamberUsage = Mekanism.configuration.get("usage", "PurificationChamberUsage", 50D).getDouble(50D);
|
||||
Mekanism.purificationChamberUsage = Mekanism.configuration.get("usage", "PurificationChamberUsage", 100D).getDouble(100D);
|
||||
Mekanism.energizedSmelterUsage = Mekanism.configuration.get("usage", "EnergizedSmelterUsage", 50D).getDouble(50D);
|
||||
Mekanism.digitalMinerUsage = Mekanism.configuration.get("usage", "DigitalMinerUsage", 100D).getDouble(100D);
|
||||
Mekanism.rotaryCondensentratorUsage = Mekanism.configuration.get("usage", "RotaryCondensentratorUsage", 50D).getDouble(50D);
|
||||
Mekanism.chemicalFormulatorUsage = Mekanism.configuration.get("usage", "ChemicalFormulatorUsage", 100D).getDouble(100D);
|
||||
Mekanism.chemicalInfuserUsage = Mekanism.configuration.get("usage", "ChemicalInfuserUsage", 100D).getDouble(100D);
|
||||
Mekanism.chemicalInjectionChamberUsage = Mekanism.configuration.get("usage", "ChemicalInjectionChamberUsage", 200D).getDouble(200D);
|
||||
Mekanism.configuration.save();
|
||||
}
|
||||
|
||||
|
@ -340,6 +343,8 @@ public class CommonProxy
|
|||
return new ContainerChemicalFormulator(player.inventory, (TileEntityChemicalFormulator)tileEntity);
|
||||
case 30:
|
||||
return new ContainerChemicalInfuser(player.inventory, (TileEntityChemicalInfuser)tileEntity);
|
||||
case 31:
|
||||
return new ContainerAdvancedElectricMachine(player.inventory, (TileEntityAdvancedElectricMachine)tileEntity);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -35,7 +35,8 @@ public interface IFactory
|
|||
CRUSHING("crushing", "Crusher.ogg", MachineType.CRUSHER.getStack(), false),
|
||||
COMPRESSING("compressing", "Compressor.ogg", MachineType.OSMIUM_COMPRESSOR.getStack(), true),
|
||||
COMBINING("combining", "Combiner.ogg", MachineType.COMBINER.getStack(), true),
|
||||
PURIFYING("purifying", "PurificationChamber.ogg", MachineType.PURIFICATION_CHAMBER.getStack(), true);
|
||||
PURIFYING("purifying", "PurificationChamber.ogg", MachineType.PURIFICATION_CHAMBER.getStack(), true),
|
||||
INJECTING("injecting", "ChemicalInjectionChamber.ogg", MachineType.CHEMICAL_INJECTION_CHAMBER.getStack(), true);
|
||||
|
||||
private String name;
|
||||
private String sound;
|
||||
|
@ -83,6 +84,10 @@ public interface IFactory
|
|||
{
|
||||
return RecipeHandler.getOutput(input, stackDecrease, Recipe.PURIFICATION_CHAMBER.get());
|
||||
}
|
||||
else if(this == INJECTING)
|
||||
{
|
||||
return RecipeHandler.getOutput(input, stackDecrease, Recipe.CHEMICAL_INJECTION_CHAMBER.get());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ import mekanism.common.item.ItemPortableTeleporter;
|
|||
import mekanism.common.item.ItemProxy;
|
||||
import mekanism.common.item.ItemRobit;
|
||||
import mekanism.common.item.ItemScubaTank;
|
||||
import mekanism.common.item.ItemShard;
|
||||
import mekanism.common.item.ItemWalkieTalkie;
|
||||
import mekanism.common.multipart.ItemPartTransmitter;
|
||||
import mekanism.common.multipart.MultipartMekanism;
|
||||
|
@ -229,6 +230,7 @@ public class Mekanism
|
|||
public static ItemGasMask GasMask;
|
||||
public static Item Dictionary;
|
||||
public static Item Balloon;
|
||||
public static Item Shard;
|
||||
|
||||
//Blocks
|
||||
public static Block BasicBlock;
|
||||
|
@ -291,6 +293,7 @@ public class Mekanism
|
|||
public static double rotaryCondensentratorUsage;
|
||||
public static double chemicalFormulatorUsage;
|
||||
public static double chemicalInfuserUsage;
|
||||
public static double chemicalInjectionChamberUsage;
|
||||
|
||||
/**
|
||||
* Adds all in-game crafting and smelting recipes.
|
||||
|
@ -602,6 +605,9 @@ public class Mekanism
|
|||
RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.obsidian), new ItemStack(Clump, 2, 6));
|
||||
RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.cobblestone), new ItemStack(Block.gravel));
|
||||
|
||||
//Chemical Injection Chamber Recipes
|
||||
RecipeHandler.addPurificationChamberRecipe(new ItemStack(Block.obsidian), new ItemStack(Shard, 3, 6));
|
||||
|
||||
//Metallurgic Infuser Recipes
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("CARBON"), 10, new ItemStack(Item.ingotIron)), new ItemStack(EnrichedIron));
|
||||
RecipeHandler.addMetallurgicInfuserRecipe(InfusionInput.getInfusion(InfuseRegistry.get("CARBON"), 10, new ItemStack(EnrichedIron)), new ItemStack(Dust, 1, 5));
|
||||
|
@ -637,8 +643,8 @@ public class Mekanism
|
|||
Dictionary = new ItemDictionary(configuration.getItem("Dictionary", 11201).getInt()).setUnlocalizedName("Dictionary");
|
||||
GasMask = (ItemGasMask)new ItemGasMask(configuration.getItem("GasMask", 11202).getInt()).setUnlocalizedName("GasMask");
|
||||
ScubaTank = (ItemScubaTank)new ItemScubaTank(configuration.getItem("ScubaTank", 11203).getInt()).setUnlocalizedName("ScubaTank");
|
||||
Dust = new ItemDust(configuration.getItem("Dust", 11204).getInt()-256);
|
||||
Ingot = new ItemIngot(configuration.getItem("Ingot", 11205).getInt()-256);
|
||||
Dust = new ItemDust(configuration.getItem("Dust", 11204).getInt());
|
||||
Ingot = new ItemIngot(configuration.getItem("Ingot", 11205).getInt());
|
||||
EnergyTablet = (ItemEnergized)new ItemEnergized(configuration.getItem("EnergyTablet", 11206).getInt(), 1000000, 120).setUnlocalizedName("EnergyTablet");
|
||||
SpeedUpgrade = new ItemMachineUpgrade(configuration.getItem("SpeedUpgrade", 11207).getInt()).setUnlocalizedName("SpeedUpgrade");
|
||||
EnergyUpgrade = new ItemMachineUpgrade(configuration.getItem("EnergyUpgrade", 11208).getInt()).setUnlocalizedName("EnergyUpgrade");
|
||||
|
@ -652,16 +658,16 @@ public class Mekanism
|
|||
CompressedCarbon = new ItemMekanism(configuration.getItem("CompressedCarbon", 11216).getInt()).setUnlocalizedName("CompressedCarbon");
|
||||
PortableTeleporter = new ItemPortableTeleporter(configuration.getItem("PortableTeleporter", 11217).getInt()).setUnlocalizedName("PortableTeleporter");
|
||||
TeleportationCore = new ItemMekanism(configuration.getItem("TeleportationCore", 11218).getInt()).setUnlocalizedName("TeleportationCore");
|
||||
Clump = new ItemClump(configuration.getItem("Clump", 11219).getInt()-256);
|
||||
DirtyDust = new ItemDirtyDust(configuration.getItem("DirtyDust", 11220).getInt()-256);
|
||||
Clump = new ItemClump(configuration.getItem("Clump", 11219).getInt());
|
||||
DirtyDust = new ItemDirtyDust(configuration.getItem("DirtyDust", 11220).getInt());
|
||||
Configurator = new ItemConfigurator(configuration.getItem("Configurator", 11221).getInt()).setUnlocalizedName("Configurator");
|
||||
NetworkReader = new ItemNetworkReader(configuration.getItem("NetworkReader", 11222).getInt()).setUnlocalizedName("NetworkReader");
|
||||
Jetpack = (ItemJetpack)new ItemJetpack(configuration.getItem("Jetpack", 11223).getInt()).setUnlocalizedName("Jetpack");
|
||||
WalkieTalkie = new ItemWalkieTalkie(configuration.getItem("WalkieTalkie", 11224).getInt()).setUnlocalizedName("WalkieTalkie");
|
||||
PartTransmitter = new ItemPartTransmitter(configuration.getItem("MultipartTransmitter", 11225).getInt()).setUnlocalizedName("MultipartTransmitter");
|
||||
Balloon = new ItemBalloon(configuration.getItem("Balloon", 11226).getInt()).setUnlocalizedName("Balloon");
|
||||
Shard = new ItemShard(configuration.getItem("Shard", 11227).getInt());
|
||||
configuration.save();
|
||||
//TODO 1.7, fix item shifts
|
||||
|
||||
//Registrations
|
||||
GameRegistry.registerItem(ElectricBow, "ElectricBow");
|
||||
|
@ -690,6 +696,7 @@ public class Mekanism
|
|||
GameRegistry.registerItem(GasMask, "GasMask");
|
||||
GameRegistry.registerItem(ScubaTank, "ScubaTank");
|
||||
GameRegistry.registerItem(Balloon, "Balloon");
|
||||
GameRegistry.registerItem(Shard, "Shard");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -780,6 +787,15 @@ public class Mekanism
|
|||
OreDictionary.registerOre("clumpObsidian", new ItemStack(Clump, 1, 6));
|
||||
OreDictionary.registerOre("clumpLead", new ItemStack(Clump, 1, 7));
|
||||
|
||||
OreDictionary.registerOre("shardIron", new ItemStack(Shard, 1, 0));
|
||||
OreDictionary.registerOre("shardGold", new ItemStack(Shard, 1, 1));
|
||||
OreDictionary.registerOre("shardOsmium", new ItemStack(Shard, 1, 2));
|
||||
OreDictionary.registerOre("shardCopper", new ItemStack(Shard, 1, 3));
|
||||
OreDictionary.registerOre("shardTin", new ItemStack(Shard, 1, 4));
|
||||
OreDictionary.registerOre("shardSilver", new ItemStack(Shard, 1, 5));
|
||||
OreDictionary.registerOre("shardObsidian", new ItemStack(Shard, 1, 6));
|
||||
OreDictionary.registerOre("shardLead", new ItemStack(Shard, 1, 7));
|
||||
|
||||
OreDictionary.registerOre("oreOsmium", new ItemStack(OreBlock, 1, 0));
|
||||
OreDictionary.registerOre("oreCopper", new ItemStack(OreBlock, 1, 1));
|
||||
OreDictionary.registerOre("oreTin", new ItemStack(OreBlock, 1, 2));
|
||||
|
|
|
@ -103,6 +103,16 @@ public final class RecipeHandler
|
|||
Recipe.CHEMICAL_FORMULATOR.put(input, output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Chemical Injection Chamber recipe.
|
||||
* @param input - input ItemStack
|
||||
* @param output - output ItemStack
|
||||
*/
|
||||
public static void addChemicalInjectionChamberRecipe(ItemStack input, ItemStack output)
|
||||
{
|
||||
Recipe.CHEMICAL_INJECTION_CHAMBER.put(input, output);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the InfusionOutput of the InfusionInput in the parameters.
|
||||
* @param infusion - input Infusion
|
||||
|
@ -239,7 +249,8 @@ public final class RecipeHandler
|
|||
PURIFICATION_CHAMBER(new HashMap<ItemStack, ItemStack>()),
|
||||
METALLURGIC_INFUSER(new HashMap<InfusionInput, InfusionOutput>()),
|
||||
CHEMICAL_INFUSER(new HashMap<ChemicalInput, GasStack>()),
|
||||
CHEMICAL_FORMULATOR(new HashMap<ItemStack, GasStack>());
|
||||
CHEMICAL_FORMULATOR(new HashMap<ItemStack, GasStack>()),
|
||||
CHEMICAL_INJECTION_CHAMBER(new HashMap<ItemStack, ItemStack>());
|
||||
|
||||
private HashMap recipes;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import mekanism.common.tileentity.TileEntityBasicBlock;
|
|||
import mekanism.common.tileentity.TileEntityChargepad;
|
||||
import mekanism.common.tileentity.TileEntityChemicalFormulator;
|
||||
import mekanism.common.tileentity.TileEntityChemicalInfuser;
|
||||
import mekanism.common.tileentity.TileEntityChemicalInjectionChamber;
|
||||
import mekanism.common.tileentity.TileEntityCombiner;
|
||||
import mekanism.common.tileentity.TileEntityContainerBlock;
|
||||
import mekanism.common.tileentity.TileEntityCrusher;
|
||||
|
@ -96,6 +97,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
* 0:14: Chargepad
|
||||
* 0:15: Logistical Sorter
|
||||
* 1:0: Rotary Condensentrator
|
||||
* 1:1: Chemical Formulator
|
||||
* 1:2: Chemical Infuser
|
||||
* 1:3: Chemical Injection Chamber
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
|
@ -147,6 +151,12 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
icons[10][2] = register.registerIcon("mekanism:SteelCasing");
|
||||
icons[11][0] = register.registerIcon("mekanism:Teleporter");
|
||||
}
|
||||
else if(blockID == Mekanism.machineBlock2ID)
|
||||
{
|
||||
icons[3][0] = register.registerIcon("mekanism:ChemicalInjectionChamberFrontOff");
|
||||
icons[3][1] = register.registerIcon("mekanism:ChemicalInjectionChamberFrontOn");
|
||||
icons[3][2] = register.registerIcon("mekanism:SteelCasing");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -398,6 +408,19 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
return icons[11][0];
|
||||
}
|
||||
}
|
||||
else if(blockID == Mekanism.machineBlock2ID)
|
||||
{
|
||||
if(meta == 3)
|
||||
{
|
||||
if(side == 3)
|
||||
{
|
||||
return icons[3][0];
|
||||
}
|
||||
else {
|
||||
return icons[3][2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -518,6 +541,19 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
return icons[11][0];
|
||||
}
|
||||
}
|
||||
else if(blockID == Mekanism.machineBlock2ID)
|
||||
{
|
||||
if(metadata == 3)
|
||||
{
|
||||
if(side == tileEntity.facing)
|
||||
{
|
||||
return MekanismUtils.isActive(world, x, y, z) ? icons[3][1] : icons[3][0];
|
||||
}
|
||||
else {
|
||||
return icons[3][2];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -534,7 +570,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
{
|
||||
for(MachineType type : MachineType.values())
|
||||
{
|
||||
if(type == MachineType.CHEMICAL_FORMULATOR || type == MachineType.CHEMICAL_INFUSER /*TODO*/)
|
||||
if(type == MachineType.CHEMICAL_FORMULATOR || type == MachineType.CHEMICAL_INFUSER || type == MachineType.CHEMICAL_INJECTION_CHAMBER /*TODO*/)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -1040,7 +1076,8 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds
|
|||
LOGISTICAL_SORTER(Mekanism.machineBlockID, 15, "LogisticalSorter", -1, 0, TileEntityLogisticalSorter.class, true),
|
||||
ROTARY_CONDENSENTRATOR(Mekanism.machineBlock2ID, 0, "RotaryCondensentrator", 7, 20000, TileEntityRotaryCondensentrator.class, true),
|
||||
CHEMICAL_FORMULATOR(Mekanism.machineBlock2ID, 1, "ChemicalFormulator", 29, 20000, TileEntityChemicalFormulator.class, true),
|
||||
CHEMICAL_INFUSER(Mekanism.machineBlock2ID, 2, "ChemicalInfuser", 30, 20000, TileEntityChemicalInfuser.class, true);
|
||||
CHEMICAL_INFUSER(Mekanism.machineBlock2ID, 2, "ChemicalInfuser", 30, 20000, TileEntityChemicalInfuser.class, true),
|
||||
CHEMICAL_INJECTION_CHAMBER(Mekanism.machineBlock2ID, 3, "ChemicalInjectionChamber", 31, Mekanism.chemicalInjectionChamberUsage*400, TileEntityChemicalInjectionChamber.class, false);
|
||||
|
||||
public int typeId;
|
||||
public int meta;
|
||||
|
|
|
@ -61,22 +61,26 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
/**
|
||||
* Item class for handling multiple machine block IDs.
|
||||
* 0: Enrichment Chamber
|
||||
* 1: Osmium Compressor
|
||||
* 2: Combiner
|
||||
* 3: Crusher
|
||||
* 4: Digital Miner
|
||||
* 5: Basic Factory
|
||||
* 6: Advanced Factory
|
||||
* 7: Elite Factory
|
||||
* 8: Metallurgic Infuser
|
||||
* 9: Purification Chamber
|
||||
* 10: Energized Smelter
|
||||
* 11: Teleporter
|
||||
* 12: Electric Pump
|
||||
* 13: Electric Chest
|
||||
* 14: Chargepad
|
||||
* 15: Logistical Sorter
|
||||
* 0:0: Enrichment Chamber
|
||||
* 0:1: Osmium Compressor
|
||||
* 0:2: Combiner
|
||||
* 0:3: Crusher
|
||||
* 0:4: Digital Miner
|
||||
* 0:5: Basic Factory
|
||||
* 0:6: Advanced Factory
|
||||
* 0:7: Elite Factory
|
||||
* 0:8: Metallurgic Infuser
|
||||
* 0:9: Purification Chamber
|
||||
* 0:10: Energized Smelter
|
||||
* 0:11: Teleporter
|
||||
* 0:12: Electric Pump
|
||||
* 0:13: Electric Chest
|
||||
* 0:14: Chargepad
|
||||
* 0:15: Logistical Sorter
|
||||
* 1:0: Rotary Condensentrator
|
||||
* 1:1: Chemical Formulator
|
||||
* 1:2: Chemical Infuser
|
||||
* 1:3: Chemical Injection Chamber
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.util.Icon;
|
|||
public class ItemClump extends ItemMekanism
|
||||
{
|
||||
public Icon[] icons = new Icon[256];
|
||||
|
||||
public static String[] en_USNames = {"Iron", "Gold", "Osmium",
|
||||
"Copper", "Tin", "Silver",
|
||||
"Obsidian", "Lead"};
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.util.Icon;
|
|||
public class ItemDirtyDust extends ItemMekanism
|
||||
{
|
||||
public Icon[] icons = new Icon[256];
|
||||
|
||||
public static String[] en_USNames = {"Iron", "Gold", "Osmium",
|
||||
"Copper", "Tin", "Silver",
|
||||
"Obsidian", "Lead"};
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.util.Icon;
|
|||
public class ItemDust extends ItemMekanism
|
||||
{
|
||||
public Icon[] icons = new Icon[256];
|
||||
|
||||
public static String[] en_USNames = {"Iron", "Gold", "Osmium",
|
||||
"Obsidian", "Diamond", "Steel",
|
||||
"Copper", "Tin", "Silver",
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.util.Icon;
|
|||
public class ItemIngot extends ItemMekanism
|
||||
{
|
||||
public Icon[] icons = new Icon[256];
|
||||
|
||||
public static String[] en_USNames = {"Obsidian", "Osmium", "Bronze", "Glowstone", "Steel", "Copper", "Tin"};
|
||||
|
||||
public ItemIngot(int id)
|
||||
|
|
55
common/mekanism/common/item/ItemShard.java
Normal file
55
common/mekanism/common/item/ItemShard.java
Normal file
|
@ -0,0 +1,55 @@
|
|||
package mekanism.common.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.common.Mekanism;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
public class ItemShard extends ItemMekanism
|
||||
{
|
||||
public Icon[] icons = new Icon[256];
|
||||
|
||||
public static String[] en_USNames = {"Iron", "Gold", "Osmium",
|
||||
"Copper", "Tin", "Silver",
|
||||
"Obsidian", "Lead"};
|
||||
|
||||
public ItemShard(int id)
|
||||
{
|
||||
super(id);
|
||||
setHasSubtypes(true);
|
||||
setCreativeTab(Mekanism.tabMekanism);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister register)
|
||||
{
|
||||
for(int i = 0; i <= 7; i++)
|
||||
{
|
||||
icons[i] = register.registerIcon("mekanism:" + en_USNames[i] + "Shard");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getIconFromDamage(int meta)
|
||||
{
|
||||
return icons[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(int id, CreativeTabs tabs, List itemList)
|
||||
{
|
||||
for(int counter = 0; counter <= 7; ++counter)
|
||||
{
|
||||
itemList.add(new ItemStack(this, 1, counter));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack item)
|
||||
{
|
||||
return "item." + en_USNames[item.getItemDamage()].toLowerCase() + "Shard";
|
||||
}
|
||||
}
|
|
@ -66,6 +66,7 @@ public class PacketConfigSync implements IMekanismPacket
|
|||
Mekanism.rotaryCondensentratorUsage = dataStream.readDouble();
|
||||
Mekanism.chemicalFormulatorUsage = dataStream.readDouble();
|
||||
Mekanism.chemicalInfuserUsage = dataStream.readDouble();
|
||||
Mekanism.chemicalInjectionChamberUsage = dataStream.readDouble();
|
||||
|
||||
Mekanism.proxy.onConfigSync();
|
||||
}
|
||||
|
@ -110,5 +111,6 @@ public class PacketConfigSync implements IMekanismPacket
|
|||
dataStream.writeDouble(Mekanism.rotaryCondensentratorUsage);
|
||||
dataStream.writeDouble(Mekanism.chemicalFormulatorUsage);
|
||||
dataStream.writeDouble(Mekanism.chemicalInfuserUsage);
|
||||
dataStream.writeDouble(Mekanism.chemicalInjectionChamberUsage);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
package mekanism.common.tileentity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.GasTransmission;
|
||||
import mekanism.api.gas.IGasHandler;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.api.gas.ITubeConnection;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.RecipeHandler.Recipe;
|
||||
import mekanism.common.block.BlockMachine.MachineType;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectricMachine implements IGasHandler, ITubeConnection
|
||||
{
|
||||
public TileEntityChemicalInjectionChamber()
|
||||
{
|
||||
super("ChemicalInjectionChamber.ogg", "ChemicalInjectionChamber", new ResourceLocation("mekanism", "gui/GuiChemicalInjectionChamber.png"), Mekanism.chemicalInjectionChamberUsage, 1, 200, MachineType.CHEMICAL_INJECTION_CHAMBER.baseEnergy, 1200);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map getRecipes()
|
||||
{
|
||||
return Recipe.CHEMICAL_INJECTION_CHAMBER.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFuelTicks(ItemStack itemstack)
|
||||
{
|
||||
if(itemstack.isItemEqual(new ItemStack(Item.gunpowder))) return 20;
|
||||
if(itemstack.isItemEqual(new ItemStack(Mekanism.GasTank)) && ((IGasItem)itemstack.getItem()).getGas(itemstack) != null &&
|
||||
((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == GasRegistry.getGas("sulfuricAcid")) return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveGas(ForgeDirection side, GasStack stack)
|
||||
{
|
||||
if(stack.getGas() == GasRegistry.getGas("sulfuricAcid"))
|
||||
{
|
||||
int toUse = Math.min(MAX_SECONDARY_ENERGY-secondaryEnergyStored, stack.amount);
|
||||
secondaryEnergyStored += toUse;
|
||||
return toUse;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveGas(ForgeDirection side, Gas type)
|
||||
{
|
||||
return type == GasRegistry.getGas("sulfuricAcid");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleSecondaryFuel()
|
||||
{
|
||||
if(inventory[1] != null && secondaryEnergyStored < MAX_SECONDARY_ENERGY)
|
||||
{
|
||||
GasStack removed = GasTransmission.removeGas(inventory[1], GasRegistry.getGas("sulfuricAcid"), MAX_SECONDARY_ENERGY-secondaryEnergyStored);
|
||||
setSecondaryEnergy(secondaryEnergyStored + (removed != null ? removed.amount : 0));
|
||||
}
|
||||
|
||||
super.handleSecondaryFuel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTubeConnect(ForgeDirection side)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GasStack drawGas(ForgeDirection side, int amount)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDrawGas(ForgeDirection side, Gas type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
BIN
resources/assets/mekanism/gui/GuiChemicalInjectionChamber.png
Normal file
BIN
resources/assets/mekanism/gui/GuiChemicalInjectionChamber.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
|
@ -68,6 +68,7 @@ tile.MachineBlock.DigitalMiner.name=Digital Miner
|
|||
tile.MachineBlock2.RotaryCondensentrator.name=Rotary Condensentrator
|
||||
tile.MachineBlock2.ChemicalFormulator.name=Chemical Formulator
|
||||
tile.MachineBlock2.ChemicalInfuser.name=Chemical Infuser
|
||||
tile.MachineBlock2.ChemicalInjectionChamber.name=Chemical Injection Chamber
|
||||
|
||||
//Ore Block
|
||||
tile.OreBlock.OsmiumOre.name=Osmium Ore
|
||||
|
@ -117,6 +118,16 @@ item.silverClump.name=Silver Clump
|
|||
item.obsidianClump.name=Obsidian Clump
|
||||
item.leadClump.name=Lead Clump
|
||||
|
||||
//Shards
|
||||
item.ironShard.name=Iron Shard
|
||||
item.goldShard.name=Gold Shard
|
||||
item.osmiumShard.name=Osmium Shard
|
||||
item.copperShard.name=Copper Shard
|
||||
item.tinShard.name=Tin Shard
|
||||
item.silverShard.name=Silver Shard
|
||||
item.obsidianShard.name=Obsidian Shard
|
||||
item.leadShard.name=Lead Shard
|
||||
|
||||
//Dirty Dust
|
||||
item.dirtyIronDust.name=Dirty Iron Dust
|
||||
item.dirtyGoldDust.name=Dirty Gold Dust
|
||||
|
@ -198,6 +209,7 @@ gui.factory.crushing=Crushing
|
|||
gui.factory.compressing=Compressing
|
||||
gui.factory.combining=Combining
|
||||
gui.factory.purifying=Purifying
|
||||
gui.factory.injecting=Injecting
|
||||
gui.factory.autoSort=Auto-sort
|
||||
|
||||
gui.oredictFilter=OreDict Filter
|
||||
|
@ -291,6 +303,7 @@ tooltip.ElectricChest=A portable, 54-slot chest that uses energy to lock !nitsel
|
|||
tooltip.Chargepad=A universal chargepad that can charge any energized item !nfrom any mod.
|
||||
tooltip.LogisticalSorter=A filter-based, advanced sorting machine that !ncan auto-eject specified items out of and into !nadjacent inventories and Logistical Transporters.
|
||||
tooltip.RotaryCondensentrator=A machine capable of converting gasses into !ntheir fluid form and vice versa.
|
||||
tooltip.ChemicalInjectionChamber=An elite machine capable of processing !nores into four shards, serving as the initial !nstage of 400% ore processing.
|
||||
|
||||
tooltip.OsmiumOre=A strong mineral that can be found !nat nearly any height in the world. !nIt is known to have many uses in !nthe construction of machinery.
|
||||
tooltip.CopperOre=A common, conductive material that !ncan be used in the production of !nwires. It's ability to withstand !nhigh heats also makes it essential !nto advanced machinery.
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"animation": {
|
||||
"frametime": 1
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue