mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-21 12:42:50 +00:00
The very first entry has been written :D
This commit is contained in:
1 parent
5ddacaa523
commit
70adf9ad28
5 files changed
+29
-17
No files matched your search
@@ -41,14 +41,8 @@ public final class LexiconData {
|
||||
LexiconEntry entry;
|
||||
|
||||
// BASICS ENTRIES
|
||||
entry = new BLexiconEntry("world", categoryBasics);
|
||||
entry.setLexiconPages(new PageText("0"), new PageText("1"), new PageImage("2", LibResources.ENTRY_FLOWERS), new PageCraftingRecipes("3", ModCrafingRecipes.recipesPetals), new PageCraftingRecipes("4", ModCrafingRecipes.recipePestleAndMortar), new PageCraftingRecipes("5", ModCrafingRecipes.recipesDyes));
|
||||
|
||||
entry = new BLexiconEntry("basicConcepts", categoryBasics);
|
||||
entry.setLexiconPages(new PageText("0"), new PageText("1"));
|
||||
|
||||
entry = new BLexiconEntry("gettingStarted", categoryBasics);
|
||||
entry.setLexiconPages(new PageText("0"));
|
||||
entry = new BLexiconEntry(LibLexicon.BASICS_FLOWERS, categoryBasics);
|
||||
entry.setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_FLOWERS), new PageText("2"), new PageCraftingRecipes("3", ModCrafingRecipes.recipesPetals), new PageCraftingRecipes("4", ModCrafingRecipes.recipePestleAndMortar), new PageCraftingRecipes("5", ModCrafingRecipes.recipesDyes));
|
||||
|
||||
// ENERGY ENTRIES
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.StringUtils;
|
||||
import vazkii.botania.api.internal.IGuiLexiconEntry;
|
||||
import vazkii.botania.api.page.LexiconPage;
|
||||
import vazkii.botania.client.core.helper.FontHelper;
|
||||
@@ -30,9 +31,9 @@ public class PageText extends LexiconPage {
|
||||
|
||||
@Override
|
||||
public void renderScreen(IGuiLexiconEntry gui, int mx, int my) {
|
||||
int width = gui.getWidth() - 30;
|
||||
int width = gui.getWidth() - 34;
|
||||
int x = gui.getLeft() + 16;
|
||||
int y = gui.getTop();
|
||||
int y = gui.getTop() + 2;
|
||||
|
||||
renderText(x, y, width, gui.getHeight(), getUnlocalizedName());
|
||||
}
|
||||
@@ -45,6 +46,7 @@ public class PageText extends LexiconPage {
|
||||
String[] textEntries = text.split("<br>");
|
||||
|
||||
String lastFormat = "";
|
||||
String pendingFormat = "";
|
||||
for(String s : textEntries) {
|
||||
List<String> wrappedLines = new ArrayList();
|
||||
String workingOn = "";
|
||||
@@ -52,7 +54,21 @@ public class PageText extends LexiconPage {
|
||||
int i = 0;
|
||||
String[] tokens = s.split(" ");
|
||||
for(String s1 : tokens) {
|
||||
boolean skipPending = false;
|
||||
String format = FontHelper.getFormatFromString(s1);
|
||||
|
||||
if(!format.isEmpty() && s1.length() > 0 && s1.charAt(0) != '\u00a7') {
|
||||
skipPending = true;
|
||||
pendingFormat = format;
|
||||
format = "";
|
||||
s1 = StringUtils.stripControlCodes(s1);
|
||||
}
|
||||
|
||||
if(!pendingFormat.isEmpty() && !skipPending) {
|
||||
format = pendingFormat;
|
||||
pendingFormat = "";
|
||||
}
|
||||
|
||||
if(MathHelper.stringNullOrLengthZero(format))
|
||||
format = lastFormat;
|
||||
|
||||
|
||||
@@ -21,5 +21,7 @@ public final class LibLexicon {
|
||||
public static final String CATEGORY_DEVICES = CATEGORY_PREFIX + "devices";
|
||||
public static final String CATEGORY_TOOLS = CATEGORY_PREFIX + "tools";
|
||||
public static final String CATEGORY_MISC = CATEGORY_PREFIX + "misc";
|
||||
|
||||
public static final String BASICS_FLOWERS = "flowers";
|
||||
|
||||
}
|
||||
@@ -76,13 +76,13 @@ botania.category.misc=Miscellaneous
|
||||
|
||||
# - BASIC
|
||||
# -- THE WORLD
|
||||
botania.entry.world=The World
|
||||
botania.page.world0=The world is fun.<br>This line of text is very long so I can test if line wrap works fine, woo.<br>And this one is kinda long too. &eTesting colors. &cMore colors.
|
||||
botania.page.world1=This is a second page. There will be something here. Eventually.
|
||||
botania.page.world2=Flowers in the wild
|
||||
botania.page.world3=Plucking petals off flowers
|
||||
botania.page.world4=Pestle and Mortar
|
||||
botania.page.world5=Grinding petals into dye
|
||||
botania.entry.flowers=Mystical Flowers
|
||||
botania.page.flowers0=Around the world, you may stumble upon a large variety of Mystical Flora. Spotting these doesn't take much work as the flowers themselves emit a fair amount of shine.<br>They come in a total of &416 &0different colors.
|
||||
botania.page.flowers1=Flowers as far as the eye can see...
|
||||
botania.page.flowers2=These flowers can be plucked for &1Mystical Petals&0, that can be used for making magical instruments and plants alike.<br>These petals can also be crushed into &1Floral Dye&0, by the use of a &1Pestle and Mortar&0, which function much alike any mundane piece of dye.
|
||||
botania.page.flowers3=Plucking Petals off Flowers
|
||||
botania.page.flowers4=Crafting the &1Pestle and Mortar
|
||||
botania.page.flowers5=Grinding Petals into Dye
|
||||
|
||||
# -- BASIC CONCEPTS
|
||||
botania.entry.basicConcepts=Basic Concepts
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 29 KiB |
Reference in new issue
Block a user