diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java index 001faabbb..5e3481c4f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/InitBooklet.java @@ -139,7 +139,7 @@ public final class InitBooklet{ crystalPages.add(new PageCrafting(crystalPages.size()+1, MiscCrafting.RECIPES_CRYSTAL_BLOCKS).setNoText()); chaptersIntroduction[2] = new BookletChapter("engineerHouse", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(Items.EMERALD), new PageTextOnly(1), new PagePicture(2, "page_engineer_house", 145)); chaptersIntroduction[6] = new BookletChapter("crystals", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockAtomicReconstructor), crystalPages.toArray(new BookletPage[crystalPages.size()])).setSpecial(); - chaptersIntroduction[5] = new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageCrafting(1, BlockCrafting.recipeCoalGen).setWildcard().addTextReplacement("", TileEntityCoalGenerator.PRODUCE)); + chaptersIntroduction[5] = new BookletChapter("coalGen", ActuallyAdditionsAPI.entryGettingStarted, new ItemStack(InitBlocks.blockCoalGenerator), new PageTextOnly(1).addTextReplacement("", TileEntityCoalGenerator.PRODUCE), new PageCrafting(2, BlockCrafting.recipeCoalGen).setWildcard().setNoText()); ArrayList empowererPages = new ArrayList(); empowererPages.addAll(Arrays.asList(new PageTextOnly(1), new PagePicture(2, "page_empowerer", 137), new PageCrafting(3, BlockCrafting.recipeEmpowerer), new PageCrafting(4, BlockCrafting.recipeDisplayStand))); for(int i = 0; i < EmpowererHandler.MAIN_PAGE_RECIPES.size(); i++){ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java index 3bdb542e4..e28df58a6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java @@ -28,6 +28,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements private int lastEnergy; private int lastBurnTime; private int lastCurrentBurnTime; + private int lastCompare; public TileEntityCoalGenerator(){ super(1, "coalGenerator"); @@ -82,7 +83,9 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements this.slots.set(0, StackUtil.addStackSize(this.slots.get(0), -1)); } - if(flag != this.currentBurnTime > 0){ + if(flag != this.currentBurnTime > 0 || this.lastCompare != this.getComparatorStrength()){ + this.lastCompare = this.getComparatorStrength(); + this.markDirty(); } @@ -94,6 +97,12 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements } } + @Override + public int getComparatorStrength(){ + float calc = ((float)this.storage.getEnergyStored()/(float)this.storage.getMaxEnergyStored())*15F; + return (int)calc; + } + @Override public boolean isItemValidForSlot(int i, ItemStack stack){ return TileEntityFurnace.getItemBurnTime(stack) > 0; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java index fbc3a3d63..3330b71f6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java @@ -47,6 +47,7 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn private int lastBurnTime; private int lastMaxBurnTime; private int lastEnergyProduce; + private int lastCompare; public TileEntityOilGenerator(){ super("oilGenerator"); @@ -107,7 +108,6 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn public void updateEntity(){ super.updateEntity(); if(!this.world.isRemote){ - int lastCompare = this.getComparatorStrength(); boolean flag = this.currentBurnTime > 0; if(this.currentBurnTime > 0 && this.currentEnergyProduce > 0){ @@ -133,7 +133,9 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn } } - if(flag != this.currentBurnTime > 0 || lastCompare != this.getComparatorStrength()){ + if(flag != this.currentBurnTime > 0 || this.lastCompare != this.getComparatorStrength()){ + this.lastCompare = this.getComparatorStrength(); + this.markDirty(); } diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 62f42ffeb..8aa3d1e41 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -870,7 +870,7 @@ booklet.actuallyadditions.chapter.repairer.name=Item Repairer booklet.actuallyadditions.chapter.repairer.text.1=The Item Repairer uses CF/t to repair items that can be repaired in an Anvil without needing any materials! booklet.actuallyadditions.chapter.coalGen.name=Coal Generator -booklet.actuallyadditions.chapter.coalGen.text.1=The Coal Generator generates CF/t through the use of everything that can be put into a furnace. Note that it only starts burning something up if the buffer isn't already full of power. It will stop generating when powered by Redstone. +booklet.actuallyadditions.chapter.coalGen.text.1=The Coal Generator generates CF/t through the use of everything that can be put into a furnace. Note that it only starts burning something up if the buffer isn't already full of power. It will stop generating when powered by Redstone. Additionally, using a Comparator will yield the percentage of energy stored. booklet.actuallyadditions.chapter.solarPanel.name=Solar Panel booklet.actuallyadditions.chapter.solarPanel.text.1=The Solar Panel produces CF/t when it has direct daylight above it and it is daytime. Any blocks above it that are transparent will decrease its efficiency, however. Panelled walls