mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-23 03:49:22 +01:00
Added more lexicon entries and stuff and things
This commit is contained in:
parent
264bdefb98
commit
ecf4a6bf7c
14 changed files with 106 additions and 75 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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())));
|
||||
}
|
||||
|
|
|
@ -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("<imp>", EnumChatFormatting.DARK_GREEN+"").replaceAll("<item>", EnumChatFormatting.BLUE+"").replaceAll("<r>", 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;
|
||||
}
|
||||
|
|
|
@ -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){
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 <item>Smiley Cloud<r> 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 <imp>"Ellpeck"<r>, <imp>"Glenthor"<r> or <imp>"AcidBlues"<r>.
|
||||
|
||||
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 <item>Phantomface<r> is a block that you can <imp>connect to any inventory<r> by using a <item>Phantom Connector<r>. When connected, the Phantomface will <imp>act as if it was the corresponding inventory<r>, accepting Items from pipes and hoppers and having items be able to get pulled out of the face (the same applies for <item>energyfaces<r> with RF and <item>liquifaces<r> with fluids.) a <item>Phantomfaces<r> has a default <imp>range of 15 blocks<r> that can be enlarged with <item>Phantom Boosters<r>.
|
||||
booklet.actuallyadditions.chapter.phantomfaces.text.2=The normal <item>Phantomface<r> can connect to inventories like chests and furnaces, transfering Items into and out of them.
|
||||
booklet.actuallyadditions.chapter.phantomfaces.text.3=The <item>Phantom Liquiface<r> 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 <item>Phantom Energyface<r> 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=<imp>Shift-Right-Click<r> this onto any inventory and then on the Phantom Device to connect the two.
|
||||
booklet.actuallyadditions.chapter.phantomfaces.text.6=The <item>Phantom Booster<r> boosts the range of all <imp>Phantom Devices<r>. A Phantom device can have <imp>3<r> at most stacked atop it, with every booster <imp>doubling<r> 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=<item>Phantom Breakers<r> and <item>Placers<r> have similar mechanics to <item>Phantomfaces<r>: They can be connected via <item>Phantom Connectors<r>. <item>Phantom Breakers<r> and <item>Placers<r> have a <imp>range of 3 blocks<r>, in which they can destroy and place blocks in connected places. <imp>Shift-right-clicking<r> supplies you with <imp>information about the connection<r>, <imp>right-clicking<r> normally will <imp>open its interface<r>. See the <imp>Phantomface Page<r> for more information on <item>Phantom Connectors<r> and <item>Phantom Boosters<r>.
|
||||
booklet.actuallyadditions.chapter.phantomBreaker.text.2=The <item>Phantom Placer<r> places Blocks that you supply it with.
|
||||
booklet.actuallyadditions.chapter.phantomBreaker.text.3=The <item>Phantom Breaker<r> 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.
|
||||
booklet.actuallyadditions.chapter.breaker.text.1=The <item>Breaker<r> breaks Blocks in front of it and stores them in its internal inventory. That's it.
|
||||
booklet.actuallyadditions.chapter.breaker.text.2=The <item>Placer<r> places Blocks that it has stored in its internal inventory in the world. Amazing.
|
||||
booklet.actuallyadditions.chapter.breaker.text.3=The <item>Fluid Placer<r> places liquids that you supply it with, if they have a block, in the world.
|
||||
booklet.actuallyadditions.chapter.breaker.text.4=The <item>Fluid Collector<r> 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 <imp>Actually Additions<r> 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 <imp>used in several crafting recipes<r> making them really necessary and useful.
|
||||
booklet.actuallyadditions.chapter.craftingIngs.text.2=The <item>Coil<r> is a low-tier item used for machines.
|
||||
booklet.actuallyadditions.chapter.craftingIngs.text.3=The <item>Advanced Coil<r> is a higher tier item used for more advanced machines.
|
||||
booklet.actuallyadditions.chapter.craftingIngs.text.4=The <item>Wood Casing<r> is a low-tier block used for machines.
|
||||
booklet.actuallyadditions.chapter.craftingIngs.text.5=The <item>Stone Casing<r> is a middle-tier block used for machines.
|
||||
booklet.actuallyadditions.chapter.craftingIngs.text.6=The <item>Ender Pearl<r> Block doesn't do anything on its own, but is used for Phantomfaces and the Ender Casing.
|
||||
booklet.actuallyadditions.chapter.craftingIngs.text.7=The <item>Ender Casing<r> is a high-tier block used for machines.
|
||||
|
||||
booklet.actuallyadditions.chapter.esd.name=ESDs
|
||||
booklet.actuallyadditions.chapter.esd.text.1=The <item>ESD<r> is a block that basically works like an <imp>extremely advanced hopper<r>. You can <imp>configure the sides<r> and the <imp>exact range of slots to put into and pull from<r>. When hovering over the parts of the <item>ESD<r>'s GUI, you can see more in-depth info about it.
|
||||
booklet.actuallyadditions.chapter.esd.text.2=The normal <item>ESD<r> doesn't have a specific item filter. It'll just pull and put everything it finds.
|
||||
booklet.actuallyadditions.chapter.esd.text.3=The <item>Advanced ESD<r> has a filter, so that you can specify what to pull and put.
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
Loading…
Reference in a new issue