Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Guide book
- $import %.guides.lang
- ${
- PC=practicalities
- M_CORE=${PC}:craftingPiece|1|0
- I_CORE=${PC}:craftingPiece|1|2
- D_ROD=${PC}:craftingPiece|1|3
- NORTH=${PC}:craftingPiece|1|4
- SOUTH=${PC}:craftingPiece|1|5
- IRON=minecraft:iron_ingot
- PEARL=minecraft:ender_pearl
- DIAMOND=minecraft:diamond
- MAGMA_CREAM=minecraft:magma_cream
- BLAZE_ROD=minecraft:blaze_rod
- STICK=minecraft:stick
- }
- guide.list.{
- root.text=Root node
- root.iconStack=${PC}:practicalGuide
- items.text=Items
- items.iconStack=${PC}:craftingPiece
- dev.text=§1Developer
- dev.iconStack=minecraft:redstone_torch
- }
- guide.entry.COPYME.{
- title=Shows in title card
- list.text=Shows in entry list
- list.iconStack=minecraft:item_in_entry_list
- page.{
- 0[
- Some text for the first page
- ]
- 1.type=recipe
- 1[
- [][][]
- [][minecraft:dirt][]
- [][][]
- [${DIAMOND}]
- ]
- }
- }
- guide.entry.example.{
- title=Example
- list.text=Feature Examples
- list.iconStack=minecraft:iron_pickaxe|2|111|{ench:[id:32,lvl:6]}
- page.{
- 0[
- All of the information in this guide is located in the language file, including recipes and all other information. §oNone§r of it is in the code.
- It is based on §oEntries§r, each entry can have many pages, and each page can be of one type. Though at this point only text and recipes are implemented. \
- A page is defined with at least two* lines in the lang file.
- §2§oguide.entry.ENTRYNAME.PAGE.type=TYPE
- guide.entry.ENTRYNAME.PAGE=CONTENT§r§0
- The type line can be either §otext§r or §orecipe§r, though if it doesn't exist it will default to §otext§r. \
- These formats will be discussed in further detail later.\n\nThe guide book will search forward from page 0->∞ for a plain \
- §2§o...PAGE=SOMETHING§r§0 line to determine the length of the guide, stopping once it finds one missing.
- *no type line is required for text
- ]
- 1.type=recipe
- 1[
- [] [minecraft:nether_star|1|0|{display:{Lore:["It's kind of overkill, don't you think?", "you > Yep, it is."]}}] []
- [minecraft:iron_pickaxe|1|111|{display:{Name:"SOmeNaMe"},ench:[{id:32,lvl:7268}]}] [${IRON}] [${IRON}]
- [${IRON}] [${IRON}] [${IRON}]
- [minecraft:iron_bars|3]
- ]
- 1.text[
- Recipes consist of 1 (1x1), 4 (2x2), or 9(3x3) items + one result item. The format for an item is as follows
- ¡ §7[§0item:id§7|§0stacksize§7|§0damage§7|§0{nbt}§7]§0
- Any part can be omitted off the end, so specifying the NBT requires also specifying the stack size and damage.
- ]
- 2.type=recipe
- 2=[][minecraft:cobblestone][minecraft:sand][][minecraft:nether_star]
- 2.text=That makes the previous recipe a bit better.
- 3.type=recipe
- 3=[minecraft:iron_pickaxe][minecraft:iron_pickaxe|1|111|{display:{Name:"SOmeNaMe"},ench:[{id:32,lvl:7268}]}]
- 3.text=That makes the recipe even better!
- 4[
- §nChecklist of things to do§r
- ■ add more types of pages.
- ¡ ■ single item display
- ¡ ■ single block display
- ]
- }
- }
- guide.entry.advancedLang.{
- title=Advanced Lang Files
- list.text=Advanced Language Files
- list.iconStack=minecraft:diamond_pickaxe
- page.0[
- The only place advanced language files are used are in the guide language files. \
- Guide lang files are not located in the normal §olang§r folder, instead they are located in the §oguides§r folder.
- Guide files are only loaded for the currently selected language, or en_US if the language file doesn't exist at all.
- If a page is defined in en_US, but not in the currently selected language, it won't appear.
- ]
- page.1[
- Advanced language files have three special things about them, they allow you to nest prefixes, multiline strings, and variables.
- §2
- ${
- ¡ name=thingy
- ¡ text=Thing™
- }
- some.lang.line.{
- ¡ item=Text stuff
- ¡ sub.{
- ¡ item=Another
- ¡ }
- ¡ text[
- ¡ Some long
- ¡ \${text}
- ¡ ]
- ¡ \${name}.var=Var®
- }§0
- The previous block translates to the following:
- §2
- some.lang.line.item=Text stuff
- some.lang.line.sub.item=Another
- some.lang.line.text=Some long\\nThing™
- some.lang.line.thingy.var=Var®
- ]
- page.2[
- §lBracket Groups§r
- §2tile.mymod.{
- ¡ myblock.name=My Block
- ¡ mygenerator.name=My Genny
- }§0
- Bracket groups allow you to define a common prefix for a region. Such as having all the translations for your blocks \
- start with §2tile.§0 to increase the readability of your language files.
- Groups begin with §2trans.late.{§0 and end with a line who's first non-whitespace character is §2}§0. The text before the curly brace \
- is directly prepended to the translations within, meaning most of the time you will want to add a period after the name and before the brace.
- ]
- page.3[
- §lText Blocks§r
- Text blocks allow you to define multiline blocks of text much more easily then you could with a normal lang file. They begin with a line contianing \
- §2some.name[§0 and end with a line who's first character is §2]§0. If you want to begin a line with a §2]§0, add a §2¡§0 character somewhere before it.
- Any whitespace you put after a §2¡§0 (upside down exclamation mark) character is safe.
- You can wrap lines in a text block without adding newlines by putting a backslash at the end of a line.
- §2trans.late[
- ¡ Here is a line.
- ¡ Here is another line. \
- ¡ This is on the same line.
- ¡
- ¡ Here is a paragraph.
- ¡ ¡ This is indented.
- ¡ ¡] Brackets are cool!
- ¡]§0
- ]
- page.4[
- §lVariables§r
- Variables help reduce the amount of repetition in language files by allowing you to re-use commonly used text.
- Variables are defined in a special area which starts with a line containing only §2${§0 \
- and ends with one containing only §2}§0. The variables are defined each on their own line with §2name=value§0. Names can only contain letters, numbers, and underscores.
- Variables are accessed by putting §2\${name}§0 anywhere in the lang file. Including other variables. If you want to put a literal §2\${*}§0 in your text you can \
- escape it with a backslash.
- ]
- }
- enchantment.level.7268=MMMMMMMCCLXVIII
- # Other pages
- guide.entry.intro.{
- title=Introduction
- list.text=Introduction
- list.iconStack=${PC}:practicalGuide
- page.0=This is the Practical Guide. It's a very practical thing to have around.
- }
- # magnet
- guide.entry.magnet.{
- title=Magnet
- list.text=Magnet
- list.iconStack=${PC}:magnet
- page.0.type=recipe
- page.0[
- [${SOUTH}][][${NORTH}]
- [${PEARL}][][${PEARL}]
- [${IRON}][${M_CORE}][${IRON}]
- [${PC}:magnet]
- ]
- page.0.text=The Magnet is one of the most useful items in Practicalities. Activate it by pressing Sneak+Activate (default is Shift+RClick).
- }
- # matter transporter
- guide.entry.transporter.{
- title=Matter Transporter
- list.text=Matter Transporter
- list.iconStack=${PC}:matterTransporter
- page.0.type=recipe
- page.0[
- [${PEARL}][][${PEARL}]
- [][${DIAMOND}][]
- [][${STICK}][]
- [${PC}:matterTransporter]
- ]
- page.0.text=The Matter Transporter allows the player to move nearly any block, including Monster Spawners and nearly all machines!
- }
- #sitis stick
- guide.entry.sitis.{
- title=Sitis Stick
- list.text=Sitis Stick
- list.iconStack=${PC}:sitisStick
- page.0.type=recipe
- page.0[
- [] [${DIAMOND}] []
- [${MAGMA_CREAM}] [${BLAZE_ROD}] [${MAGMA_CREAM}]
- [] [${BLAZE_ROD}] []
- [${PC}:sitisStick|1|0|{display:{Lore:["Latin for 'drought'"]}}]
- ]
- page.0.text=The Sitis Stick is capable of stopping the rain. Hold it in your hand and use it like a bow to turn the rainiest of days into sunshine.
- }
- # IMBUED TOOL
- guide.entry.imbuedTool.{
- title=Imbued Tool
- list.text=Imbued Tool
- list.iconStack=${PC}:imbuedTool
- page.0.type=recipe
- page.0[
- [${I_CORE}][${I_CORE}][${I_CORE}]
- [${I_CORE}][${D_ROD}] [${I_CORE}]
- [] [${D_ROD}] []
- [${PC}:imbuedTool]
- ]
- page.0.text=The Imbued Tool is an indestructible end-game mine-all pickaxe capable of destroying blocks instantly. Use with caution.
- }
- # IMBUED SWORD
- guide.entry.imbuedSword.{
- title=Imbued Sword
- list.text=Imbued Sword
- list.iconStack=${PC}:imbuedSword
- page.0.type=recipe
- page.0[
- [][${I_CORE}][]
- [][${I_CORE}][]
- [][${D_ROD}][]
- [${PC}:imbuedSword]
- ]
- page.0.text=The Imbued Sword is an indestructible end-game sword that can deal tremendous amounts of damage to your opponent.
- }
- # VOID BUCKET
- guide.entry.voidBucket.{
- title=Void Bucket
- list.text=Void bucket
- list.iconStack=${PC}:voidBucket
- page.0.type=recipe
- page.0[
- [${IRON}] [${PEARL}] [${IRON}]
- [] [${IRON}] []
- [] [] []
- [${PC}:voidBucket]
- ]
- page.0.text=The Void Bucket voids any liquid it picks up. A great way to clear lava lakes or small ponds.
- }
- # NETHERBANE
- guide.entry.netherbane.{
- title=Netherbane
- list.text=Netherbane
- list.iconStack=${PC}:netherbane
- page.0.type=display
- page.0=The Netherbane's existence is disputed. Some say it is "creative only", but some players have found a way to legitimately get it in survival.
- page.0.item=${PC}:netherbane|1|0|{display:{Lore:["It glimmers like a black diamond"]}}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement