Fix a few bugs
This commit is contained in:
parent
3cea13a272
commit
fdc94550ee
3 changed files with 8 additions and 4 deletions
|
@ -79,6 +79,7 @@ import mekanism.common.tileentity.TileEntityBin;
|
||||||
import mekanism.common.tileentity.TileEntityChargepad;
|
import mekanism.common.tileentity.TileEntityChargepad;
|
||||||
import mekanism.common.tileentity.TileEntityChemicalFormulator;
|
import mekanism.common.tileentity.TileEntityChemicalFormulator;
|
||||||
import mekanism.common.tileentity.TileEntityChemicalInfuser;
|
import mekanism.common.tileentity.TileEntityChemicalInfuser;
|
||||||
|
import mekanism.common.tileentity.TileEntityChemicalInjectionChamber;
|
||||||
import mekanism.common.tileentity.TileEntityCombiner;
|
import mekanism.common.tileentity.TileEntityCombiner;
|
||||||
import mekanism.common.tileentity.TileEntityCrusher;
|
import mekanism.common.tileentity.TileEntityCrusher;
|
||||||
import mekanism.common.tileentity.TileEntityDigitalMiner;
|
import mekanism.common.tileentity.TileEntityDigitalMiner;
|
||||||
|
@ -268,6 +269,7 @@ public class ClientProxy extends CommonProxy
|
||||||
ClientRegistry.registerTileEntity(TileEntityDigitalMiner.class, "DigitalMiner", new RenderDigitalMiner());
|
ClientRegistry.registerTileEntity(TileEntityDigitalMiner.class, "DigitalMiner", new RenderDigitalMiner());
|
||||||
ClientRegistry.registerTileEntity(TileEntityRotaryCondensentrator.class, "RotaryCondensentrator", new RenderRotaryCondensentrator());
|
ClientRegistry.registerTileEntity(TileEntityRotaryCondensentrator.class, "RotaryCondensentrator", new RenderRotaryCondensentrator());
|
||||||
ClientRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter", new RenderTeleporter());
|
ClientRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter", new RenderTeleporter());
|
||||||
|
ClientRegistry.registerTileEntity(TileEntityChemicalInjectionChamber.class, "ChemicalInjectionChamber", new RenderConfigurableMachine());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectr
|
||||||
public int getFuelTicks(ItemStack itemstack)
|
public int getFuelTicks(ItemStack itemstack)
|
||||||
{
|
{
|
||||||
if(itemstack.isItemEqual(new ItemStack(Item.gunpowder))) return 20;
|
if(itemstack.isItemEqual(new ItemStack(Item.gunpowder))) return 20;
|
||||||
if(itemstack.isItemEqual(new ItemStack(Mekanism.GasTank)) && ((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;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -62,10 +62,11 @@ public class TileEntityChemicalInjectionChamber extends TileEntityAdvancedElectr
|
||||||
@Override
|
@Override
|
||||||
public void handleSecondaryFuel()
|
public void handleSecondaryFuel()
|
||||||
{
|
{
|
||||||
if(inventory[1] != null && secondaryEnergyStored < MAX_SECONDARY_ENERGY)
|
if(inventory[1] != null && secondaryEnergyStored < MAX_SECONDARY_ENERGY && inventory[1].getItem() instanceof IGasItem)
|
||||||
{
|
{
|
||||||
GasStack removed = GasTransmission.removeGas(inventory[1], GasRegistry.getGas("sulfuricAcid"), MAX_SECONDARY_ENERGY-secondaryEnergyStored);
|
GasStack removed = GasTransmission.removeGas(inventory[1], GasRegistry.getGas("sulfuricAcid"), MAX_SECONDARY_ENERGY-secondaryEnergyStored);
|
||||||
setSecondaryEnergy(secondaryEnergyStored + (removed != null ? removed.amount : 0));
|
setSecondaryEnergy(secondaryEnergyStored + (removed != null ? removed.amount : 0));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
super.handleSecondaryFuel();
|
super.handleSecondaryFuel();
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class TileEntityPurificationChamber extends TileEntityAdvancedElectricMac
|
||||||
public int getFuelTicks(ItemStack itemstack)
|
public int getFuelTicks(ItemStack itemstack)
|
||||||
{
|
{
|
||||||
if(itemstack.isItemEqual(new ItemStack(Item.flint))) return 300;
|
if(itemstack.isItemEqual(new ItemStack(Item.flint))) return 300;
|
||||||
if(itemstack.isItemEqual(new ItemStack(Mekanism.GasTank)) && ((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("oxygen")) return 1;
|
((IGasItem)itemstack.getItem()).getGas(itemstack).getGas() == GasRegistry.getGas("oxygen")) return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -62,10 +62,11 @@ public class TileEntityPurificationChamber extends TileEntityAdvancedElectricMac
|
||||||
@Override
|
@Override
|
||||||
public void handleSecondaryFuel()
|
public void handleSecondaryFuel()
|
||||||
{
|
{
|
||||||
if(inventory[1] != null && secondaryEnergyStored < MAX_SECONDARY_ENERGY)
|
if(inventory[1] != null && secondaryEnergyStored < MAX_SECONDARY_ENERGY && inventory[1].getItem() instanceof IGasItem)
|
||||||
{
|
{
|
||||||
GasStack removed = GasTransmission.removeGas(inventory[1], GasRegistry.getGas("oxygen"), MAX_SECONDARY_ENERGY-secondaryEnergyStored);
|
GasStack removed = GasTransmission.removeGas(inventory[1], GasRegistry.getGas("oxygen"), MAX_SECONDARY_ENERGY-secondaryEnergyStored);
|
||||||
setSecondaryEnergy(secondaryEnergyStored + (removed != null ? removed.amount : 0));
|
setSecondaryEnergy(secondaryEnergyStored + (removed != null ? removed.amount : 0));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
super.handleSecondaryFuel();
|
super.handleSecondaryFuel();
|
||||||
|
|
Loading…
Reference in a new issue