1
0
mirror of https://github.com/HybridDog/nether-pack.git synced 2025-06-29 14:41:05 +02:00

1 Commits

Author SHA1 Message Date
dbcd72aa25 try html formspec:
problems:
* image width and height doesn't seem to work
* font is too small
2022-08-19 11:18:17 +02:00
9 changed files with 453 additions and 273 deletions

View File

@ -3,9 +3,13 @@ https://forum.minetest.net/viewtopic.php?f=9&t=10265
TODO: TODO:
* Mapgen: Find a way to get the perlin noise values inside [-1; 1] or use * Find a way to get the perlin noise inside [-1; 1] or use another noise
another noise. * Add some node which containing items to the simple pyramid "buildings"
The problem is visible in the nether forest, where the mapgen code flattens * Change the sky background, fog, etc. in the nether
the ceiling if it is very high. * Improve the guide formspec.
* Mapgen: Generate more detail inside the simple pyramid-like "buildings", Writing it in Markdown would be nice.
e.g. add a small treasure chest node which contains items These could be useful:
* https://forum.minetest.net/viewtopic.php?t=23855
Minetest Bedrock Markup Language
* https://github.com/mpeterv/markdown
Markdown to HTML converter; Minetest formspecs support HTML

View File

@ -4,7 +4,7 @@ read_globals = {
"string", "string",
-- Mods -- Mods
"default", "stairs" "default", "stairs", "creative"
} }
globals = {"nether"} globals = {"nether"}
ignore = { ignore = {
@ -13,5 +13,3 @@ ignore = {
"411", "421", "422", "423", "431", "432", "411", "421", "422", "423", "431", "432",
-- Shadowing -- Shadowing
} }
-- Allow very long lines in guide.lua for the HTML code
files["guide.lua"] = {ignore = {"631"}}

View File

@ -1,238 +1,427 @@
-- The content of the guide local cube = minetest.inventorycube
-- the content of the guide
local guide_infos = { local guide_infos = {
{"Nether Mushroom", {
[[Nether mushrooms can be found on the nether's ground and on Dirty Netherrack. They can be dug by hand. description = "Mushrooms",
<item name=riesenpilz:nether_shroom width=100> {"text", "Nether mushrooms can be found on the nether's ground and\n"..
"on netherrack soil, it can be dug by hand."},
<my_h2><b>Crafting Items</b></my_h2> {"image", {1, 1, "riesenpilz_nether_shroom_side.png"}},
If we drop a Nether mushroom without holding the fast key, we can split it into its stem and head. We can use them to craft a Nether Mushroom Pickaxe, a Nether Blood Extractor, and an uncooked Nether Pearl. {"y", 0.2},
<item name=nether:shroom_head width=100> <item name=nether:shroom_stem width=100> {"text", "If you drop it without holding the fast key, you can split it into its stem and head:"},
{"image", {1, 1, "nether_shroom_top.png", 1}},
<my_h2><b>Cultivating Mushrooms</b></my_h2> {"image", {1, 1, "nether_shroom_stem.png"}},
We can get more mushrooms using Dirty Netherrack: {"y", 0.1},
1. Search a dark place (light level <= 7) and, if necessary, place Netherrack with air above it {"text", "You can get more mushrooms by using a netherrack soil:\n"..
<img name=nether_netherrack.png width=100> "1. search a dark place and, if necessary, place netherrack with air about it\n"..
2. Right click with Cooked Blood onto the Netherrack to turn it into Dirty Netherrack "2. right click with cooked blood onto the netherrack to make it soiled\n"..
<item name=nether:hotbed width=100> <img name=nether_netherrack.png^nether_netherrack_soil.png width=100> "3. right click onto the netherrack soil with a nether mushroom head to add some spores\n"..
3. Right click onto the Dirty Netherrack with a Nether mushroom head to add some spores "4. dig the mushroom which grew after some time to make place for another one"},
<item name=nether:shroom_head width=100> <img name=nether_netherrack.png^nether_netherrack_soil.png width=100> {"image", {1, 1, "riesenpilz_nether_shroom_side.png", 6, 0.12}},
4. Wait {"y", 1},
5. Dig the Nether mushroom which grew after some time to make place for another one. After some time new spores need to be added (step 3). {"image", {1, 1, "nether_netherrack.png^nether_netherrack_soil.png", 1.8}},
<img name=riesenpilz_nether_shroom_side.png width=100> {"image", {1, 1, "nether_hotbed.png", 1.3, -0.4}},
<img name=nether_netherrack.png^nether_netherrack_soil.png width=100> {"image", {1, 1, "nether_netherrack.png^nether_netherrack_soil.png", 3.6}},
]]}, {"image", {1, 1, "nether_shroom_top.png", 3.1, -0.5}},
{"image", {1, 1, "nether_netherrack.png^nether_netherrack_soil.png", 6}},
{"Blood Structures", {"image", {1, 1, "nether_netherrack.png"}},
[[We can find blood structures on the ground and dig their nodes with the bare hand. They contain four kinds of nodes: Nether Blood Stem, Nether Blood, Nether Blood Head, and Nether Fruit. },
<item name=nether:blood_stem width=100> <item name=nether:blood width=100> <item name=nether:apple width=100> {
We can craft four Nether Blood Wood nodes with the stem. description = "Tools",
<item name=nether:wood width=100> {"text", "You can craft 5 kinds of tools in the nether,\n"..
The four red blood nodes can be cooked in a furnace and, except Nether Blood Wood, their blood can be extracted with a Nether Blood Extractor. "which (except the mushroom pick) require sticks to be crafted:"},
{"image", {1, 1, "nether_pick_mushroom.png"}},
<my_h2><b>Nether Fruit</b></my_h2> {"y", 0.1},
<item name=nether:apple width=100> {"text", "strength : 1\n"..
Eating a Nether Fruit decreases life but it might work against hunger and give us blood: "The mushroom pick needs mushroom stems and heads to be crafted."},
<item name=nether:blood_extracted width=100> {"image", {1, 1, "nether_pick_wood.png"}},
If we eat it at the right place inside a portal, we will teleport instead of getting blood. {"y", 0.1},
If we drop it without holding the fast key, we can split it into its fruit and leaf: {"text", "strength : 2\n"..
<item name=nether:fruit_leaf width=100> <item name=nether:fruit_no_leaf width=100> "The nether wood pick can be crafted with cooked nether blood wood."},
We can craft a fruit leave block out of 9 fruit leaves {"image", {1, 1, "nether_axe_netherrack.png", 1.5}},
The fruit can be used to craft a nether pearl. {"image", {1, 1, "nether_shovel_netherrack.png", 3}},
<item name=nether:fruit_leaves width=100> {"image", {1, 1, "nether_sword_netherrack.png", 4.5}},
A fruit leaves block {"image", {1, 1, "nether_pick_netherrack.png"}},
{"y", 0.1},
<my_h2><b>Cultivating Blood Structures</b></my_h2> {"text", "strength : 3\n"..
If we dig a Nether vine we get a Nether Blood Child. If this sapling is put in a dark place (light level <= 3) on top of a Nether Blood Head node, it grows into a new blood structure after some time. "The red netherrack tools can be crafted with usual netherrack."},
<img name=nether_sapling.png width=100> {"image", {1, 1, "nether_axe_netherrack_blue.png", 1.5}},
<img name=nether_blood.png^nether_blood_side.png width=100> {"image", {1, 1, "nether_shovel_netherrack_blue.png", 3}},
]]}, {"image", {1, 1, "nether_sword_netherrack_blue.png", 4.5}},
{"image", {1, 1, "nether_pick_netherrack_blue.png"}},
{"Tools", {"y", 0.1},
[[We can craft five kinds of tools in the nether, which (except the Nether Mushroom Pickaxe) require sticks to be crafted. To obtain Nether Sticks we can use the Nether Blood Extractor. {"text", "strength : 3\n"..
"The blue netherrack tools can be crafted with blue netherrack."},
<my_h2><b>Nether Mushroom Pickaxe</b></my_h2> {"image", {1, 1, "nether_axe_white.png", 1.5}},
<item name=nether:pick_mushroom width=100> {"image", {1, 1, "nether_shovel_white.png", 3}},
Strength: 1 {"image", {1, 1, "nether_sword_white.png", 4.5}},
This pickaxe needs mushroom stems and heads to be crafted. {"image", {1, 1, "nether_pick_white.png"}},
{"y", 0.1},
<my_h2><b>Nether Wood Pickaxe</b></my_h2> {"text", "strength : 3\n"..
<item name=nether:pick_wood width=100> "The siwtonic tools can be crafted with the siwtonic ore."},
Strength: 2 },
This pickaxe can be crafted with Cooked Nether Blood Wood. {
description = "Blood structures",
<my_h2><b>Netherrack Tools</b></my_h2> {"text", "You can find blood structures on the ground and\n"..
<item name=nether:axe_netherrack width=100> <item name=nether:shovel_netherrack width=100> <item name=nether:sword_netherrack width=100> <item name=nether:pick_netherrack width=100> "dig their nodes even with the bare hand."},
Strength: 3 {"y", 0.5},
The red Netherrack tools can be crafted with usual Netherrack. {"text", "One contains 4 kinds of blocks :"},
{"image", {1, 1, cube("nether_blood.png"), 1}},
<my_h2><b>Faster Tools</b></my_h2> {"image", {1, 1,
<item name=nether:axe_netherrack_blue width=100> <item name=nether:shovel_netherrack_blue width=100> <item name=nether:sword_netherrack_blue width=100> <item name=nether:pick_netherrack_blue width=100> cube("nether_blood_top.png",
Strength: 3 "nether_blood.png^nether_blood_side.png",
The blue Netherrack tools can be crafted with Blue Netherrack. "nether_blood.png^nether_blood_side.png"),
2}},
<item name=nether:axe_white width=100> <item name=nether:shovel_white width=100> <item name=nether:sword_white width=100> <item name=nether:pick_white width=100> {"image", {1, 1, "nether_fruit.png", 3}},
Strength: 3 {"image", {1, 1, cube("nether_blood_stem_top.png",
The Siwtonic tools can be crafted with the Siwtonic block. "nether_blood_stem.png", "nether_blood_stem.png")}},
]]}, {"y", 0.1},
{"text", "Blood stem, blood, blood head and nether fruit"},
{"Cooking", {"y", 0.1},
[[To get a furnace we need to dig at least 8 Netherrack Bricks. They can be found at pyramid-like constructions and require at least a strength 1 nether pickaxe to be dug. {"text", "You can craft 4 blood wood with the stem :"},
To begin cooking things, we can use a mushroom or fruit to power a furnace. After that it is recommended to use cooked blood nodes. {"image", {1, 1, cube("nether_wood.png")}},
{"y", 0.1},
<my_h2><b>Craft Recipe</b></my_h2> {"text", "The 4 blood nodes can be cooked and, except\n"..
To craft the furnace, we can use the netherrack bricks like cobble: "blood wood, their blood can be extracted."},
<item name=nether:netherrack_brick width=100> <item name=nether:netherrack_brick width=100> <item name=nether:netherrack_brick width=100> },
<item name=nether:netherrack_brick width=100> <img name=nether_transparent.png width=100> <item name=nether:netherrack_brick width=100> {
<item name=nether:netherrack_brick width=100> <item name=nether:netherrack_brick width=100> <item name=nether:netherrack_brick width=100> description = "Fruits",
{"text", "You can find the nether fruits on blood structures\n"..
<my_h2><b>Cooking Outputs</b></my_h2> "and dig them even with the bare hand."},
Some nether items can be cooked, for example the Blood Structure's nodes. {"image", {1, 1, "nether_fruit.png"}},
<item name=nether:blood_stem_cooked width=100> <item name=nether:blood_cooked width=100> <item name=nether:blood_top_cooked width=100> <item name=nether:wood_cooked width=100> {"text", "Eating it will make you lose life but\n"..
Other cookable items are Blood and an item to get a Nether Pearl. "it might feed you and give you blood :"},
<item name=nether:hotbed width=100> <item name=nether:pearl width=100> {"image", {1, 1, "nether_blood_extracted.png"}},
]]}, {"y", 0.2},
{"text", "If you eat it at the right place inside a portal,\n"..
{"Nether Blood Extractor", "you will teleport instead of getting blood."},
[[With this extractor we can separate Blood from the Blood Structure's nodes. An alternative way to get Blood is to eat Nether Fruits. The Nether Blood Extractor enables us to obtain a Nether Blood Stem Extracted, which we can craft to (empty) Nether Wood and then to Nether Sticks. {"y", 0.2},
{"text", "If you drop it without holding the fast key,\n"..
<my_h2><b>Craft Recipe</b></my_h2> "you can split it into its fruit and leaf:"},
We can craft the Nether Blood Extractor as follows: {"image", {1, 1, "nether_fruit_leaf.png", 1}},
<item name=nether:netherrack_brick width=100> <item name=nether:blood_top_cooked width=100> <item name=nether:netherrack_brick width=100> {"image", {1, 1, "nether_fruit_no_leaf.png"}},
<item name=nether:blood_cooked width=100> <item name=nether:shroom_stem width=100> <item name=nether:blood_cooked width=100> <img name=nether_transparent.png width=100> <item name=nether:extractor width=100> {"y", 0.2},
<item name=nether:netherrack_brick width=100> <item name=nether:blood_stem_cooked width=100> <item name=nether:netherrack_brick width=100> {"text", "Craft a fruit leave block out of 9 fruit leaves\n"..
"The fruit can be used to craft a nether pearl."},
<my_h2><b>Usage</b></my_h2> {"image", {1, 1, cube("nether_fruit_leaves.png")}},
We can feed the extractor with Blood to make it separate Blood from neighbouring nodes: {"y", 0.2},
1. Place the Nether Blood Extractor somewhere {"text", "A fruit leaves block"},
2. Place four or fewer Blood Structure's nodes next to it. Example viewed from the top: },
<img name=nether_transparent.png width=100> <img name=nether_blood_stem_top.png width=100> <img name=nether_transparent.png width=100> {
<img name=nether_blood.png width=100> <img name=nether_blood_extractor.png width=100> <img name=nether_blood.png width=100> description = "Cooking",
<img name=nether_transparent.png width=100> <img name=nether_blood.png width=100> <img name=nether_transparent.png width=100> {"text", "To get a furnace you need to dig at least 8 netherrack bricks.\n"..
3. Right click the extractor with Blood to power it "They can be found at pyramid like constructions and require at least\n"..
<img name=nether_transparent.png width=100> <img name=nether_blood_stem_top_empty.png width=100> <img name=nether_transparent.png width=100> "a strength 1 nether pick to be dug.\n"..
<img name=nether_blood_empty.png width=100> <img name=nether_blood_extractor.png width=100> <img name=nether_blood_empty.png width=100> "To craft the furnace, use the netherrack bricks like cobble:"},
<img name=nether_transparent.png width=100> <img name=nether_blood_empty.png width=100> <img name=nether_transparent.png width=100> {"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 0.5}},
4. Take the new extracted blood and dig the extracted nodes {"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 1}},
]]}, {"image", {0.5, 0.5, cube("nether_netherrack_brick.png")}},
{"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 1}},
{"Ores and Bricks", {"image", {0.5, 0.5, cube("nether_netherrack_brick.png")}},
[[Digging ores requires a pickaxe from the nether of a sufficient strength. Pickaxes from the overworld do not work in general. {"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 0.5}},
{"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 1}},
<my_h2><b>Strength 1</b></my_h2> {"image", {0.5, 0.5, cube("nether_netherrack_brick.png")}},
<item name=glow:stone width=100> {"y", 0.2},
The Glowing stone can be dug with pickaxes from the overworld or a pickaxe from the nether with a strenght of least one. We can find it on the nether's and nether forest's ceiling and use it for lighting. {"text", "To begin cooking stuff, you can use a mushroom or fruit.\n"..
"After that it's recommended to use cooked blood nodes."},
<my_h2><b>Strength 2</b></my_h2> {"y", 0.1},
<item name=nether:netherrack width=100> <item name=nether:netherrack_tiled width=100> <item name=nether:netherrack_black width=100> {"text", "Some nether items can be cooked:"},
The (red) Netherrack is generated like stone, Tiled Netherrack is generated like coal ore and the Black Netherrack is generated like gravel. {"image", {1, 1, cube("nether_blood_stem_top_cooked.png",
"nether_blood_stem_cooked.png", "nether_blood_stem_cooked.png"),
<my_h2><b>Strength 3</b></my_h2> 0.35}},
<item name=nether:netherrack_blue width=100> <item name=nether:white width=100> {"image", {1, 1, cube("nether_blood_cooked.png"), 1.6}},
The Blue Netherrack is generated like diamond ore and the Siwtonic block is generated like mese blocks. {"image", {1, 1,
cube("nether_blood_top_cooked.png",
<my_h2><b>Bricks</b></my_h2> "nether_blood_cooked.png^nether_blood_side_cooked.png",
There are three types of Bricks: red, Blue, and Black Netherrack Brick. We can craft them from the corresponding Netherrack nodes and additionally, the (red) Netherrack Brick is generated in pyramid-like structures in the nether. In comparison to the Netherrack nodes, all three Bricks can be dug with a pickaxe with strength 1. "nether_blood_cooked.png^nether_blood_side_cooked.png"),
<item name=nether:netherrack_brick width=100> <item name=nether:netherrack_brick_blue width=100> <item name=nether:netherrack_brick_black width=100> 2.9}},
]]}, {"image", {1, 1, cube("nether_wood_cooked.png"), 4.3}},
{"y", 1.2},
{"Nether Vines", {"text", "Some cooked blood stem, cooked blood,\n"..
[[Nether vines are at the ceiling of the nether and can be dug by hand. They drop Nether Blood Child nodes, from which we can grow Blood Structures. By feeding Blood to a Nether vine with air beneath it, it grows one node. "cooked blood head and cooked blood wood,"},
<item name=nether:vine width=100> {"image", {1, 1, "nether_hotbed.png", 0.3}},
]]}, {"image", {1, 1, "nether_pearl.png", 2}},
{"y", 1.2},
{"Portals", {"text", "Some cooked extracted blood and a nether pearl"},
[[This nether mod supports two types of portals: the well-known Minecraft-like one made of Obsidian, and a portal which is specific to this mod. The Obsidian portal allows us to reach the nether from the overworld, but it is one-way and kills us. },
{
<my_h2><b>Build Instructions</b></my_h2> description = "Extractors",
A nether portal requires the following nodes: {"text", "Here you can find out information about the nether extractor."},
<item name=nether:wood_empty width=100> <item name=nether:netherrack_black width=100> <item name=nether:netherrack_brick_blue width=100> <item name=nether:netherrack width=100> <item name=nether:blood_cooked width=100> <item name=nether:apple width=100> <item name=nether:white width=100> {"y", 0.2},
* 25 (empty) Nether Wood (height 5-6) {"text", "Here you can see its craft recipe:"},
* 16 Black Netherrack (height 1) {"image", {0.5, 0.5, cube("nether_blood_top_cooked.png",
* 12 Blue Netherrack Bricks (height 2-4) "nether_blood_cooked.png^nether_blood_side_cooked.png",
* 8 (red) Netherrack (height 1) "nether_blood_cooked.png^nether_blood_side_cooked.png"), 0.5}},
* 8 Cooked Nether Blood (height 5) {"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 1}},
* 4 Nether Fruits (height 4) {"image", {0.5, 0.5, cube("nether_netherrack_brick.png")}},
* 2 Siwtonic blocks (height 1 and 5) {"image", {0.5, 0.5, cube("nether_blood_extractor.png"), 2.5}},
{"image", {0.5, 0.5, "nether_shroom_stem.png", 0.5}},
The heights in parenthesis correspond to the relative vertical positions of the nodes. When built, the portal should look approximately like this one: {"image", {0.5, 0.5, cube("nether_blood_cooked.png"), 1}},
<img name=nether_teleporter.png width=600> {"image", {0.5, 0.5, cube("nether_blood_cooked.png")}},
{"image", {0.5, 0.5, cube("nether_blood_stem_top_cooked.png",
<my_h2><b>Usage</b></my_h2> "nether_blood_stem_cooked.png", "nether_blood_stem_cooked.png"),
Before using the portal the first time, we may want to fill our inventory with enough items so that we can build a second portal on the overworld to get back. 0.5}},
We can activate the portal as follows: {"image", {0.5, 0.5, cube("nether_netherrack_brick.png"), 1}},
1. Stand in the middle on the Siwtonic block {"image", {0.5, 0.5, cube("nether_netherrack_brick.png")}},
2. Eat a Nether Fruit. If the portal was built correctly, we can hear a special sound and are teleported to the overworld. {"y", 0.2},
{"text", "Extract blood from the blood nodes you get from the blood structures.\n"..
If two portals in the nether and overworld have the same X and Z coordinates, they teleport us to the centre, i.e. onto the Siwtonic block, of the opposite portal when eating a Nether Fruit. "You can also get blood with a nether fruit."},
]]}, {"y", 0.2},
{"text", "So you can use it:\n"..
{"Pearls", "1. place it somewhere\n"..
[[The nether pearl can be used to teleport by throwing it. "2. place blood blocks next to it (4 or less)\n"..
"3. right click with extracted blood onto it to power it\n"..
<my_h2><b>Craft Recipe</b></my_h2> "4. take the new extracted blood and dig the extracted nodes"},
First, we need to craft two Nether Mushroom Heads and a Nether Fruit Without Leaf together as follows: {"y", 0.2},
<item name=nether:shroom_head width=100> {"text", "Example (view from the top):"},
<item name=nether:fruit_no_leaf width=100> {"y", 0.88},
<item name=nether:shroom_head width=100> {"image", {1, 1, "nether_blood_stem_top.png", 0.82, -0.88}},
This gives us the Nether Fruit in Mushroom (FIM), which we can cook in a furnace to obtain a Nether Pearl. {"image", {1, 1, "nether_blood.png", 1.63}},
<item name=nether:fim width=100> <item name=nether:pearl width=100> {"image", {1, 1, "nether_blood_extractor.png", 0.82}},
]]}, {"image", {1, 1, "nether_blood_stem_top_empty.png", 3.82, -0.88}},
{"image", {1, 1, "nether_blood_empty.png", 4.63}},
{"Nether Forest", {"image", {1, 1, "nether_blood_empty.png", 3.001}},
[[The nether forest is generated in caves above the nether and contains decorative plants. {"image", {1, 1, "nether_blood_extractor.png", 3.82}},
{"image", {1, 1, "nether_blood.png"}},
<my_h2><b>Grass and Flower</b></my_h2> {"image", {1, 1, "nether_blood.png", 0.82, -0.12}},
<item name=nether:grass_big width=100> <item name=nether:grass_middle width=100> <item name=nether:grass_small width=100> {"image", {1, 1, "nether_blood_empty.png", 3.82, -0.12}},
We can craft the Nether Grass item to another grass item, which can be cooked to get Dried Nether Grass. We can then craft this dried grass to paper. {"y", 1.2},
{"text", "The empty blood stem can be crafted into empty nether wood,\n"..
<item name=nether:glowflower width=100> "which can be crafted into nether sticks."},
The Glowing Flower can be used for lighting and decoration. },
{
<my_h2><b>Nether Tree</b></my_h2> description = "Ores",
<item name=nether:tree width=100> {"text", "You can find 5 types of ores:"},
Nether trunks can be found at Nether Trees and be crafted into Nether Wood Blocks via Nether Wood Planks. Furthermore, the Nether Tree Saplings grow even in the overworld if they have Nether Dirt beneath them. {"image", {1, 1, cube("nether_netherrack_black.png"), 4}},
]]} {"image", {1, 1, cube("nether_netherrack.png")}},
{"y", 0.2},
{"text", "The red netherrack is generated like stone.\n"..
"The black netherrack is generated like gravel.\n"..
"Both require at least a strength 2 nether pick to be dug."},
{"image", {1, 1, cube("nether_white.png"), 4}},
{"image", {1, 1, cube("nether_netherrack_blue.png")}},
{"y", 0.2},
{"text", "The blue netherrack is generated like diamond ore.\n"..
"The siwtonic ore is generated like mese blocks.\n"..
"Both require at least a strength 3 nether pick to be dug."},
{"image", {1, 1, cube("nether_netherrack_tiled.png"), 4}},
{"image", {1, 1, cube("glow_stone.png")}},
{"y", 0.2},
{"text", "Glow stone can be used for lighting.\n"..
"Tiled netherrack is generated like coal ore.\n"..
"Glow stone requires at least a strength 1 pick to be dug.\n"..
"Dig tiled netherrack with at least a level 2 pickaxe."},
},
{
description = "Vines",
{"text", "Feed nether vines with blood.\n"..
"Dig them with anything."},
{"image", {1, 1, "nether_vine.png"}},
{"y", 0.2},
{"text", "Grow nether child by placing\n"..
"placing it to a dark place onto a\n"..
"blood structure head node."},
{"image", {1, 1, "nether_sapling.png"}},
{"y", -0.10},
{"image", {1, 1, "nether_blood.png^nether_blood_side.png"}},
},
{
description = "Pearls",
{"text", "The nether pearl can be used to teleport by throwing it.\n"..
"Here is how to get one :"},
{"y", 0.2},
{"text", "First of all craft 2 mushroom heads and 1 nether fruit\n"..
"without leaf together :"},
{"image", {1, 1, "nether_shroom_top.png"}},
{"image", {1, 1, "nether_fim.png", 3}},
{"image", {1, 1, "nether_fruit_no_leaf.png"}},
{"image", {1, 1, "nether_shroom_top.png"}},
{"y", 0.2},
{"text", "Put the result into the furnace\n"..
"to cook it into a nether pearl :"},
{"image", {1, 1, "nether_pearl.png"}},
},
{
description = "Bricks",
{"text", "Craft bricks out of red,\n"..
"black and blue netherrack."},
{"image", {1, 1, cube("nether_netherrack_brick_black.png"), 1}},
{"image", {1, 1, cube("nether_netherrack_brick_blue.png"), 2}},
{"image", {1, 1, cube("nether_netherrack_brick.png")}},
{"y", 0.4},
{"text", "Dig them with at least a level 1 pickaxe."},
{"y", 0.2},
},
{
description = "Portals",
{"text", "Here you can find out how to built the nether portal."},
{"y", 0.3},
{"text", "A nether portal requires following nodes:"},
{"y", 0.05},
{"text", "25 empty nether wooden planks\n"..
"16 black netherrack\n"..
"12 blue netherrack bricks\n"..
"8 red netherrack\n"..
"8 cooked nether blood\n"..
"4 nether fruits\n"..
"2 siwtonic blocks"},
{"y", 0.2},
{"text", "It should look approximately like this one:"},
{"image", {5.625, 6, "nether_teleporter.png", 0, -1.5}},
{"y", 5.5},
{"text", "Activate it by standing in the middle,\n"..
"on the siwtonic block and eating a nether fruit.\n"..
"Take enough stuff with you to build a portal when you'll come back."},
},
{
description = "Forests",
{"text", "The nether forest is generated in caves,\n"..
"above the usual nether."},
{"y", 0.2},
{"text", "There you can find some plants:"},
{"image", {1, 1, "nether_grass_middle.png", 1}},
{"image", {1, 1, "nether_grass_big.png", 2}},
{"image", {1, 1, "nether_grass_small.png"}},
{"y", 0.2},
{"text", "Use the nether forest grass to get paper.\n"..
"Craft paper out of the dried grass."},
{"image", {1, 1, cube("nether_tree_top.png", "nether_tree.png", "nether_tree.png")}},
{"y", 0.2},
{"text", "Nether trunks can be found at nether trees.\n"..
"Craft nether wood out of nether trunk."},
{"image", {1, 1, "nether_glowflower.png"}},
{"y", 0.2},
{"text", "Use it for lighting and decoration."},
},
} }
-- The guide formspecs -- the size of guide pages
local guide_forms = {} local guide_size = {x=40, y=10, cx=0.2, cy=0.2}
-- Convert the guide content to formspecs -- informations about settings and ...
local formspec_offset = {x=0.25, y=0.50}
local font_size
if minetest.is_singleplayer() then
font_size = tonumber(minetest.settings:get("font_size")) or 13
else
font_size = 13
end
guide_size.fx = math.floor((40*(guide_size.cx+formspec_offset.x))*font_size)
guide_size.fy = font_size/40
-- the default guide formspecs
local guide_forms = {
contents = "size[3.6,"..(#guide_infos)-2 ..";]label["..guide_size.cx+0.7 ..","..guide_size.cy+0.2 ..";Contents:]",
}
-- change the infos to formspecs
for n,data in ipairs(guide_infos) do for n,data in ipairs(guide_infos) do
local title, html_content = data[1], data[2] local html_text = ""
--~ local html_text = "<global background=#242424 size=24><tag name=my_h1 size=35>" .. local form = ""
local html_text = "<global size=24><tag name=my_h1 size=35>" .. local y = 0
"<tag name=my_h2 size=30>" .. local x = guide_size.cx
"<my_h1><b><center>" .. title .. "</b></center></my_h1>\n" .. for _,i in ipairs(data) do
html_content local typ, content = unpack(i)
local spec_width = 16 if typ == "y" then
local spec_height = 16 y = y+content
local html_padding = 0.5 elseif typ == "x" then
local form = ("formspec_version[4]size[%g,%g;]" .. x = math.max(x, content)
"hypertext[%g,%g;%g,%g;html;%s]button[%g,%g;2,0.8;quit;Back]" elseif typ == "text" then
html_text = html_text .. content .. "\n"
local tab = minetest.wrap_text(content, guide_size.fx, true)
local l = guide_size.cx
for _,str in ipairs(tab) do
--~ form = form.."label["..guide_size.cx ..","..guide_size.cy+y..";"..str.."]"
y = y+guide_size.fy
l = math.max(l, #str)
end
x = math.max(x, l/font_size)
elseif typ == "image" then
local w, h, texture_name, px, py = unpack(content)
if not px then
--~ form = form.."image["..guide_size.cx..","..guide_size.cy+y+h*0.3 ..";"..w..","..h..";"..texture_name.."]"
html_text = html_text ..
("<img name=%s width=%g height=%g>\n"):format(
texture_name, w, h)
y = y+h
else
px = guide_size.cx+px
py = py or 0
html_text = html_text ..
("<img name=%s width=%g height=%g>\n"):format(
texture_name, w, h)
--~ form = form.."image["..px..","..
--~ guide_size.cy+y+h*0.3+py ..";"..w..","..h..";"..texture_name.."]"
x = math.max(x, px+w)
end
end
end
form = ("formspec_version[4]size[%g,%g;]hypertext[0,0;%g,%g;html;%s]button[%g,%g;1,2;quit;Back]"
):format( ):format(
spec_width, spec_height, x * 1.8, y + 1,
html_padding, html_padding, x * 1.8, y,
spec_width - 2 * html_padding, spec_height - 1 - 2 * html_padding,
minetest.formspec_escape(html_text), minetest.formspec_escape(html_text),
0.5 * spec_width - 1, spec_height - 1) 0.5 * x - 0.5, y)
guide_forms[n] = {title, form} guide_forms[n] = {data.description, form}
end end
print(dump(guide_forms))
--[[
for n,data in ipairs(guide_infos) do
local form = ""
local y = 0
local x = guide_size.cx
for _,i in ipairs(data) do
local typ, content = unpack(i)
if typ == "y" then
y = y+content
elseif typ == "x" then
x = math.max(x, content)
elseif typ == "text" then
local tab = minetest.wrap_text(content, guide_size.fx, true)
local l = guide_size.cx
for _,str in ipairs(tab) do
form = form.."label["..guide_size.cx ..","..guide_size.cy+y..";"..str.."]"
y = y+guide_size.fy
l = math.max(l, #str)
end
x = math.max(x, l/font_size)
elseif typ == "image" then
local w, h, texture_name, px, py = unpack(content)
if not px then
form = form.."image["..guide_size.cx..","..guide_size.cy+y+h*0.3 ..";"..w..","..h..";"..texture_name.."]"
y = y+h
else
px = guide_size.cx+px
py = py or 0
form = form.."image["..px..","..
guide_size.cy+y+h*0.3+py ..";"..w..","..h..";"..texture_name.."]"
x = math.max(x, px+w)
end
end
end
form = "size["..x*1.8 ..","..y+1 ..";]"..form.."button["..x/2-0.5 ..","..y ..";1,2;quit;Back]"
guide_forms[n] = {data.description, form}
end
--]]
local title_to_index = {} local desc_tab = {}
for n,i in ipairs(guide_forms) do for n,i in ipairs(guide_forms) do
title_to_index[i[1]] = n desc_tab[i[1]] = n
end end
-- Create the contents formspec -- creates contents formspec
guide_forms.contents = "formspec_version[4]size[6," .. (#guide_infos) + 2 .. for y,i in ipairs(guide_forms) do
";]label[2,0.8;Contents:]" local desc = i[1]
for i, data in ipairs(guide_forms) do local s = #desc * 1.3 / font_size + 1.5
local desc = data[1]
local y = i + 0.5 + 0.1
guide_forms.contents = guide_forms.contents .. guide_forms.contents = guide_forms.contents ..
"button[0.5," .. y .. ";5,0.8;name;" .. desc .. "]" "button[" .. guide_size.cx * 12 / s - 0.5 .. "," ..
guide_size.cy + y / 1.3 .. ";" .. s .. ",1;name;" .. desc .. "]"
end
-- shows the contents of the formspec
local function show_guide(pname)
minetest.show_formspec(pname, "nether_guide_contents", guide_forms["contents"])
end end
minetest.register_on_player_receive_fields(function(player, formname, fields) minetest.register_on_player_receive_fields(function(player, formname, fields)
@ -241,16 +430,14 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local pname = player:get_player_name() local pname = player:get_player_name()
if fname if fname
and pname then and pname then
minetest.show_formspec(pname, "nether_guide", minetest.show_formspec(pname, "nether_guide", guide_forms[desc_tab[fname]][2])
guide_forms[title_to_index[fname]][2])
end end
elseif formname == "nether_guide" then elseif formname == "nether_guide" then
local fname = fields.quit local fname = fields.quit
local pname = player:get_player_name() local pname = player:get_player_name()
if fname if fname
and pname then and pname then
minetest.show_formspec(pname, "nether_guide_contents", minetest.show_formspec(pname, "nether_guide_contents", guide_forms["contents"])
guide_forms["contents"])
end end
end end
end) end)
@ -261,16 +448,17 @@ minetest.register_chatcommand("nether_help", {
func = function(name) func = function(name)
local player = minetest.get_player_by_name(name) local player = minetest.get_player_by_name(name)
if not player then if not player then
return false, "Something went wrong." minetest.chat_send_player(name, "Something went wrong.")
return false
end end
if not nether.overworld_help and player:get_pos().y > nether.start then if player:get_pos().y > nether.start then
return false, "Usually you don't neet this guide here. " .. minetest.chat_send_player(name,
"You can view it in the nether." "Usually you don't neet this guide here. " ..
"You can view it in the nether.")
return false
end end
minetest.chat_send_player(name, "Showing guide...") minetest.chat_send_player(name, "Showing guide...")
-- Show the Contents (overview) page show_guide(name)
minetest.show_formspec(name, "nether_guide_contents",
guide_forms["contents"])
return true return true
end end
}) })

View File

@ -4,19 +4,13 @@ local nether_sound = default.node_sound_stone_defaults({
footstep = {name="nether_footstep", gain=0.4} footstep = {name="nether_footstep", gain=0.4}
}) })
-- The fence registration function from fence_registration
local add_fence = minetest.register_fence local add_fence = minetest.register_fence
local stairs_exist = minetest.global_exists("stairs")
-- A function which registers a fence and stairs nodes for a nether node if the
-- mods for these node registrations are available
local function add_more_nodes(name) local function add_more_nodes(name)
local nd = "nether:"..name local nd = "nether:"..name
if not string.find(name, "nether") then if not string.find(name, "nether") then
name = "nether_"..name name = "nether_"..name
end end
local data = minetest.registered_nodes[nd] local data = minetest.registered_nodes[nd]
if stairs_exist then
stairs.register_stair_and_slab(name, nd, stairs.register_stair_and_slab(name, nd,
data.groups, data.groups,
data.tiles, data.tiles,
@ -24,7 +18,6 @@ local function add_more_nodes(name)
data.description.." Slab", data.description.." Slab",
data.sounds data.sounds
) )
end
if add_fence then if add_fence then
add_fence({fence_of = nd}) add_fence({fence_of = nd})
end end
@ -42,11 +35,14 @@ local function add_fence(name)
end end
--]] --]]
local creative_installed = minetest.global_exists("creative")
local function digging_allowed(player, v) local function digging_allowed(player, v)
if not player then if not player then
return false return false
end end
if minetest.is_creative_enabled(player:get_player_name()) then if creative_installed
and creative.is_enabled_for(player:get_player_name()) then
return true return true
end end
local tool = player:get_wielded_item():get_name() local tool = player:get_wielded_item():get_name()

View File

@ -1,3 +1,3 @@
name = nether name = nether
depends = default,glow,riesenpilz depends = default,glow,riesenpilz,stairs,vector_extras
optional_depends = creative,fence_registration,function_delayer,stairs,watershed optional_depends = creative,fence_registration,function_delayer,watershed

View File

@ -4,8 +4,8 @@ local function throw_pearl(item, player)
playerpos.y = playerpos.y+1.625 playerpos.y = playerpos.y+1.625
local obj = minetest.add_entity(playerpos, "nether:pearl_entity") local obj = minetest.add_entity(playerpos, "nether:pearl_entity")
local dir = player:get_look_dir() local dir = player:get_look_dir()
obj:set_velocity(vector.multiply(dir, 30)) obj:setvelocity(vector.multiply(dir, 30))
obj:set_acceleration({x=dir.x*-3, y=-dir.y^8*80-10, z=dir.z*-3}) obj:setacceleration({x=dir.x*-3, y=-dir.y^8*80-10, z=dir.z*-3})
local pname = player:get_player_name() local pname = player:get_player_name()
obj:get_luaentity().player = pname obj:get_luaentity().player = pname
if not minetest.is_creative_enabled(pname) then if not minetest.is_creative_enabled(pname) then
@ -56,7 +56,7 @@ local function teleport_player(pos, player)
return false return false
end end
pos.y = pos.y+0.05 pos.y = pos.y+0.05
player:move_to(pos) player:moveto(pos)
return true return true
end end

View File

@ -191,7 +191,7 @@ if nether.trap_players then
-- fixes respawn bug -- fixes respawn bug
local player = minetest.get_player_by_name(pname) local player = minetest.get_player_by_name(pname)
if player then if player then
player:move_to(target) player:moveto(target)
end end
end, pname, target) end, pname, target)
return true return true
@ -558,11 +558,10 @@ minetest.after(0.1, function()
and minetest.get_node(pt.under).name == "default:obsidian" then and minetest.get_node(pt.under).name == "default:obsidian" then
local done = make_portal(pt.under) local done = make_portal(pt.under)
if done then if done then
local pname = player:get_player_name() minetest.chat_send_player(player:get_player_name(),
minetest.chat_send_player(pname,
"Warning: If you are in the nether you may not be " .. "Warning: If you are in the nether you may not be " ..
"able to find the way out!") "able to find the way out!")
if not minetest.is_creative_enabled(pname) then if not minetest.settings:get_bool("creative_mode") then
stack:take_item() stack:take_item()
end end
end end

View File

@ -2,7 +2,6 @@ local default_settings = {
trap_players = true, trap_players = true,
log_to_chat = false, log_to_chat = false,
log_level = 2, log_level = 2,
overworld_help = true,
} }
nether.settings = {} nether.settings = {}

View File

@ -17,7 +17,3 @@ nether.log_to_chat (Log messages to chat) bool false
# 2: Acceptable amount of information # 2: Acceptable amount of information
# 3: Lots of text # 3: Lots of text
nether.log_level (Log level) int 2 0 3 nether.log_level (Log level) int 2 0 3
# If disabled, players cannot view the nether guide with /nether_help
# in the overworld.
nether.overworld_help (Overworld help) bool true