mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-23 15:48:34 +01:00
Added configuration for Powered Furnace
This commit is contained in:
parent
6dec2b274e
commit
f47f3a5225
3 changed files with 18 additions and 13 deletions
|
@ -226,7 +226,7 @@ public final class InitBooklet{
|
|||
new BookletChapter("miner", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockMiner), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityMiner.ENERGY_USE_PER_BLOCK).addTextReplacement("<range>", TileEntityMiner.DEFAULT_RANGE), new PageCrafting(2, BlockCrafting.recipeMiner)).setSpecial();
|
||||
new BookletChapterCoffee("coffeeMachine", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockCoffeeMachine), new PageTextOnly(1).addItemsToPage(new ItemStack(InitItems.itemCoffeeBean)).addTextReplacement("<rf>", TileEntityCoffeeMachine.ENERGY_USED).addTextReplacement("<coffee>", TileEntityCoffeeMachine.CACHE_USE).addTextReplacement("<water>", TileEntityCoffeeMachine.WATER_USE), new PageTextOnly(2).addItemsToPage(new ItemStack(InitItems.itemCoffee)), new PagePicture(3, "page_coffee_machine", 115), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine).setWildcard().setNoText(), new PageCrafting(5, ItemCrafting.recipeCup).setNoText()).setImportant();
|
||||
new BookletChapterCrusher("crusher", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityGrinder.ENERGY_USE), new PageCrafting(2, BlockCrafting.recipeCrusher).setWildcard().setNoText(), new PageCrafting(3, BlockCrafting.recipeDoubleCrusher).setWildcard().setNoText(), new PageCrusherRecipe(4, CrusherCrafting.recipeIronHorseArmor).setNoText(), new PageCrusherRecipe(5, CrusherCrafting.recipeGoldHorseArmor).setNoText(), new PageCrusherRecipe(6, CrusherCrafting.recipeDiamondHorseArmor).setNoText());
|
||||
new BookletChapter("furnaceDouble", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockFurnaceDouble), new PageCrafting(1, BlockCrafting.recipeFurnace).setWildcard().addTextReplacement("<rf>", TileEntityFurnaceDouble.ENERGY_USE));
|
||||
new BookletChapter("furnaceDouble", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockFurnaceDouble), new PageCrafting(1, BlockCrafting.recipeFurnace).setWildcard().addTextReplacement("<rf>", ConfigIntValues.POWERED_FURNACE_ENERGY_USE.getValue()));
|
||||
new BookletChapter("lavaFactory", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockLavaFactoryController), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityLavaFactoryController.ENERGY_USE), new PagePicture(2, "page_lava_factory", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLavaFactory).setNoText(), new PageCrafting(4, BlockCrafting.recipeCasing).setNoText());
|
||||
new BookletChapter("energizer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockEnergizer), new PageCrafting(1, BlockCrafting.recipeEnergizer), new PageCrafting(2, BlockCrafting.recipeEnervator));
|
||||
new BookletChapter("repairer", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockItemRepairer), new PageCrafting(1, BlockCrafting.recipeRepairer).addTextReplacement("<rf>", TileEntityItemRepairer.ENERGY_USE));
|
||||
|
|
|
@ -85,7 +85,11 @@ public enum ConfigIntValues{
|
|||
BIO_REACTOR_ENERGY_PRODUCTION("Bio Reactor: Energy Production Per Type", ConfigCategories.MACHINE_ENERGY_VALUES, 2, 1, 10000, "Amount of energy Bio Reactor produces per item time.\nResulting energy production is: (this value * amount of different items) ^ 2."),
|
||||
BIO_REACTOR_BURN_TIME("Bio Reactor: Maximum Burn Time", ConfigCategories.MACHINE_VALUES, 200, 1, 72000, "Maximum time in ticks Bio Reactor can burn one item.\nLow values can result in nonoperability of Bio Reactor."),
|
||||
LASER_RELAY_MAXIMUM_DISTANCE("Laser Relay: Maximum Distance", ConfigCategories.MACHINE_VALUES, 15, 1, 48, "Maximum distance in blocks between two Laser Relays"),
|
||||
LASER_RELAY_MAXIMUM_UPGRADED_DISTANCE("Laser Relay: Maximum Distance With Range Upgrade", ConfigCategories.MACHINE_VALUES, 35, 1, 96, "Maximum distance in blocks between two Laser Relays with Range upgrade");
|
||||
LASER_RELAY_MAXIMUM_UPGRADED_DISTANCE("Laser Relay: Maximum Distance With Range Upgrade", ConfigCategories.MACHINE_VALUES, 35, 1, 96, "Maximum distance in blocks between two Laser Relays with Range upgrade"),
|
||||
POWERED_FURNACE_ENERGY_CAPACITY("Powered Furnace: Energy Capacity", ConfigCategories.MACHINE_ENERGY_VALUES, 30000, 1000, 1000000000, "Amount of energy Powered Furnace can store."),
|
||||
POWERED_FURNACE_ENERGY_RECEIVE("Powered Furnace: Energy Receive Rate", ConfigCategories.MACHINE_ENERGY_VALUES, 150, 1, 1000000000, "Amount of energy Powered Furnace can receive per tick."),
|
||||
POWERED_FURNACE_ENERGY_USE("Powered Furnace: Energy Use", ConfigCategories.MACHINE_RECIPE_COSTS, 25, 1, 1000000000, "Amount of energy Powered Furnace uses per tick."),
|
||||
POWERED_FURNACE_PROCESSING_DURATION("Powered Furnace: Processing Time", ConfigCategories.MACHINE_RECIPE_COSTS, 80, 1, 72000, "Time in ticks required to smelt one item in Powered Furnace.");
|
||||
|
||||
public final String name;
|
||||
public final String category;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
package de.ellpeck.actuallyadditions.mod.tile;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.BlockFurnaceDouble;
|
||||
import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues;
|
||||
import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerCustom;
|
||||
import de.ellpeck.actuallyadditions.mod.util.ItemUtil;
|
||||
|
@ -31,9 +32,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
|||
public static final int SLOT_OUTPUT_1 = 1;
|
||||
public static final int SLOT_INPUT_2 = 2;
|
||||
public static final int SLOT_OUTPUT_2 = 3;
|
||||
public static final int ENERGY_USE = 25;
|
||||
private static final int SMELT_TIME = 80;
|
||||
public final CustomEnergyStorage storage = new CustomEnergyStorage(30000, 150, 0);
|
||||
public final CustomEnergyStorage storage = new CustomEnergyStorage(ConfigIntValues.POWERED_FURNACE_ENERGY_CAPACITY.getValue(), ConfigIntValues.POWERED_FURNACE_ENERGY_RECEIVE.getValue(), 0);
|
||||
public int firstSmeltTime;
|
||||
public int secondSmeltTime;
|
||||
public boolean isAutoSplit;
|
||||
|
@ -112,14 +111,16 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
|||
boolean canSmeltOnFirst = this.canSmeltOn(SLOT_INPUT_1, SLOT_OUTPUT_1);
|
||||
boolean canSmeltOnSecond = this.canSmeltOn(SLOT_INPUT_2, SLOT_OUTPUT_2);
|
||||
|
||||
int energyUse = ConfigIntValues.POWERED_FURNACE_ENERGY_USE.getValue();
|
||||
int processingTime = ConfigIntValues.POWERED_FURNACE_PROCESSING_DURATION.getValue();
|
||||
if(canSmeltOnFirst){
|
||||
if(this.storage.getEnergyStored() >= ENERGY_USE){
|
||||
if(this.storage.getEnergyStored() >= energyUse){
|
||||
this.firstSmeltTime++;
|
||||
if(this.firstSmeltTime >= SMELT_TIME){
|
||||
if(this.firstSmeltTime >= processingTime){
|
||||
this.finishBurning(SLOT_INPUT_1, SLOT_OUTPUT_1);
|
||||
this.firstSmeltTime = 0;
|
||||
}
|
||||
this.storage.extractEnergyInternal(ENERGY_USE, false);
|
||||
this.storage.extractEnergyInternal(energyUse, false);
|
||||
}
|
||||
smelted = true;
|
||||
}
|
||||
|
@ -128,13 +129,13 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
|||
}
|
||||
|
||||
if(canSmeltOnSecond){
|
||||
if(this.storage.getEnergyStored() >= ENERGY_USE){
|
||||
if(this.storage.getEnergyStored() >= energyUse){
|
||||
this.secondSmeltTime++;
|
||||
if(this.secondSmeltTime >= SMELT_TIME){
|
||||
if(this.secondSmeltTime >= processingTime){
|
||||
this.finishBurning(SLOT_INPUT_2, SLOT_OUTPUT_2);
|
||||
this.secondSmeltTime = 0;
|
||||
}
|
||||
this.storage.extractEnergyInternal(ENERGY_USE, false);
|
||||
this.storage.extractEnergyInternal(energyUse, false);
|
||||
}
|
||||
smelted = true;
|
||||
}
|
||||
|
@ -192,12 +193,12 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getFirstTimeToScale(int i){
|
||||
return this.firstSmeltTime*i/SMELT_TIME;
|
||||
return this.firstSmeltTime*i/ConfigIntValues.POWERED_FURNACE_PROCESSING_DURATION.getValue();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getSecondTimeToScale(int i){
|
||||
return this.secondSmeltTime*i/SMELT_TIME;
|
||||
return this.secondSmeltTime*i/ConfigIntValues.POWERED_FURNACE_PROCESSING_DURATION.getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue