mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 16:58:34 +01:00
Removed unfinished-tags in booklet and also made buttons client-side only
This commit is contained in:
parent
08f141939f
commit
a4c751b47f
7 changed files with 13 additions and 17 deletions
|
@ -199,9 +199,6 @@ public class BookletUtils{
|
||||||
else if(button instanceof TexturedButton){
|
else if(button instanceof TexturedButton){
|
||||||
booklet.drawHoveringText(((TexturedButton)button).textList, mouseX, mouseY);
|
booklet.drawHoveringText(((TexturedButton)button).textList, mouseX, mouseY);
|
||||||
}
|
}
|
||||||
else if(button instanceof IndexButton){
|
|
||||||
((IndexButton)button).drawHover(mouseX, mouseY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class InitBooklet{
|
||||||
new BookletChapter("phantomRedstoneface", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomRedstoneface), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipePhantomRedstoneface).setNoText());
|
new BookletChapter("phantomRedstoneface", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomRedstoneface), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipePhantomRedstoneface).setNoText());
|
||||||
new BookletChapter("phantomBreaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomBreaker), new PageTextOnly(1).addTextReplacement("<range>", TileEntityPhantomPlacer.RANGE), new PageCrafting(2, BlockCrafting.recipePhantomPlacer).setNoText(), new PageCrafting(3, BlockCrafting.recipePhantomBreaker).setNoText());
|
new BookletChapter("phantomBreaker", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockPhantomBreaker), new PageTextOnly(1).addTextReplacement("<range>", TileEntityPhantomPlacer.RANGE), new PageCrafting(2, BlockCrafting.recipePhantomPlacer).setNoText(), new PageCrafting(3, BlockCrafting.recipePhantomBreaker).setNoText());
|
||||||
new BookletChapter("esd", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockInputterAdvanced), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial();
|
new BookletChapter("esd", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockInputterAdvanced), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeESD).setNoText(), new PageCrafting(3, BlockCrafting.recipeAdvancedESD).setNoText()).setSpecial();
|
||||||
new BookletChapter("xpSolidifier", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockXPSolidifier), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemSolidifiedExperience)), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setSpecial().setIncomplete();
|
new BookletChapter("xpSolidifier", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockXPSolidifier), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemSolidifiedExperience)), new PageCrafting(2, BlockCrafting.recipeSolidifier).setNoText()).setSpecial();
|
||||||
new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGreenhouseGlass), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass));
|
new BookletChapter("greenhouseGlass", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockGreenhouseGlass), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeGlass));
|
||||||
new BookletChapter("fishingNet", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText());
|
new BookletChapter("fishingNet", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFishingNet), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFisher).setNoText());
|
||||||
new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText());
|
new BookletChapter("feeder", ActuallyAdditionsAPI.entryFunctionalNonRF, new ItemStack(InitBlocks.blockFeeder), new PageTextOnly(1), new PageCrafting(2, BlockCrafting.recipeFeeder).setNoText());
|
||||||
|
@ -135,7 +135,7 @@ public class InitBooklet{
|
||||||
}
|
}
|
||||||
new BookletChapter("aiots", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.emeraldPaxel), aiotPages.toArray(new BookletPage[aiotPages.size()])).setImportant();
|
new BookletChapter("aiots", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.emeraldPaxel), aiotPages.toArray(new BookletPage[aiotPages.size()])).setImportant();
|
||||||
|
|
||||||
new BookletChapter("jams", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemJams), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemJams, 1, Util.WILDCARD)), new PagePicture(2, "pageJamHouse", 150), new PageTextOnly(3)).setIncomplete();
|
new BookletChapter("jams", ActuallyAdditionsAPI.entryItemsNonRF, new ItemStack(InitItems.itemJams), new PageTextOnly(1).setStack(new ItemStack(InitItems.itemJams, 1, Util.WILDCARD)), new PagePicture(2, "pageJamHouse", 150), new PageTextOnly(3));
|
||||||
|
|
||||||
ArrayList<BookletPage> potionRingPages = new ArrayList<BookletPage>();
|
ArrayList<BookletPage> potionRingPages = new ArrayList<BookletPage>();
|
||||||
potionRingPages.add(new PageTextOnly(potionRingPages.size()+1));
|
potionRingPages.add(new PageTextOnly(potionRingPages.size()+1));
|
||||||
|
|
|
@ -21,9 +21,12 @@ import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public class BookmarkButton extends GuiButton{
|
public class BookmarkButton extends GuiButton{
|
||||||
|
|
||||||
private final GuiBooklet booklet;
|
private final GuiBooklet booklet;
|
||||||
|
|
|
@ -20,7 +20,10 @@ import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.util.text.TextFormatting;
|
import net.minecraft.util.text.TextFormatting;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public class IndexButton extends GuiButton{
|
public class IndexButton extends GuiButton{
|
||||||
|
|
||||||
private final GuiBooklet gui;
|
private final GuiBooklet gui;
|
||||||
|
@ -60,10 +63,4 @@ public class IndexButton extends GuiButton{
|
||||||
this.gui.getFontRenderer().drawString(this.displayString, this.xPosition+textOffsetX, this.yPosition+(this.height-8)/2, 0);
|
this.gui.getFontRenderer().drawString(this.displayString, this.xPosition+textOffsetX, this.yPosition+(this.height-8)/2, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawHover(int mouseX, int mouseY){
|
|
||||||
if(this.chap instanceof BookletChapter && ((BookletChapter)this.chap).isIncomplete){
|
|
||||||
this.gui.drawHoveringText(this.gui.getFontRenderer().listFormattedStringToWidth(TextFormatting.RED+StringUtil.localize("booklet."+ModUtil.MOD_ID+".unavailable"), 250), mouseX, mouseY);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,10 +14,13 @@ import de.ellpeck.actuallyadditions.mod.booklet.GuiBooklet;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public class TexturedButton extends GuiButton{
|
public class TexturedButton extends GuiButton{
|
||||||
|
|
||||||
public final List textList = new ArrayList();
|
public final List textList = new ArrayList();
|
||||||
|
|
|
@ -27,8 +27,6 @@ public class BookletChapter implements IBookletChapter{
|
||||||
private final String unlocalizedName;
|
private final String unlocalizedName;
|
||||||
public TextFormatting color;
|
public TextFormatting color;
|
||||||
|
|
||||||
public boolean isIncomplete;
|
|
||||||
|
|
||||||
public BookletChapter(String unlocalizedName, IBookletEntry entry, ItemStack displayStack, BookletPage... pages){
|
public BookletChapter(String unlocalizedName, IBookletEntry entry, ItemStack displayStack, BookletPage... pages){
|
||||||
this.pages = pages.clone();
|
this.pages = pages.clone();
|
||||||
|
|
||||||
|
@ -75,10 +73,6 @@ public class BookletChapter implements IBookletChapter{
|
||||||
return this.displayStack;
|
return this.displayStack;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIncomplete(){
|
|
||||||
this.isIncomplete = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setImportant(){
|
public void setImportant(){
|
||||||
this.color = TextFormatting.DARK_GREEN;
|
this.color = TextFormatting.DARK_GREEN;
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,6 +269,7 @@ public class GuiInputter extends GuiContainer{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public static class SmallerButton extends GuiButton{
|
public static class SmallerButton extends GuiButton{
|
||||||
|
|
||||||
public final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiInputter");
|
public final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiInputter");
|
||||||
|
@ -306,6 +307,7 @@ public class GuiInputter extends GuiContainer{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public static class TinyButton extends GuiButton{
|
public static class TinyButton extends GuiButton{
|
||||||
|
|
||||||
public final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiInputter");
|
public final ResourceLocation resLoc = AssetUtil.getGuiLocation("guiInputter");
|
||||||
|
|
Loading…
Reference in a new issue