mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Changed some Booklet stuff
This commit is contained in:
parent
19ee548771
commit
3222dc2d95
7 changed files with 23 additions and 12 deletions
|
@ -14,6 +14,8 @@ public class GuiHandler implements IGuiHandler{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getServerGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){
|
public Object getServerGuiElement(int id, EntityPlayer entityPlayer, World world, int x, int y, int z){
|
||||||
|
if(id == GuiTypes.BOOK.ordinal()) return null;
|
||||||
|
|
||||||
TileEntityBase tile = null;
|
TileEntityBase tile = null;
|
||||||
if(id != GuiTypes.CRAFTER.ordinal() && id != GuiTypes.DRILL.ordinal()){
|
if(id != GuiTypes.CRAFTER.ordinal() && id != GuiTypes.DRILL.ordinal()){
|
||||||
tile = (TileEntityBase)world.getTileEntity(x, y, z);
|
tile = (TileEntityBase)world.getTileEntity(x, y, z);
|
||||||
|
|
|
@ -14,6 +14,7 @@ public class BookletChapter{
|
||||||
|
|
||||||
this.unlocalizedName = unlocalizedName;
|
this.unlocalizedName = unlocalizedName;
|
||||||
entry.addChapter(this);
|
entry.addChapter(this);
|
||||||
|
InitBooklet.allAndSearch.addChapter(this);
|
||||||
this.entry = entry;
|
this.entry = entry;
|
||||||
|
|
||||||
for(IBookletPage page : this.pages){
|
for(IBookletPage page : this.pages){
|
||||||
|
|
|
@ -178,7 +178,7 @@ public class GuiBooklet extends GuiScreen{
|
||||||
}
|
}
|
||||||
else if(button.id == BUTTON_RETURN_ID){
|
else if(button.id == BUTTON_RETURN_ID){
|
||||||
if(this.currentChapter != null){
|
if(this.currentChapter != null){
|
||||||
this.openIndexEntry(this.currentChapter.entry, this.pageOpenInIndex);
|
this.openIndexEntry(this.currentIndexEntry, this.pageOpenInIndex);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.openIndexEntry(null, 1);
|
this.openIndexEntry(null, 1);
|
||||||
|
|
|
@ -14,13 +14,14 @@ public class InitBooklet{
|
||||||
|
|
||||||
public static BookletIndexEntry entryFunctionalNonRF = new BookletIndexEntry("functionalNoRF");
|
public static BookletIndexEntry entryFunctionalNonRF = new BookletIndexEntry("functionalNoRF");
|
||||||
public static BookletIndexEntry entryMisc = new BookletIndexEntry("misc");
|
public static BookletIndexEntry entryMisc = new BookletIndexEntry("misc");
|
||||||
|
public static BookletIndexEntry allAndSearch = new BookletIndexEntry("allAndSearch");
|
||||||
|
|
||||||
static{
|
static{
|
||||||
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())));
|
|
||||||
|
|
||||||
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("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 BookletChapter("phantomfaces", entryFunctionalNonRF, new PageText(1), new PageCrafting(2, BlockCrafting.recipePhantomface), new PageCrafting(3, BlockCrafting.recipeLiquiface), new PageCrafting(4, BlockCrafting.recipeEnergyface));
|
||||||
new BookletChapter("phantomBreaker", entryFunctionalNonRF, new PageText(1), new PageCrafting(2, BlockCrafting.recipePhantomPlacer), new PageCrafting(3, BlockCrafting.recipePhantomBreaker));
|
new BookletChapter("phantomBreaker", entryFunctionalNonRF, new PageText(1), new PageCrafting(2, BlockCrafting.recipePhantomPlacer), new PageCrafting(3, BlockCrafting.recipePhantomBreaker));
|
||||||
|
|
||||||
|
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())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package ellpeck.actuallyadditions.inventory.gui.booklet;
|
package ellpeck.actuallyadditions.inventory.gui.booklet;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||||
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import ellpeck.actuallyadditions.util.Util;
|
import ellpeck.actuallyadditions.util.Util;
|
||||||
import net.minecraft.client.renderer.RenderHelper;
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
import net.minecraft.client.renderer.entity.RenderItem;
|
import net.minecraft.client.renderer.entity.RenderItem;
|
||||||
|
@ -34,7 +36,7 @@ public class PageCrafting extends PageText{
|
||||||
@Override
|
@Override
|
||||||
public void render(GuiBooklet gui, int mouseX, int mouseY){
|
public void render(GuiBooklet gui, int mouseX, int mouseY){
|
||||||
if(this.recipe == null){
|
if(this.recipe == null){
|
||||||
gui.unicodeRenderer.drawSplitString("The crafting recipe for this item is disabled in the Config File! If you're on a server, ask the server author to enable it in the config. If you're on a client, press the 'Open Config'-Button on the top right and enable the recipe!", gui.guiLeft+14, gui.guiTop+15, 115, 0);
|
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+112, 115, 0);
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package ellpeck.actuallyadditions.inventory.gui.booklet;
|
package ellpeck.actuallyadditions.inventory.gui.booklet;
|
||||||
|
|
||||||
|
import ellpeck.actuallyadditions.util.ModUtil;
|
||||||
|
import ellpeck.actuallyadditions.util.StringUtil;
|
||||||
import net.minecraft.client.renderer.RenderHelper;
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
import net.minecraft.client.renderer.entity.RenderItem;
|
import net.minecraft.client.renderer.entity.RenderItem;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -29,7 +31,7 @@ public class PageFurnace extends PageText{
|
||||||
public void render(GuiBooklet gui, int mouseX, int mouseY){
|
public void render(GuiBooklet gui, int mouseX, int mouseY){
|
||||||
ItemStack input = this.getInputForOutput(this.result);
|
ItemStack input = this.getInputForOutput(this.result);
|
||||||
if(input == null){
|
if(input == null){
|
||||||
gui.unicodeRenderer.drawSplitString("The crafting recipe for this item is disabled in the Config File! If you're on a server, ask the server author to enable it in the config. If you're on a client, press the 'Open Config'-Button on the top right and enable the recipe!", gui.guiLeft+14, gui.guiTop+15, 115, 0);
|
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+112, 115, 0);
|
||||||
|
|
|
@ -364,21 +364,24 @@ achievement.actuallyadditions.openTreasureChest.desc=Open a Treasure Chest under
|
||||||
|
|
||||||
booklet.actuallyadditions.indexEntry.misc.name=Miscellaneous
|
booklet.actuallyadditions.indexEntry.misc.name=Miscellaneous
|
||||||
booklet.actuallyadditions.indexEntry.functionalNoRF.name=Functional Blocks (No RF use)
|
booklet.actuallyadditions.indexEntry.functionalNoRF.name=Functional Blocks (No RF use)
|
||||||
|
booklet.actuallyadditions.indexEntry.allAndSearch.name=All Items (Search not implemented)
|
||||||
|
|
||||||
|
booklet.actuallyadditions.recipeDisabled=The crafting recipe for this item is disabled in the Config File! If you're on a server, ask the server author to enable it in the config. If you're on a client, press the 'Open Config'-Button on the top right and enable the recipe!
|
||||||
|
|
||||||
booklet.actuallyadditions.chapter.foods.name=Food
|
booklet.actuallyadditions.chapter.foods.name=Food
|
||||||
booklet.actuallyadditions.chapter.foods.text.1=A Pizza is round, delicious and tastes of tomatoes, cheese and deliciousness. Yum!
|
booklet.actuallyadditions.chapter.foods.text.1=A Pizza is round, delicious and tastes of tomatoes, cheese and deliciousness. Yum!
|
||||||
booklet.actuallyadditions.chapter.foods.text.2=Rice Bread is made in a furnace from rice dough, which can be made from rice. It tastes of a combination of rice and bread. Because that's what it is, I guess.
|
booklet.actuallyadditions.chapter.foods.text.2=Rice Bread is made in a furnace from rice dough, which can be made from rice. It tastes of a combination of rice and bread. Because that's what it is, I guess.
|
||||||
booklet.actuallyadditions.chapter.foods.text.3=It's hammy, and it's burgr'y, and it makes you want to sing, it's a Haaaaaaamuuuuurgeeeeeer *cough* It's from a german city: Hamburg! ...You learn something new every day.
|
booklet.actuallyadditions.chapter.foods.text.3=It's two slices of bread with a piece of meat, cheese and some salad between it. Could have originated in Hamburg, Germany.
|
||||||
booklet.actuallyadditions.chapter.foods.text.4=Reminds me of something. Hmmm... Subway?
|
booklet.actuallyadditions.chapter.foods.text.4=It's like a normal cookie, but more chocolate-y and bigger.
|
||||||
booklet.actuallyadditions.chapter.foods.text.5=Reminds me of something. Hmmm... Wubsay?
|
booklet.actuallyadditions.chapter.foods.text.5=It's a baguette cut open, containing cheese, salad, fish and some other goodies, wrapped in paper.
|
||||||
booklet.actuallyadditions.chapter.foods.text.6=A pity it isn't waving a white flaaaaaaaaa.. flake. Of corn. A white cornflake.
|
booklet.actuallyadditions.chapter.foods.text.6=Some people call it "French Stick". We just call it "Baguette".
|
||||||
booklet.actuallyadditions.chapter.foods.text.7=Or chips, if you're not american!
|
booklet.actuallyadditions.chapter.foods.text.7=Or chips, if you're not american!
|
||||||
booklet.actuallyadditions.chapter.foods.text.8=It's a paper container filled with fries and fish. What more could you want?
|
booklet.actuallyadditions.chapter.foods.text.8=It's a paper container filled with fries and fish. What more could you want?
|
||||||
booklet.actuallyadditions.chapter.foods.text.9=Someone might reeeeally like this.
|
booklet.actuallyadditions.chapter.foods.text.9=Someone might really like this.
|
||||||
booklet.actuallyadditions.chapter.foods.text.10=I somehow have a weird song stuck in my head where someone just repeatedly goes "Pumpkin pumpkin pumpkin blur, pumpkin blur, pumpkin blur"...
|
booklet.actuallyadditions.chapter.foods.text.10=I somehow have a weird song stuck in my head where someone just repeatedly goes "Pumpkin pumpkin pumpkin blur, pumpkin blur, pumpkin blur"...
|
||||||
booklet.actuallyadditions.chapter.foods.text.11=It's like Tomato Juice, only that you don't always get it on a plane.
|
booklet.actuallyadditions.chapter.foods.text.11=It's like Tomato Juice, only that you don't always get it on a plane.
|
||||||
booklet.actuallyadditions.chapter.foods.text.12=It's a bowl with 3 noodles in it. It must be a really big bowl, I guess.
|
booklet.actuallyadditions.chapter.foods.text.12=It's a bowl with 3 noodles in it. It must be a really big bowl, I guess.
|
||||||
booklet.actuallyadditions.chapter.foods.text.13=THERE are those noodles! I've been searching for them for ages!
|
booklet.actuallyadditions.chapter.foods.text.13=It's just a paper container filled with noodles. Like you get in your local supermarket. If you have one local.
|
||||||
booklet.actuallyadditions.chapter.foods.text.14=Lari likes.
|
booklet.actuallyadditions.chapter.foods.text.14=Lari likes.
|
||||||
booklet.actuallyadditions.chapter.foods.text.15=It's chocolate cake. Who wouldn't like it!?
|
booklet.actuallyadditions.chapter.foods.text.15=It's chocolate cake. Who wouldn't like it!?
|
||||||
booklet.actuallyadditions.chapter.foods.text.16=It's Toast. What more could I say?
|
booklet.actuallyadditions.chapter.foods.text.16=It's Toast. What more could I say?
|
||||||
|
|
Loading…
Reference in a new issue