diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java b/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java index 5f3717b53..840cc5786 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/GuiBooklet.java @@ -24,6 +24,7 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; @@ -57,6 +58,8 @@ public class GuiBooklet extends GuiScreen{ private static final int BUTTON_RETURN_ID = 2; private static final int CHAPTER_BUTTONS_START = 3; + private static final int BUTTONS_PER_PAGE = 15; + public GuiBooklet(){ this.xSize = 146; this.ySize = 180; @@ -114,7 +117,7 @@ public class GuiBooklet extends GuiScreen{ this.buttonList.add(new TexturedButton(BUTTON_BACK_ID, this.guiLeft-18, this.guiTop+this.ySize+2, 146, 0, 18, 10)); this.buttonList.add(new TexturedButton(BUTTON_RETURN_ID, this.guiLeft+this.xSize/2-7, this.guiTop+this.ySize+2, 182, 0, 15, 10)); - for(int i = 0; i < 12; i++){ + for(int i = 0; i < BUTTONS_PER_PAGE; i++){ this.buttonList.add(new IndexButton(this.unicodeRenderer, CHAPTER_BUTTONS_START+i, guiLeft+13, guiTop+15+(i*11), 120, 10, "")); } @@ -259,7 +262,7 @@ public class GuiBooklet extends GuiScreen{ if(this.currentIndexEntry != null){ if(this.currentChapter == null){ if(actualButton < this.currentIndexEntry.chapters.size()){ - BookletChapter chap = currentIndexEntry.chapters.get(actualButton+(12*this.pageOpenInIndex-12)); + BookletChapter chap = currentIndexEntry.chapters.get(actualButton+(BUTTONS_PER_PAGE*this.pageOpenInIndex-BUTTONS_PER_PAGE)); this.openChapter(chap, chap.pages[0]); } } @@ -296,7 +299,7 @@ public class GuiBooklet extends GuiScreen{ this.currentChapter = null; this.currentIndexEntry = entry; - this.indexPageAmount = entry == null ? 1 : entry.chapters.size()/12+1; + this.indexPageAmount = entry == null ? 1 : entry.chapters.size()/BUTTONS_PER_PAGE+1; this.pageOpenInIndex = entry == null ? 1 : (this.indexPageAmount <= page ? this.indexPageAmount : page); this.getButton(BUTTON_RETURN_ID).visible = entry != null; @@ -306,17 +309,17 @@ public class GuiBooklet extends GuiScreen{ for(int i = 0; i < 12; i++){ GuiButton button = this.getButton(CHAPTER_BUTTONS_START+i); if(entry == null){ - boolean entryExists = InitBooklet.entries.size() > i+(12*this.pageOpenInIndex-12); + boolean entryExists = InitBooklet.entries.size() > i+(BUTTONS_PER_PAGE*this.pageOpenInIndex-BUTTONS_PER_PAGE); button.visible = entryExists; if(entryExists){ - button.displayString = InitBooklet.entries.get(i+(12*this.pageOpenInIndex-12)).getLocalizedName(); + button.displayString = InitBooklet.entries.get(i+(BUTTONS_PER_PAGE*this.pageOpenInIndex-BUTTONS_PER_PAGE)).getLocalizedName(); } } else{ - boolean entryExists = entry.chapters.size() > i+(12*this.pageOpenInIndex-12); + boolean entryExists = entry.chapters.size() > i+(BUTTONS_PER_PAGE*this.pageOpenInIndex-BUTTONS_PER_PAGE); button.visible = entryExists; if(entryExists){ - button.displayString = entry.chapters.get(i+(12*this.pageOpenInIndex-12)).getLocalizedName(); + button.displayString = entry.chapters.get(i+(BUTTONS_PER_PAGE*this.pageOpenInIndex-BUTTONS_PER_PAGE)).getLocalizedName(); } } } @@ -333,9 +336,9 @@ public class GuiBooklet extends GuiScreen{ this.currentPage = page != null && this.hasPage(chapter, page) ? page : chapter.pages[0]; this.getButton(BUTTON_FORWARD_ID).visible = this.getNextPage(chapter, this.currentPage) != null; - this.getButton(BUTTON_BACK_ID).visible = false; + this.getButton(BUTTON_BACK_ID).visible = this.getPrevPage(chapter, this.currentPage) != null; - for(int i = 0; i < 12; i++){ + for(int i = 0; i < BUTTONS_PER_PAGE; i++){ GuiButton button = this.getButton(CHAPTER_BUTTONS_START+i); button.visible = false; } @@ -373,7 +376,7 @@ public class GuiBooklet extends GuiScreen{ color = 38144; } - this.renderer.drawString((this.field_146123_n ? StringUtil.UNDERLINE : "")+this.displayString, this.xPosition, this.yPosition+(this.height-8)/2, color); + this.renderer.drawString((this.field_146123_n ? EnumChatFormatting.UNDERLINE : "")+this.displayString, this.xPosition, this.yPosition+(this.height-8)/2, color); } } } diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java index decd1ad66..9fa3b1557 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/InitBooklet.java @@ -30,13 +30,15 @@ public class InitBooklet{ public static BookletIndexEntry entryFunctionalNonRF = new BookletIndexEntry("functionalNoRF"); public static BookletIndexEntry entryMisc = new BookletIndexEntry("misc"); - public static BookletEntryAllSearch allAndSearch = new BookletEntryAllSearch("allAndSearch"); + public static BookletIndexEntry allAndSearch = new BookletEntryAllSearch("allAndSearch"); static{ new BookletChapter("breaker", entryFunctionalNonRF, new PageCrafting(1, BlockCrafting.recipeBreaker), new PageCrafting(2, BlockCrafting.recipePlacer), new PageCrafting(3, BlockCrafting.recipeLiquidPlacer), new PageCrafting(4, BlockCrafting.recipeLiquidCollector)); - new BookletChapter("phantomfaces", entryFunctionalNonRF, new PageText(1), new PageCrafting(2, BlockCrafting.recipePhantomface), new PageCrafting(3, BlockCrafting.recipeLiquiface), new PageCrafting(4, BlockCrafting.recipeEnergyface), new PageCrafting(5, ItemCrafting.recipePhantomConnector)); - new BookletChapter("phantomBreaker", entryFunctionalNonRF, new PageText(1), new PageCrafting(2, BlockCrafting.recipePhantomPlacer), new PageCrafting(3, BlockCrafting.recipePhantomBreaker), new PageCrafting(4, ItemCrafting.recipePhantomConnector)); + new BookletChapter("phantomfaces", entryFunctionalNonRF, new PageText(1), new PageCrafting(2, BlockCrafting.recipePhantomface), new PageCrafting(3, BlockCrafting.recipeLiquiface), new PageCrafting(4, BlockCrafting.recipeEnergyface), new PageCrafting(5, ItemCrafting.recipePhantomConnector), new PageCrafting(6, BlockCrafting.recipePhantomBooster)); + new BookletChapter("phantomBreaker", entryFunctionalNonRF, new PageText(1), new PageCrafting(2, BlockCrafting.recipePhantomPlacer), new PageCrafting(3, BlockCrafting.recipePhantomBreaker)); + new BookletChapter("esd", entryFunctionalNonRF, new PageText(1), new PageCrafting(2, BlockCrafting.recipeESD), new PageCrafting(3, BlockCrafting.recipeAdvancedESD)); + new BookletChapter("craftingIngs", entryMisc, new PageText(1), new PageCrafting(2, ItemCrafting.recipeCoil), new PageCrafting(3, ItemCrafting.recipeCoilAdvanced), new PageCrafting(4, BlockCrafting.recipeCase), new PageCrafting(5, BlockCrafting.recipeStoneCase), new PageCrafting(6, BlockCrafting.recipeEnderPearlBlock), new PageCrafting(7, BlockCrafting.recipeEnderCase)); new BookletChapter("cloud", entryMisc, new PageText(1), new PageCrafting(2, BlockCrafting.recipeSmileyCloud)); new BookletChapter("foods", entryMisc, new PageCrafting(1, FoodCrafting.recipePizza), new PageFurnace(2, new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE_BREAD.ordinal())), new PageCrafting(3, FoodCrafting.recipeHamburger), new PageCrafting(4, FoodCrafting.recipeBigCookie), new PageCrafting(5, FoodCrafting.recipeSubSandwich), new PageCrafting(6, FoodCrafting.recipeFrenchFry), new PageCrafting(7, FoodCrafting.recipeFrenchFries), new PageCrafting(8, FoodCrafting.recipeFishNChips), new PageCrafting(9, FoodCrafting.recipeCheese), new PageCrafting(10, FoodCrafting.recipePumpkinStew), new PageCrafting(11, FoodCrafting.recipeCarrotJuice), new PageCrafting(12, FoodCrafting.recipeSpaghetti), new PageCrafting(13, FoodCrafting.recipeNoodle), new PageCrafting(14, FoodCrafting.recipeChocolate), new PageCrafting(15, FoodCrafting.recipeChocolateCake), new PageCrafting(16, FoodCrafting.recipeToast), new PageFurnace(17, new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()))); } diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/BookletPage.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/BookletPage.java index 7b0b9f669..45501eced 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/BookletPage.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/BookletPage.java @@ -13,8 +13,13 @@ package ellpeck.actuallyadditions.booklet.page; import ellpeck.actuallyadditions.booklet.BookletChapter; import ellpeck.actuallyadditions.booklet.GuiBooklet; import ellpeck.actuallyadditions.booklet.InitBooklet; +import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.StringUtil; +import net.minecraft.client.Minecraft; +import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.ResourceLocation; import org.lwjgl.input.Mouse; import java.util.List; @@ -45,7 +50,7 @@ public class BookletPage implements IBookletPage{ @Override public String getText(){ - return null; + return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.chapter.getUnlocalizedName()+".text."+this.id).replaceAll("", EnumChatFormatting.DARK_GREEN+"").replaceAll("", EnumChatFormatting.BLUE+"").replaceAll("", EnumChatFormatting.BLACK+""); } @Override @@ -72,17 +77,18 @@ public class BookletPage implements IBookletPage{ list.set(k, stack.getRarity().rarityColor+(String)list.get(k)); } else{ - list.set(k, StringUtil.GRAY+list.get(k)); + list.set(k, EnumChatFormatting.GRAY+(String)list.get(k)); } } if(checkAndTransfer){ for(IBookletPage page : InitBooklet.pagesWithItemStackData){ if(page.getItemStackForPage() != null && page.getItemStackForPage().isItemEqual(stack)){ - list.add(StringUtil.ORANGE+"Click to see Recipe!"); + list.add(EnumChatFormatting.GOLD+"Click to see Recipe!"); if(Mouse.isButtonDown(0)){ gui.openChapter(page.getChapter(), page); + Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F)); } break; } diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java index 9a42d7f09..e2f4f52f7 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageCrafting.java @@ -57,7 +57,7 @@ public class PageCrafting extends BookletPage{ gui.unicodeRenderer.drawSplitString(StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0); } - gui.unicodeRenderer.drawSplitString(gui.currentPage.getText(), gui.guiLeft+14, gui.guiTop+112, 115, 0); + gui.unicodeRenderer.drawSplitString(gui.currentPage.getText(), gui.guiLeft+14, gui.guiTop+100, 115, 0); if(this.recipe != null){ diff --git a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageText.java b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageText.java index 08689070e..ff10121ea 100644 --- a/src/main/java/ellpeck/actuallyadditions/booklet/page/PageText.java +++ b/src/main/java/ellpeck/actuallyadditions/booklet/page/PageText.java @@ -11,8 +11,6 @@ package ellpeck.actuallyadditions.booklet.page; import ellpeck.actuallyadditions.booklet.GuiBooklet; -import ellpeck.actuallyadditions.util.ModUtil; -import ellpeck.actuallyadditions.util.StringUtil; public class PageText extends BookletPage{ @@ -20,11 +18,6 @@ public class PageText extends BookletPage{ super(id); } - @Override - public String getText(){ - return StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".chapter."+this.chapter.getUnlocalizedName()+".text."+this.id); - } - @Override public void render(GuiBooklet gui, int mouseX, int mouseY){ gui.unicodeRenderer.drawSplitString(gui.currentPage.getText(), gui.guiLeft+14, gui.guiTop+11, 115, 0); diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java index 45016a7d5..b1d439bba 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java @@ -38,6 +38,13 @@ public class BlockCrafting{ public static IRecipe recipePlacer; public static IRecipe recipeLiquidPlacer; public static IRecipe recipeLiquidCollector; + public static IRecipe recipeCase; + public static IRecipe recipeStoneCase; + public static IRecipe recipeEnderCase; + public static IRecipe recipeEnderPearlBlock; + public static IRecipe recipeESD; + public static IRecipe recipeAdvancedESD; + public static IRecipe recipePhantomBooster; public static void init(){ @@ -81,6 +88,7 @@ public class BlockCrafting{ 'W', "plankWood", 'R', "logWood", 'S', "stickWood")); + recipeCase = Util.lastIRecipe(); } //Ender Casing @@ -90,6 +98,7 @@ public class BlockCrafting{ 'W', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), 'R', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), 'S', Blocks.obsidian)); + recipeEnderCase = Util.lastIRecipe(); } //Phantom Booster @@ -99,6 +108,7 @@ public class BlockCrafting{ 'R', "dustRedstone", 'D', "gemDiamond", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDER_CASING.ordinal()))); + recipePhantomBooster = Util.lastIRecipe(); } //Coffee Machine @@ -261,6 +271,7 @@ public class BlockCrafting{ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()), "EE", "EE", 'E', Items.ender_pearl)); + recipeEnderPearlBlock = Util.lastIRecipe(); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.ender_pearl, 4), new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ENDERPEARL_BLOCK.ordinal()))); @@ -271,6 +282,7 @@ public class BlockCrafting{ 'W', "cobblestone", 'R', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 'S', "stickWood")); + recipeStoneCase = Util.lastIRecipe(); } //Quartz Block @@ -336,12 +348,14 @@ public class BlockCrafting{ 'W', "plankWood", 'C', new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), 'H', new ItemStack(Blocks.hopper))); + recipeESD = Util.lastIRecipe(); GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitBlocks.blockInputterAdvanced), InitBlocks.blockInputter, new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), "dustRedstone")); + recipeAdvancedESD = Util.lastIRecipe(); } //Crusher diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java index 86c524f6e..5dff36794 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java @@ -33,9 +33,18 @@ import net.minecraftforge.oredict.ShapelessOreRecipe; public class ItemCrafting{ public static IRecipe recipePhantomConnector; + public static IRecipe recipeCoil; + public static IRecipe recipeCoilAdvanced; + public static void init(){ + //Booklet + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemLexicon), new ItemStack(InitItems.itemCanolaSeed), new ItemStack(Items.paper))); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemLexicon), new ItemStack(InitItems.itemCoffeeSeed), new ItemStack(Items.paper))); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemLexicon), new ItemStack(InitItems.itemRiceSeed), new ItemStack(Items.paper))); + GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemLexicon), new ItemStack(InitItems.itemFlaxSeed), new ItemStack(Items.paper))); + //Rice Stuff if(ConfigCrafting.RICE_GADGETS.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.paper, 3), @@ -245,6 +254,7 @@ public class ItemCrafting{ " R ", "RIR", " R ", 'I', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 'R', "dustRedstone")); + recipeCoil = Util.lastIRecipe(); } //Cup @@ -267,6 +277,7 @@ public class ItemCrafting{ " G ", "GCG", " G ", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), 'G', "ingotGold")); + recipeCoilAdvanced = Util.lastIRecipe(); } //Ender Pearl diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java index debe77b3e..a9d543091 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java @@ -25,33 +25,38 @@ public class MiscCrafting{ public static void init(){ //Dough - if(ConfigCrafting.DOUGH.isEnabled()) + if(ConfigCrafting.DOUGH.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()), "cropWheat", "cropWheat")); + } //Rice Dough - if(ConfigCrafting.RICE_DOUGH.isEnabled()) + if(ConfigCrafting.RICE_DOUGH.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.RICE_DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()))); + } //Paper Cone - if(ConfigCrafting.PAPER_CONE.isEnabled()) + if(ConfigCrafting.PAPER_CONE.isEnabled()){ GameRegistry.addRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), "P P", " P ", 'P', new ItemStack(Items.paper)); + } //Knife Handle - if(ConfigCrafting.KNIFE_HANDLE.isEnabled()) + if(ConfigCrafting.KNIFE_HANDLE.isEnabled()){ GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()), "stickWood", new ItemStack(Items.leather))); + } //Knife Blade - if(ConfigCrafting.KNIFE_BLADE.isEnabled()) + if(ConfigCrafting.KNIFE_BLADE.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), "K", "K", "F", 'K', "ingotIron", 'F', new ItemStack(Items.flint))); + } } } diff --git a/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java b/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java index 594a4f899..7d12822ed 100644 --- a/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java +++ b/src/main/java/ellpeck/actuallyadditions/event/TooltipEvent.java @@ -16,6 +16,7 @@ import ellpeck.actuallyadditions.util.KeyUtil; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.StringUtil; import net.minecraft.item.Item; +import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.oredict.OreDictionary; @@ -23,15 +24,15 @@ import java.util.regex.Pattern; public class TooltipEvent{ - private static final String TEXT_PRE = StringUtil.GRAY+" "; - private static final String HEADER_PRE = StringUtil.LIGHT_GRAY+" -"; + private static final String TEXT_PRE = EnumChatFormatting.DARK_GRAY+" "; + private static final String HEADER_PRE = EnumChatFormatting.GRAY+" -"; @SubscribeEvent public void onTooltipEvent(ItemTooltipEvent event){ if(event.itemStack.getItem() != null){ if(ConfigBoolValues.CTRL_EXTRA_INFO.isEnabled()){ if(KeyUtil.isControlPressed()){ - event.toolTip.add(StringUtil.GRAY+StringUtil.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".extraInfo.desc")+":"); + event.toolTip.add(EnumChatFormatting.DARK_GRAY+""+EnumChatFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".extraInfo.desc")+":"); //OreDict Names int[] oreIDs = OreDictionary.getOreIDs(event.itemStack); @@ -65,12 +66,12 @@ public class TooltipEvent{ //Disabling Info for(String str : StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".disablingInfo.desc").split(Pattern.quote("|"))){ - event.toolTip.add(StringUtil.ITALIC+str); + event.toolTip.add(EnumChatFormatting.ITALIC+str); } } else{ if(ConfigBoolValues.CTRL_INFO_FOR_EXTRA_INFO.isEnabled()){ - event.toolTip.add(StringUtil.GRAY+StringUtil.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".ctrlForMoreInfo.desc")); + event.toolTip.add(EnumChatFormatting.DARK_GRAY+""+EnumChatFormatting.ITALIC+StringUtil.localize("tooltip."+ModUtil.MOD_ID_LOWER+".ctrlForMoreInfo.desc")); } } } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiInputter.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiInputter.java index e5297d71b..9d4f5b710 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiInputter.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiInputter.java @@ -27,6 +27,7 @@ import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import org.lwjgl.input.Keyboard; @@ -227,14 +228,14 @@ public class GuiInputter extends GuiContainer{ String text1 = this.tileInputter.isPullWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.blacklist"); if(x >= guiLeft+3 && y >= guiTop+16 && x <= guiLeft+18 && y <= guiTop+31){ ArrayList list = new ArrayList(); - list.add(StringUtil.BOLD+text1); + list.add(EnumChatFormatting.BOLD+text1); list.addAll(Arrays.asList(strings)); this.func_146283_a(list, x, y); } String text2 = this.tileInputter.isPutWhitelist ? StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.whitelist") : StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.blacklist"); if(x >= guiLeft+157 && y >= guiTop+16 && x <= guiLeft+172 && y <= guiTop+31){ ArrayList list = new ArrayList(); - list.add(StringUtil.BOLD+text2); + list.add(EnumChatFormatting.BOLD+text2); list.addAll(Arrays.asList(strings)); this.func_146283_a(list, x, y); } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiSmileyCloud.java b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiSmileyCloud.java index 68b6c8b74..55c14c09d 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiSmileyCloud.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/gui/GuiSmileyCloud.java @@ -23,6 +23,7 @@ import ellpeck.actuallyadditions.util.StringUtil; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiTextField; import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import org.lwjgl.input.Keyboard; @@ -55,7 +56,7 @@ public class GuiSmileyCloud extends GuiContainer{ @Override public void drawGuiContainerForegroundLayer(int x, int y){ - String name = cloud.name == null || cloud.name.isEmpty() ? "" : StringUtil.ORANGE+cloud.name+StringUtil.RESET+" "+StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.the")+" "; + String name = cloud.name == null || cloud.name.isEmpty() ? "" : EnumChatFormatting.GOLD+cloud.name+EnumChatFormatting.RESET+" "+StringUtil.localize("info."+ModUtil.MOD_ID_LOWER+".gui.the")+" "; String localizedName = name+StringUtil.localize("container."+ModUtil.MOD_ID_LOWER+".cloud.name"); this.fontRendererObj.drawString(localizedName, xSize/2-this.fontRendererObj.getStringWidth(localizedName)/2, -10, StringUtil.DECIMAL_COLOR_WHITE); } diff --git a/src/main/java/ellpeck/actuallyadditions/util/StringUtil.java b/src/main/java/ellpeck/actuallyadditions/util/StringUtil.java index be13614f9..9e91ac5e7 100644 --- a/src/main/java/ellpeck/actuallyadditions/util/StringUtil.java +++ b/src/main/java/ellpeck/actuallyadditions/util/StringUtil.java @@ -16,28 +16,6 @@ import java.util.Objects; public class StringUtil{ - public static final String BLACK = (char)167 + "0"; - public static final String BLUE = (char)167 + "1"; - public static final String GREEN = (char)167 + "2"; - public static final String TEAL = (char)167 + "3"; - public static final String RED = (char)167 + "4"; - public static final String PURPLE = (char)167 + "5"; - public static final String ORANGE = (char)167 + "6"; - public static final String LIGHT_GRAY = (char)167 + "7"; - public static final String GRAY = (char)167 + "8"; - public static final String LIGHT_BLUE = (char)167 + "9"; - public static final String BRIGHT_GREEN = (char)167 + "a"; - public static final String BRIGHT_BLUE = (char)167 + "b"; - public static final String LIGHT_RED = (char)167 + "c"; - public static final String PINK = (char)167 + "d"; - public static final String YELLOW = (char)167 + "e"; - public static final String WHITE = (char)167 + "f"; - public static final String BOLD = (char)167 + "l"; - public static final String UNDERLINE = (char)167 + "n"; - public static final String ITALIC = (char)167 + "o"; - public static final String OBFUSCATED = (char)167 + "k"; - public static final String RESET = (char)167 + "r"; - public static final int DECIMAL_COLOR_WHITE = 16777215; public static final int DECIMAL_COLOR_GRAY_TEXT = 4210752; diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index db3fe8849..6e8a267b8 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -362,6 +362,8 @@ achievement.actuallyadditions.craftPhantomEnergyface.desc=Craft a Phantom Energy achievement.actuallyadditions.openTreasureChest=You almost drowned!! achievement.actuallyadditions.openTreasureChest.desc=Open a Treasure Chest underwater +item.actuallyadditions.itemBooklet.name=Actually Additions Information Manual + booklet.actuallyadditions.indexEntry.misc.name=Miscellaneous booklet.actuallyadditions.indexEntry.functionalNoRF.name=Functional Blocks (No RF use) booklet.actuallyadditions.indexEntry.allAndSearch.name=All Items and Search @@ -388,24 +390,38 @@ booklet.actuallyadditions.chapter.foods.text.16=It's Toast. What more could I sa booklet.actuallyadditions.chapter.foods.text.17=Dough gets cooked into Baguette in a Furnace and can then join the french fries on their mission to achieve something or another. booklet.actuallyadditions.chapter.cloud.name=Smiley Cloud -booklet.actuallyadditions.chapter.cloud.text.1=A Smiley Cloud is a neat little block that you can put down in the world. When in place, it will hover around across the ground, though staying on the block you placed it in. When right-clicking the cloud, it will open a GUI that enables you to change its name, and thus, its appearance if you do it right. On the next page, you can find some examples you can try out. -booklet.actuallyadditions.chapter.cloud.text.2=The Crafting Recipe is shown above. If you want to know what certain name changes do, try naming a cloud "Ellpeck", "Glenthor" or "AcidBlues". +booklet.actuallyadditions.chapter.cloud.text.1=A Smiley Cloud is a neat little block that you can put down in the world. When in place, it will hover around across the ground, though staying on the block you placed it in. When right-clicking the cloud, it will open a GUI that enables you to change its name, and thus, its appearance if you do it right. On the next page, you can find some examples you can try out. +booklet.actuallyadditions.chapter.cloud.text.2=The Crafting Recipe is shown above. If you want to know what certain name changes do, try naming a cloud "Ellpeck", "Glenthor" or "AcidBlues". booklet.actuallyadditions.chapter.phantomfaces.name=Phantomfaces -booklet.actuallyadditions.chapter.phantomfaces.text.1=A Phantomface is a block that you can connect to any inventory by using a Phantom Connector. When connected, the phantomface will act as if it was the corresponding inventory, accepting Items from pipes and hoppers and having items be able to get pulled out of the face (the same applies for energyfaces with RF and liquifaces with fluids.) a Phantomfaces has a default range of 15 blocks that can be enlarged with Phantom Boosters. -booklet.actuallyadditions.chapter.phantomfaces.text.2=The normal Phantomface can connect to inventories like chests and furnaces, transfering Items into and out of them. -booklet.actuallyadditions.chapter.phantomfaces.text.3=The Phantom Liquiface can connect to tanks and such, allowing all types of liquids to be pumped through. Giving it a Redstone Signal will cause it to auto-output. -booklet.actuallyadditions.chapter.phantomfaces.text.4=The Phantom Energyface can connect to things like generators and crushers, allowing for RF to flow through them into and out of machines. -booklet.actuallyadditions.chapter.phantomfaces.text.5=Shift-Right-Click this onto any inventory and then on the Phantom Device to connect the two. +booklet.actuallyadditions.chapter.phantomfaces.text.1=A Phantomface is a block that you can connect to any inventory by using a Phantom Connector. When connected, the Phantomface will act as if it was the corresponding inventory, accepting Items from pipes and hoppers and having items be able to get pulled out of the face (the same applies for energyfaces with RF and liquifaces with fluids.) a Phantomfaces has a default range of 15 blocks that can be enlarged with Phantom Boosters. +booklet.actuallyadditions.chapter.phantomfaces.text.2=The normal Phantomface can connect to inventories like chests and furnaces, transfering Items into and out of them. +booklet.actuallyadditions.chapter.phantomfaces.text.3=The Phantom Liquiface can connect to tanks and such, allowing all types of liquids to be pumped through. Giving it a Redstone Signal will cause it to auto-output. +booklet.actuallyadditions.chapter.phantomfaces.text.4=The Phantom Energyface can connect to things like generators and crushers, allowing for RF to flow through them into and out of machines. +booklet.actuallyadditions.chapter.phantomfaces.text.5=Shift-Right-Click this onto any inventory and then on the Phantom Device to connect the two. +booklet.actuallyadditions.chapter.phantomfaces.text.6=The Phantom Booster boosts the range of all Phantom Devices. A Phantom device can have 3 at most stacked atop it, with every booster doubling the range the Phantom Device has. -booklet.actuallyadditions.chapter.phantomBreaker.name=&4Phantom&0 Breakers & Placers -booklet.actuallyadditions.chapter.phantomBreaker.text.1=Phantom Breakers and Placers have very similar mechanics to Phantomfaces: They can be connected to Blocks via Phantom Connectors and interact with the environment. Phantom Breakers and Placers only have a range of 3 blocks, however, in which they can destroy and place blocks in connected places. Shift-right-clicking will supply you with information about the connection, right-clicking normally will open its interface. -booklet.actuallyadditions.chapter.phantomBreaker.text.2=The Phantom Placer places Blocks that you supply it with. -booklet.actuallyadditions.chapter.phantomBreaker.text.3=The Phantom Placer breaks blocks and stores them in its internal inventory. -booklet.actuallyadditions.chapter.phantomBreaker.text.4=Shift-Right-Click this onto any inventory and then on the Phantom Device to connect the two. +booklet.actuallyadditions.chapter.phantomBreaker.name=Phantom Breakers & Placers +booklet.actuallyadditions.chapter.phantomBreaker.text.1=Phantom Breakers and Placers have similar mechanics to Phantomfaces: They can be connected via Phantom Connectors. Phantom Breakers and Placers have a range of 3 blocks, in which they can destroy and place blocks in connected places. Shift-right-clicking supplies you with information about the connection, right-clicking normally will open its interface. See the Phantomface Page for more information on Phantom Connectors and Phantom Boosters. +booklet.actuallyadditions.chapter.phantomBreaker.text.2=The Phantom Placer places Blocks that you supply it with. +booklet.actuallyadditions.chapter.phantomBreaker.text.3=The Phantom Breaker breaks blocks and stores them in its internal inventory. booklet.actuallyadditions.chapter.breaker.name=(Fluid) Placers & Breakers -booklet.actuallyadditions.chapter.breaker.text.1=The Breaker breaks Blocks in front of it and stores them in its internal inventory. That's it. -booklet.actuallyadditions.chapter.breaker.text.2=The Placer places Blocks that it has stored in its internal inventory in the world. Amazing. -booklet.actuallyadditions.chapter.breaker.text.3=The Fluid Placer places liquids that you supply it with, if they have a block, in the world. -booklet.actuallyadditions.chapter.breaker.text.4=The Fluid Collector collects liquids in front of it and stores them in its tank. \ No newline at end of file +booklet.actuallyadditions.chapter.breaker.text.1=The Breaker breaks Blocks in front of it and stores them in its internal inventory. That's it. +booklet.actuallyadditions.chapter.breaker.text.2=The Placer places Blocks that it has stored in its internal inventory in the world. Amazing. +booklet.actuallyadditions.chapter.breaker.text.3=The Fluid Placer places liquids that you supply it with, if they have a block, in the world. +booklet.actuallyadditions.chapter.breaker.text.4=The Fluid Collector collects liquids in front of it and stores them in its tank. + +booklet.actuallyadditions.chapter.craftingIngs.name=Crafting Ingredients +booklet.actuallyadditions.chapter.craftingIngs.text.1=There is a lot of Items in Actually Additions that need certain low-tier, basic items to be able to be crafted. Here is all of the items that don't have a purpose on their own, but are used in several crafting recipes making them really necessary and useful. +booklet.actuallyadditions.chapter.craftingIngs.text.2=The Coil is a low-tier item used for machines. +booklet.actuallyadditions.chapter.craftingIngs.text.3=The Advanced Coil is a higher tier item used for more advanced machines. +booklet.actuallyadditions.chapter.craftingIngs.text.4=The Wood Casing is a low-tier block used for machines. +booklet.actuallyadditions.chapter.craftingIngs.text.5=The Stone Casing is a middle-tier block used for machines. +booklet.actuallyadditions.chapter.craftingIngs.text.6=The Ender Pearl Block doesn't do anything on its own, but is used for Phantomfaces and the Ender Casing. +booklet.actuallyadditions.chapter.craftingIngs.text.7=The Ender Casing is a high-tier block used for machines. + +booklet.actuallyadditions.chapter.esd.name=ESDs +booklet.actuallyadditions.chapter.esd.text.1=The ESD is a block that basically works like an extremely advanced hopper. You can configure the sides and the exact range of slots to put into and pull from. When hovering over the parts of the ESD's GUI, you can see more in-depth info about it. +booklet.actuallyadditions.chapter.esd.text.2=The normal ESD doesn't have a specific item filter. It'll just pull and put everything it finds. +booklet.actuallyadditions.chapter.esd.text.3=The Advanced ESD has a filter, so that you can specify what to pull and put. \ No newline at end of file diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiBooklet.png b/src/main/resources/assets/actuallyadditions/textures/gui/guiBooklet.png index 71c88d5b4..5d05a8fe3 100644 Binary files a/src/main/resources/assets/actuallyadditions/textures/gui/guiBooklet.png and b/src/main/resources/assets/actuallyadditions/textures/gui/guiBooklet.png differ