Made booklet words and characters not be more than they should be because everything was being done twice

This commit is contained in:
Ellpeck 2016-05-26 23:05:08 +02:00
parent 9e50818fca
commit f2ee1b9414

View file

@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry;
import de.ellpeck.actuallyadditions.mod.blocks.render.RenderCompost; import de.ellpeck.actuallyadditions.mod.blocks.render.RenderCompost;
import de.ellpeck.actuallyadditions.mod.blocks.render.RenderReconstructorLens; import de.ellpeck.actuallyadditions.mod.blocks.render.RenderReconstructorLens;
import de.ellpeck.actuallyadditions.mod.blocks.render.RenderSmileyCloud; import de.ellpeck.actuallyadditions.mod.blocks.render.RenderSmileyCloud;
import de.ellpeck.actuallyadditions.mod.booklet.InitBooklet;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.event.InitEvents; import de.ellpeck.actuallyadditions.mod.event.InitEvents;
import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
@ -68,6 +69,7 @@ public class ClientProxy implements IProxy{
String bookletText = ""; String bookletText = "";
for(IBookletEntry entry : ActuallyAdditionsAPI.BOOKLET_ENTRIES){ for(IBookletEntry entry : ActuallyAdditionsAPI.BOOKLET_ENTRIES){
if(entry != ActuallyAdditionsAPI.allAndSearch){
bookletWordCount += entry.getLocalizedName().split(" ").length; bookletWordCount += entry.getLocalizedName().split(" ").length;
bookletCharCount += entry.getLocalizedName().length(); bookletCharCount += entry.getLocalizedName().length();
bookletText += entry.getLocalizedName()+"\n\n"; bookletText += entry.getLocalizedName()+"\n\n";
@ -89,6 +91,7 @@ public class ClientProxy implements IProxy{
} }
bookletText += "\n"; bookletText += "\n";
} }
}
if(ConfigBoolValues.BOOKLET_TEXT_TO_FILE.isEnabled()){ if(ConfigBoolValues.BOOKLET_TEXT_TO_FILE.isEnabled()){
File file = new File(Minecraft.getMinecraft().mcDataDir, ModUtil.MOD_ID+"booklettext.txt"); File file = new File(Minecraft.getMinecraft().mcDataDir, ModUtil.MOD_ID+"booklettext.txt");