mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Made double furnace and double crusher use the double amount of energy if both items are smelting
This commit is contained in:
parent
eb8b6cd06c
commit
5b9f668d14
4 changed files with 9 additions and 16 deletions
|
@ -103,7 +103,7 @@ public class InitBooklet{
|
|||
new BookletChapter("laserRelays", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockLaserRelay), new PageTextOnly(1).addTextReplacement("<range>", TileEntityLaserRelay.MAX_DISTANCE).addTextReplacement("<loss>", ConfigIntValues.LASER_RELAY_LOSS.getValue()), new PagePicture(2, "pageLaserRelay", 0).setNoText(), new PageCrafting(3, BlockCrafting.recipeLaserRelay).setNoText().setPageStacksWildcard(), new PageCrafting(4, ItemCrafting.recipeLaserWrench).setNoText()).setImportant();
|
||||
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).setStack(new ItemStack(InitItems.itemCoffeeBean)).addTextReplacement("<rf>", TileEntityCoffeeMachine.ENERGY_USED).addTextReplacement("<coffee>", TileEntityCoffeeMachine.CACHE_USE).addTextReplacement("<water>", TileEntityCoffeeMachine.WATER_USE), new PageTextOnly(2).setStack(new ItemStack(InitItems.itemCoffee)), new PagePicture(3, "pageCoffeeMachine", 115), new PageCrafting(4, BlockCrafting.recipeCoffeeMachine).setNoText().setPageStacksWildcard(), new PageCrafting(5, ItemCrafting.recipeCup).setNoText()).setImportant();
|
||||
new BookletChapterCrusher("crusher", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble), new PageTextOnly(1).addTextReplacement("<rf1>", TileEntityGrinder.getEnergyUse(false)).addTextReplacement("<rf2>", TileEntityGrinder.getEnergyUse(true)), new PageCrafting(2, BlockCrafting.recipeCrusher).setNoText().setPageStacksWildcard(), new PageCrafting(3, BlockCrafting.recipeDoubleCrusher).setNoText().setPageStacksWildcard(), new PageCrusherRecipe(4, CrusherCrafting.recipeIronHorseArmor).setNoText(), new PageCrusherRecipe(5, CrusherCrafting.recipeGoldHorseArmor).setNoText(), new PageCrusherRecipe(6, CrusherCrafting.recipeDiamondHorseArmor).setNoText());
|
||||
new BookletChapterCrusher("crusher", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockGrinderDouble), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityGrinder.ENERGY_USE), new PageCrafting(2, BlockCrafting.recipeCrusher).setNoText().setPageStacksWildcard(), new PageCrafting(3, BlockCrafting.recipeDoubleCrusher).setNoText().setPageStacksWildcard(), 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).addTextReplacement("<rf>", TileEntityFurnaceDouble.ENERGY_USE).setPageStacksWildcard());
|
||||
new BookletChapter("lavaFactory", ActuallyAdditionsAPI.entryFunctionalRF, new ItemStack(InitBlocks.blockLavaFactoryController), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityLavaFactoryController.ENERGY_USE), new PagePicture(2, "pageLavaFactory", 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));
|
||||
|
|
|
@ -72,6 +72,7 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
|||
this.finishBurning(SLOT_INPUT_1, SLOT_OUTPUT_1);
|
||||
this.firstSmeltTime = 0;
|
||||
}
|
||||
this.storage.extractEnergy(ENERGY_USE, false);
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -85,16 +86,13 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements
|
|||
this.finishBurning(SLOT_INPUT_2, SLOT_OUTPUT_2);
|
||||
this.secondSmeltTime = 0;
|
||||
}
|
||||
this.storage.extractEnergy(ENERGY_USE, false);
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.secondSmeltTime = 0;
|
||||
}
|
||||
|
||||
if(this.storage.getEnergyStored() >= ENERGY_USE && (this.firstSmeltTime > 0 || this.secondSmeltTime > 0)){
|
||||
this.storage.extractEnergy(ENERGY_USE, false);
|
||||
}
|
||||
|
||||
if(flag != (this.firstSmeltTime > 0 || this.secondSmeltTime > 0)){
|
||||
this.markDirty();
|
||||
int meta = PosUtil.getMetadata(this.pos, this.worldObj);
|
||||
|
|
|
@ -35,6 +35,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
|
|||
public static final int SLOT_INPUT_2 = 3;
|
||||
public static final int SLOT_OUTPUT_2_1 = 4;
|
||||
public static final int SLOT_OUTPUT_2_2 = 5;
|
||||
public static final int ENERGY_USE = 40;
|
||||
public EnergyStorage storage = new EnergyStorage(60000);
|
||||
public int firstCrushTime;
|
||||
public int secondCrushTime;
|
||||
|
@ -52,10 +53,6 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
|
|||
this.isDouble = false;
|
||||
}
|
||||
|
||||
public static int getEnergyUse(boolean isDouble){
|
||||
return isDouble ? 60 : 40;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(EnumFacing from, int maxReceive, boolean simulate){
|
||||
return this.storage.receiveEnergy(maxReceive, simulate);
|
||||
|
@ -108,7 +105,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
|
|||
boolean shouldPlaySound = false;
|
||||
|
||||
if(canCrushOnFirst){
|
||||
if(this.storage.getEnergyStored() >= getEnergyUse(this.isDouble)){
|
||||
if(this.storage.getEnergyStored() >= ENERGY_USE){
|
||||
if(this.firstCrushTime%30 == 0){
|
||||
shouldPlaySound = true;
|
||||
}
|
||||
|
@ -117,6 +114,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
|
|||
this.finishCrushing(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2);
|
||||
this.firstCrushTime = 0;
|
||||
}
|
||||
this.storage.extractEnergy(ENERGY_USE, false);
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -125,7 +123,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
|
|||
|
||||
if(this.isDouble){
|
||||
if(canCrushOnSecond){
|
||||
if(this.storage.getEnergyStored() >= getEnergyUse(this.isDouble)){
|
||||
if(this.storage.getEnergyStored() >= ENERGY_USE){
|
||||
if(this.secondCrushTime%30 == 0){
|
||||
shouldPlaySound = true;
|
||||
}
|
||||
|
@ -134,6 +132,7 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
|
|||
this.finishCrushing(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2);
|
||||
this.secondCrushTime = 0;
|
||||
}
|
||||
this.storage.extractEnergy(ENERGY_USE, false);
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -141,10 +140,6 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IEnerg
|
|||
}
|
||||
}
|
||||
|
||||
if(this.storage.getEnergyStored() >= getEnergyUse(this.isDouble) && (this.firstCrushTime > 0 || this.secondCrushTime > 0)){
|
||||
this.storage.extractEnergy(getEnergyUse(this.isDouble), false);
|
||||
}
|
||||
|
||||
if(flag != (this.firstCrushTime > 0 || this.secondCrushTime > 0)){
|
||||
this.markDirty();
|
||||
int meta = PosUtil.getMetadata(this.pos, this.worldObj);
|
||||
|
|
|
@ -647,7 +647,7 @@ booklet.actuallyadditions.chapter.coffeeMachine.text.6=<item>Milk<r> is an impor
|
|||
booklet.actuallyadditions.chapter.coffeeMachine.text.7=<i>The fact that you're reading this means that you either have <imp>HarvestCraft<r><i> installed, or that you're looking at the lang file. <r><n>This does the same thing as <item>Milk<r>, but for veggie guys.
|
||||
|
||||
booklet.actuallyadditions.chapter.crusher.name=Crusher and Double Crusher
|
||||
booklet.actuallyadditions.chapter.crusher.text.1=The <item>Crusher<r> turns every ore, ingot and gem into its corresponding <imp>dust<r> using <rf1> RF/t. <n>When you put in <imp>Ores<r> however, they will yield <imp>2 pieces of dust<r>. <n>The <item>Double Crusher<r> basically does the same, however it can crush two ores at a time and uses <rf2> RF/t. <n>On the following pages, you can see some additional useful recipes for inside the crusher. <n><n><i>He's my crush
|
||||
booklet.actuallyadditions.chapter.crusher.text.1=The <item>Crusher<r> turns every ore, ingot and gem into its corresponding <imp>dust<r> using <rf> RF/t. <n>When you put in <imp>Ores<r> however, they will yield <imp>2 pieces of dust<r>. <n>The <item>Double Crusher<r> basically does the same, however it can crush two ores at a time. <n>On the following pages, you can see some additional useful recipes for inside the crusher. <n><n><i>He's my crush
|
||||
|
||||
booklet.actuallyadditions.chapter.furnaceDouble.name=Double Furnace
|
||||
booklet.actuallyadditions.chapter.furnaceDouble.text.1=The <item>Double Furnace<r> works like a furnace, however, it uses <rf> RF/t and can smelt <imp>two items at a time<r>.
|
||||
|
|
Loading…
Reference in a new issue