mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-22 19:39:24 +01:00
Fermenting barrel comparator output
This commit is contained in:
parent
af3ef16975
commit
ca38b43b67
3 changed files with 16 additions and 2 deletions
|
@ -226,7 +226,7 @@ public final class InitBooklet{
|
|||
//RF Generating Blocks
|
||||
new BookletChapter("solarPanel", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockFurnaceSolar), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityFurnaceSolar.PRODUCE), new PageCrafting(2, BlockCrafting.recipeSolar).setNoText());
|
||||
new BookletChapter("heatCollector", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockHeatCollector), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityHeatCollector.ENERGY_PRODUCE).addTextReplacement("<min>", TileEntityHeatCollector.BLOCKS_NEEDED), new PageCrafting(2, BlockCrafting.recipeHeatCollector).setNoText());
|
||||
new BookletChapter("canola", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockFermentingBarrel), new PageTextOnly(1).addItemToPage(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())).addItemToPage(new ItemStack(InitItems.itemCanolaSeed)).addFluidToPage(InitFluids.fluidCanolaOil), new PageTextOnly(2).addFluidToPage(InitFluids.fluidOil).addFluidToPage(InitFluids.fluidCrystalOil).addFluidToPage(InitFluids.fluidEmpoweredOil), new PageCrafting(3, BlockCrafting.recipeCanolaPress).setNoText(), new PageCrafting(4, BlockCrafting.recipeFermentingBarrel).setNoText(), new PageCrafting(5, BlockCrafting.recipeOilGen), new PageReconstructor(6, LensRecipeHandler.recipeCrystallizedCanolaSeed).setNoText(), new PageEmpowerer(7, EmpowererHandler.recipeEmpoweredCanolaSeed).setNoText());
|
||||
new BookletChapter("canola", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockFermentingBarrel), new PageTextOnly(1).addItemToPage(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal())).addItemToPage(new ItemStack(InitItems.itemCanolaSeed)).addFluidToPage(InitFluids.fluidCanolaOil), new PageTextOnly(2).addFluidToPage(InitFluids.fluidOil).addFluidToPage(InitFluids.fluidCrystalOil).addFluidToPage(InitFluids.fluidEmpoweredOil), new PageCrafting(3, BlockCrafting.recipeCanolaPress).setNoText(), new PageCrafting(4, BlockCrafting.recipeFermentingBarrel), new PageCrafting(5, BlockCrafting.recipeOilGen), new PageReconstructor(6, LensRecipeHandler.recipeCrystallizedCanolaSeed).setNoText(), new PageEmpowerer(7, EmpowererHandler.recipeEmpoweredCanolaSeed).setNoText());
|
||||
new BookletChapter("leafGen", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockLeafGenerator), new PageTextOnly(1).addTextReplacement("<rf>", TileEntityLeafGenerator.ENERGY_PRODUCED).addTextReplacement("<range>", TileEntityLeafGenerator.RANGE), new PageCrafting(2, BlockCrafting.recipeLeafGen)).setImportant();
|
||||
new BookletChapter("bioReactor", ActuallyAdditionsAPI.entryGeneratingRF, new ItemStack(InitBlocks.blockBioReactor), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeBioReactor).setNoText()).setSpecial();
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari
|
|||
private int lastCanola;
|
||||
private int lastOil;
|
||||
private int lastProcessTime;
|
||||
private int lastCompare;
|
||||
|
||||
public TileEntityFermentingBarrel(){
|
||||
super("fermentingBarrel");
|
||||
|
@ -80,13 +81,19 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari
|
|||
|
||||
this.oilTank.fillInternal(new FluidStack(InitFluids.fluidOil, produce), true);
|
||||
this.canolaTank.drainInternal(produce, true);
|
||||
this.markDirty();
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.currentProcessTime = 0;
|
||||
}
|
||||
|
||||
int compare = this.getComparatorStrength();
|
||||
if(compare != this.lastCompare){
|
||||
this.lastCompare = compare;
|
||||
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
if((this.canolaTank.getFluidAmount() != this.lastCanola || this.oilTank.getFluidAmount() != this.lastOil || this.currentProcessTime != this.lastProcessTime) && this.sendUpdateWithInterval()){
|
||||
this.lastProcessTime = this.currentProcessTime;
|
||||
this.lastCanola = this.canolaTank.getFluidAmount();
|
||||
|
@ -95,6 +102,12 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorStrength(){
|
||||
float calc = ((float)this.oilTank.getFluidAmount()/(float)this.oilTank.getCapacity())*15F;
|
||||
return (int)calc;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getProcessScaled(int i){
|
||||
return this.currentProcessTime*i/PROCESS_TIME;
|
||||
|
|
|
@ -881,6 +881,7 @@ booklet.actuallyadditions.chapter.heatCollector.text.1=The <item>Heat Collector<
|
|||
booklet.actuallyadditions.chapter.canola.name=Canola and Oil
|
||||
booklet.actuallyadditions.chapter.canola.text.1=Using <item>Canola<r>, you can make a simple, yet effective power generation system from <imp>natural resources<r>. <n>To do this, first find some <item>Canola Plants<r> in the wild and plant them on your farm. <n><n>The <item>Canola<r> you get out of them can be used in a <item>Canola Press<r> to make <item>Canola Oil<r>. <n><n>This can be <imp>used in an<r> <item>Oil Generator<r>. It displays the amount of power it generates in its GUI, however, it can be <imp>upgraded further<r> to yield <imp>more power<r> than that!
|
||||
booklet.actuallyadditions.chapter.canola.text.2=For starters, you can use a <item>Fermenting Barrel<r> to convert the <item>Canola Oil<r> into <item>Oil<r>. <n><n>If you're still not satisfied with the power that generates, <imp>place it on the ground<r> and throw in a <item>Crystallized Canola Seed<r> to make <item>Crystallized Oil<r>. <n><n>If that isn't enough for you either, make a <item>Empowered Canola Seed<r>, toss that into some <item>Crystallized Oil<r> to get <item>Empowered Oil<r>!
|
||||
booklet.actuallyadditions.chapter.canola.text.4=The <item>Fermenting Barrel<r> can have a <item>Comparator<r> attached to it which will result in the Redstone strength being equivalent to the <imp>percentage<r> of the <imp>output tank<r>.
|
||||
booklet.actuallyadditions.chapter.canola.text.5=If you break the <item>Oil Generator<r>, it will keep the liquid inside. <n>Place it in the <imp>crafting grid<r> to empty it out. <n>It will <imp>stop generating<r> when powered by <imp>Redstone<r>. <n>Additionally, using a <item>Comparator<r> will yield the percentage of <imp>energy stored<r>.
|
||||
|
||||
booklet.actuallyadditions.chapter.wings.name=Wings Of The Bats
|
||||
|
|
Loading…
Reference in a new issue