mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 21:09:45 +00:00
Fixed some tooltips, Hohlraum now properly accepts D-T fuel, added Hohlraum recipe, added lithium to EIM recipes
This commit is contained in:
1 parent
c1fc1c7cfb
commit
35518ad01f
9 files changed
+69
-60
No files matched your search
@@ -36,7 +36,7 @@ public class SolarEvaporationRecipeHandler extends BaseRecipeHandler
|
||||
@Override
|
||||
public String getRecipeName()
|
||||
{
|
||||
return MekanismUtils.localize("tile.BasicBlock.SolarEvaporationController.name");
|
||||
return MekanismUtils.localize("gui.solarEvaporationController.short");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -490,7 +490,7 @@ public class Mekanism
|
||||
|
||||
//Induction Cell recipes
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getInductionCell(InductionCellTier.BASIC), new Object[] {
|
||||
"TTT", "TET", "TTT", Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC)
|
||||
"LTL", "TET", "LTL", Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC), Character.valueOf('L'), "dustLithium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getInductionCell(InductionCellTier.ADVANCED), new Object[] {
|
||||
"TCT", "CEC", "TCT", Character.valueOf('T'), MekanismItems.EnergyTablet.getUnchargedItem(), Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.ADVANCED), Character.valueOf('C'), MekanismUtils.getInductionCell(InductionCellTier.BASIC)
|
||||
@@ -504,7 +504,7 @@ public class Mekanism
|
||||
|
||||
//Induction Provider recipes
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getInductionProvider(InductionProviderTier.BASIC), new Object[] {
|
||||
"CCC", "CEC", "CCC", Character.valueOf('C'), "circuitBasic", Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC)
|
||||
"LCL", "CEC", "LCL", Character.valueOf('C'), "circuitBasic", Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.BASIC), Character.valueOf('L'), "dustLithium"
|
||||
}));
|
||||
CraftingManager.getInstance().getRecipeList().add(new MekanismRecipe(MekanismUtils.getInductionProvider(InductionProviderTier.ADVANCED), new Object[] {
|
||||
"CPC", "PEP", "CPC", Character.valueOf('C'), "circuitAdvanced", Character.valueOf('E'), MekanismUtils.getEnergyCube(EnergyCubeTier.ADVANCED), Character.valueOf('P'), MekanismUtils.getInductionProvider(InductionProviderTier.BASIC)
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package mekanism.common.integration;
|
||||
|
||||
import ic2.api.recipe.RecipeInputOreDict;
|
||||
import ic2.api.recipe.Recipes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
@@ -13,7 +16,6 @@ import mekanism.common.MekanismItems;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.recipe.RecipeHandler.Recipe;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
@@ -25,9 +27,6 @@ import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import cpw.mods.fml.common.Optional.Method;
|
||||
|
||||
import ic2.api.recipe.RecipeInputOreDict;
|
||||
import ic2.api.recipe.Recipes;
|
||||
|
||||
public final class OreDictManager
|
||||
{
|
||||
public static void init()
|
||||
|
||||
@@ -6,9 +6,10 @@ import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -28,6 +29,20 @@ public class ItemFlamethrower extends ItemMekanism implements IGasItem
|
||||
setNoRepair();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag)
|
||||
{
|
||||
GasStack gasStack = getGas(itemstack);
|
||||
|
||||
if(gasStack == null)
|
||||
{
|
||||
list.add(MekanismUtils.localize("tooltip.noGas") + ".");
|
||||
}
|
||||
else {
|
||||
list.add(MekanismUtils.localize("tooltip.stored") + " " + gasStack.getGas().getLocalizedName() + ": " + gasStack.amount);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister register) {}
|
||||
@@ -71,17 +86,7 @@ public class ItemFlamethrower extends ItemMekanism implements IGasItem
|
||||
@Override
|
||||
public GasStack removeGas(ItemStack itemstack, int amount)
|
||||
{
|
||||
if(getGas(itemstack) == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Gas type = getGas(itemstack).getGas();
|
||||
|
||||
int gasToUse = Math.min(getStored(itemstack), Math.min(getRate(itemstack), amount));
|
||||
setGas(itemstack, new GasStack(type, getStored(itemstack)-gasToUse));
|
||||
|
||||
return new GasStack(type, gasToUse);
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getStored(ItemStack itemstack)
|
||||
|
||||
@@ -136,17 +136,7 @@ public class ItemJetpack extends ItemArmor implements IGasItem, ISpecialArmor
|
||||
@Override
|
||||
public GasStack removeGas(ItemStack itemstack, int amount)
|
||||
{
|
||||
if(getGas(itemstack) == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Gas type = getGas(itemstack).getGas();
|
||||
|
||||
int gasToUse = Math.min(getStored(itemstack), Math.min(getRate(itemstack), amount));
|
||||
setGas(itemstack, new GasStack(type, getStored(itemstack)-gasToUse));
|
||||
|
||||
return new GasStack(type, gasToUse);
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getStored(ItemStack itemstack)
|
||||
|
||||
@@ -11,7 +11,6 @@ import mekanism.client.render.ModelCustomArmor;
|
||||
import mekanism.client.render.ModelCustomArmor.ArmorModel;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
@@ -115,17 +114,7 @@ public class ItemScubaTank extends ItemArmor implements IGasItem
|
||||
@Override
|
||||
public GasStack removeGas(ItemStack itemstack, int amount)
|
||||
{
|
||||
if(getGas(itemstack) == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Gas type = getGas(itemstack).getGas();
|
||||
|
||||
int gasToUse = Math.min(getStored(itemstack), Math.min(getRate(itemstack), amount));
|
||||
setGas(itemstack, new GasStack(type, getStored(itemstack)-gasToUse));
|
||||
|
||||
return new GasStack(type, gasToUse);
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getStored(ItemStack itemstack)
|
||||
|
||||
@@ -15,11 +15,14 @@ import mekanism.common.MekanismItems;
|
||||
import mekanism.common.Version;
|
||||
import mekanism.common.base.IModule;
|
||||
import mekanism.common.recipe.MekanismRecipe;
|
||||
import mekanism.common.recipe.RecipeHandler;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import buildcraft.api.fuels.BuildcraftFuelRegistry;
|
||||
import buildcraft.api.fuels.IFuel;
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent;
|
||||
@@ -88,7 +91,6 @@ public class MekanismGenerators implements IModule
|
||||
{
|
||||
for(IFuel s : BuildcraftFuelRegistry.fuel.getFuels())
|
||||
{
|
||||
|
||||
if(!(s.getFluid() == null || GasRegistry.containsGas(s.getFluid().getName())))
|
||||
{
|
||||
GasRegistry.register(new Gas(s.getFluid()));
|
||||
@@ -97,6 +99,11 @@ public class MekanismGenerators implements IModule
|
||||
|
||||
BuildcraftFuelRegistry.fuel.addFuel(FluidRegistry.getFluid("ethene"), (int)(240 * general.TO_TE), 40 * FluidContainerRegistry.BUCKET_VOLUME);
|
||||
}
|
||||
|
||||
for(ItemStack ore : OreDictionary.getOres("dustGold"))
|
||||
{
|
||||
RecipeHandler.addEnrichmentChamberRecipe(MekanismUtils.size(ore, 4), GeneratorsItems.Hohlraum.getEmptyItem());
|
||||
}
|
||||
}
|
||||
|
||||
public void addRecipes()
|
||||
|
||||
@@ -2,12 +2,15 @@ package mekanism.generators.common.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.gas.Gas;
|
||||
import mekanism.api.gas.GasRegistry;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.gas.IGasItem;
|
||||
import mekanism.common.item.ItemMekanism;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -25,6 +28,29 @@ public class ItemHohlraum extends ItemMekanism implements IGasItem
|
||||
setNoRepair();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer entityplayer, List list, boolean flag)
|
||||
{
|
||||
GasStack gasStack = getGas(itemstack);
|
||||
|
||||
if(gasStack == null)
|
||||
{
|
||||
list.add(MekanismUtils.localize("tooltip.noGas") + ".");
|
||||
list.add(EnumColor.DARK_RED + MekanismUtils.localize("tooltip.insufficientFuel"));
|
||||
}
|
||||
else {
|
||||
list.add(MekanismUtils.localize("tooltip.stored") + " " + gasStack.getGas().getLocalizedName() + ": " + gasStack.amount);
|
||||
|
||||
if(gasStack.amount == getMaxGas(itemstack))
|
||||
{
|
||||
list.add(EnumColor.DARK_GREEN + MekanismUtils.localize("tooltip.readyForReaction") + "!");
|
||||
}
|
||||
else {
|
||||
list.add(EnumColor.DARK_RED + MekanismUtils.localize("tooltip.insufficientFuel"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxGas(ItemStack itemstack)
|
||||
{
|
||||
@@ -59,17 +85,7 @@ public class ItemHohlraum extends ItemMekanism implements IGasItem
|
||||
@Override
|
||||
public GasStack removeGas(ItemStack itemstack, int amount)
|
||||
{
|
||||
if(getGas(itemstack) == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Gas type = getGas(itemstack).getGas();
|
||||
|
||||
int gasToUse = Math.min(getStored(itemstack), Math.min(getRate(itemstack), amount));
|
||||
setGas(itemstack, new GasStack(type, getStored(itemstack)-gasToUse));
|
||||
|
||||
return new GasStack(type, gasToUse);
|
||||
return null;
|
||||
}
|
||||
|
||||
public int getStored(ItemStack itemstack)
|
||||
@@ -80,7 +96,7 @@ public class ItemHohlraum extends ItemMekanism implements IGasItem
|
||||
@Override
|
||||
public boolean canReceiveGas(ItemStack itemstack, Gas type)
|
||||
{
|
||||
return type == GasRegistry.getGas("hydrogen");
|
||||
return type == GasRegistry.getGas("fusionFuelDT");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -140,10 +156,10 @@ public class ItemHohlraum extends ItemMekanism implements IGasItem
|
||||
|
||||
public ItemStack getEmptyItem()
|
||||
{
|
||||
ItemStack empty = new ItemStack(this);
|
||||
setGas(empty, null);
|
||||
empty.setItemDamage(100);
|
||||
return empty;
|
||||
ItemStack stack = new ItemStack(this);
|
||||
setGas(stack, null);
|
||||
stack.setItemDamage(100);
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -155,7 +171,7 @@ public class ItemHohlraum extends ItemMekanism implements IGasItem
|
||||
list.add(empty);
|
||||
|
||||
ItemStack filled = new ItemStack(this);
|
||||
setGas(filled, new GasStack(GasRegistry.getGas("hydrogen"), ((IGasItem)filled.getItem()).getMaxGas(filled)));
|
||||
setGas(filled, new GasStack(GasRegistry.getGas("fusionFuelDT"), ((IGasItem)filled.getItem()).getMaxGas(filled)));
|
||||
list.add(filled);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user