@Override
public void updateEntity()
{
- boolean var1 = this.worldObj.canBlockSeeTheSky(xCoord, yCoord + 1, zCoord);
- if (this.worldObj.getBlockId(xCoord, yCoord-1, zCoord) == Block.fire.blockID) {
- if (this.heat < 1700) {
- if (this.worldObj.isRaining() && var1 && !this.worldObj.isThundering()) {
- this.heat += 0.1F;
- } else if (this.worldObj.isThundering() && var1) {
- this.heat += 0.25F;
- } else {
- this.heat += 0.5F;
- }
- } else {
- this.heat = 1700;
- }
- } else {
- if (this.heat > 0) {
- if(this.worldObj.isRaining() && var1 && !this.worldObj.isThundering()) {
- this.heat -= 0.25F;
- } else if(this.worldObj.isThundering() && var1) {
- this.heat -= 0.5F;
- } else {
- this.heat -= 0.05F;
- }
- } else {
- this.heat = 0;
- }
- }
-
if (this.fuelRestTime >= 0) {
this.burnTime += 10 * CENTER_HEAT / this.heat;
this.fuelRestTime -= 10 * CENTER_HEAT / this.heat;
ItemStack materialItem = this.invm.getStackInSlot(0);
if (materialItem != null) {
if (this.isInItemCheck(itemstackMaterial)) {
- //var2 = true;
if (itemstackMaterial.itemID == materialItem.itemID && itemstackMaterial.getItemDamage() == materialItem.getItemDamage()) {
this.inItem(itemstackMaterial);
if (materialItem.stackSize > 1) {
this.burnTime = 0;
}
- boolean var3 = false;
+ boolean var1 = false;
if (this.heat > MIN_HEAT) {
Iterator<ItemStack> itMaterial = recipeList.keySet().iterator();
while (itMaterial.hasNext()) {
ItemStack materialItem = this.invm.getStackInSlot(0);
if (materialItem != null) {
if (this.isInItemCheck(itemstackMaterial)) {
- //var2 = true;
if (itemstackMaterial.itemID == materialItem.itemID && itemstackMaterial.getItemDamage() == materialItem.getItemDamage()) {
- var3 = true;
+ var1 = true;
if (this.fuelRestTime <= 0) {
- Iterator<ItemStack> itFuel = ChemiCraftAPI.instance().getChemicalCellsFuelList().keySet().iterator();
+ Iterator<ItemStack> itFuel = ChemiCraftAPI.instance().getChemicalCellsList().keySet().iterator();
while (itFuel.hasNext()) {
ItemStack itemstackFuel = itFuel.next();
ItemStack fuelItem = this.invf.getStackInSlot(0);
if (fuelItem != null) {
if (itemstackFuel.itemID == fuelItem.itemID && itemstackFuel.getItemDamage() == fuelItem.getItemDamage()) {
- this.fuelRestTime = ChemiCraftAPI.instance().getChemicalCellsFuelList().get(itemstackFuel);
+ this.fuelRestTime = ChemiCraftAPI.instance().getChemicalCellsList().get(itemstackFuel);
if (fuelItem.stackSize > 1) {
this.invf.setInventorySlotContents(0, new ItemStack(fuelItem.itemID, --fuelItem.stackSize, fuelItem.getItemDamage()));
break;
}
} else {
this.burnTime = 0;
- //var2 = false;
}
}
- if (!var3) {
+ if (!var1) {
this.burnTime = 0;
}
}
}
}
+ public static void addRecipe(ItemStack material, ItemStack[] result) {
+ recipeList.put(material, result);
+ }
+
}