Make CIC use sulfur instead of gunpowder as a backup resource, dynamic GUI title rendering to prevent escaping

This commit is contained in:
Aidan Brady 2014-01-02 13:11:08 -05:00
parent 00bbb9d5c4
commit 5da3b31455
3 changed files with 5 additions and 5 deletions

View file

@ -31,7 +31,7 @@ public class GuiAdvancedElectricMachine extends GuiMekanism
int xAxis = (mouseX - (width - xSize) / 2); int xAxis = (mouseX - (width - xSize) / 2);
int yAxis = (mouseY - (height - ySize) / 2); int yAxis = (mouseY - (height - ySize) / 2);
fontRenderer.drawString(tileEntity.getInvName(), 45, 6, 0x404040); fontRenderer.drawString(tileEntity.getInvName(), (xSize/2)-(fontRenderer.getStringWidth(tileEntity.getInvName())/2), 6, 0x404040);
fontRenderer.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040); fontRenderer.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040);
if(xAxis >= 165 && xAxis <= 169 && yAxis >= 17 && yAxis <= 69) if(xAxis >= 165 && xAxis <= 169 && yAxis >= 17 && yAxis <= 69)

View file

@ -5,10 +5,10 @@ import java.util.Set;
import mekanism.api.gas.GasRegistry; import mekanism.api.gas.GasRegistry;
import mekanism.client.gui.GuiChemicalInjectionChamber; import mekanism.client.gui.GuiChemicalInjectionChamber;
import mekanism.common.Mekanism;
import mekanism.common.RecipeHandler.Recipe; import mekanism.common.RecipeHandler.Recipe;
import mekanism.common.util.ListUtils; import mekanism.common.util.ListUtils;
import mekanism.common.util.MekanismUtils; import mekanism.common.util.MekanismUtils;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class ChemicalInjectionChamberRecipeHandler extends AdvancedMachineRecipeHandler public class ChemicalInjectionChamberRecipeHandler extends AdvancedMachineRecipeHandler
@ -46,7 +46,7 @@ public class ChemicalInjectionChamberRecipeHandler extends AdvancedMachineRecipe
@Override @Override
public List<ItemStack> getFuelStacks() public List<ItemStack> getFuelStacks()
{ {
return ListUtils.asList(new ItemStack(Item.gunpowder), MekanismUtils.getFullGasTank(GasRegistry.getGas("sulfuricAcid"))); return ListUtils.asList(new ItemStack(Mekanism.Dust, 1, 10), MekanismUtils.getFullGasTank(GasRegistry.getGas("sulfuricAcid")));
} }
@Override @Override

View file

@ -12,7 +12,7 @@ import mekanism.api.gas.ITubeConnection;
import mekanism.common.Mekanism; import mekanism.common.Mekanism;
import mekanism.common.RecipeHandler.Recipe; import mekanism.common.RecipeHandler.Recipe;
import mekanism.common.block.BlockMachine.MachineType; import mekanism.common.block.BlockMachine.MachineType;
import net.minecraft.item.Item; import mekanism.common.util.MekanismUtils;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
@ -33,7 +33,7 @@ public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectr
@Override @Override
public int getFuelTicks(ItemStack itemstack) public int getFuelTicks(ItemStack itemstack)
{ {
if(itemstack.isItemEqual(new ItemStack(Item.gunpowder))) return 5; if(MekanismUtils.getOreDictName(itemstack).contains("dustSulfur")) return 5;
if(itemstack.itemID == Mekanism.GasTank.blockID && ((IGasItem)itemstack.getItem()).getGas(itemstack) != null && if(itemstack.itemID == Mekanism.GasTank.blockID && ((IGasItem)itemstack.getItem()).getGas(itemstack) != null &&
((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == GasRegistry.getGas("sulfuricAcid")) return 1; ((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == GasRegistry.getGas("sulfuricAcid")) return 1;