Compare commits

...

41 Commits

Author SHA1 Message Date
kabou 4b44b85424 Remove unused variable `stick` in mcl_deepslate. 2022-05-08 11:18:49 +02:00
kabou 53c6b9be1c Update deepslate with lapis drops.
* Replace blue dye with "mcl_core:lapis".
2022-05-08 11:18:49 +02:00
kabou 951df68d57 Update bone block to bone meal crafting recipe.
* Update bone block to bone meal crafting recipe that was forgotten when
  updating the bone meal to bone block crafting recipe as part of the
  mcl_dye changes..
2022-05-08 11:18:42 +02:00
kabou fd3df57e5f Update railcorridors chest loot to use lapis items. 2022-05-06 15:09:23 +02:00
kabou 48825117bd Update villager trade to use lapis. 2022-05-06 15:09:23 +02:00
kabou d2257f3303 Remove color specifications from bone meal.
* The bone meal craftitem definition still had color specifications
  from its past as a dye substitute.  These can be removed now.
* Also remove default stack_max setting.
2022-05-06 15:09:23 +02:00
kabou 9ad70d82c8 Remove color specifications from cocoa beans.
* The cocoa beans craftitem definition still had color specifications
  from its past as a dye substitute.  These can be removed now.
2022-05-06 15:09:23 +02:00
kabou 98fff2c608 Update enchanting table to use lapis items. 2022-05-06 15:09:23 +02:00
kabou 2a154838f9 Also generate double grass when bonemealing grass blocks. 2022-05-06 15:09:23 +02:00
kabou b20d06706c Remove expired bone meal API.md from mcl_dye. 2022-05-06 15:09:23 +02:00
kabou 521fc1972a Bonemealing mechanics bugfix.
When applying bonemeal to eg. farm crops, these have a chance to grow in
response to the application of bone meal. When a node can be bonemealed, the
applied bone meal item should always be spent after using it, regardless of
the results.  Currently this does not work correctly, if the result of
bonemealing has no effect on the node, the used bone meal item is not spent.

This commit fixes the behavior of the bone meal item to always be taken when
used on a node that defines a `_mcl_on_bonemealing()` callback.

The nodes that implement the callback imay use the handler's return value
only to signal if the bonemealing was succesful, not to signal if it was at
all possible.  For this reason, some nodes need to be made more strictly
conforming to the API.

* Always take the used bone meal item (if user is not in creative mode),
  regardless of whether the bonemealed node's handler returned `true`.
* Make dispensers spawn particles after succesful bonemealing.
* Trivial comment fix.
* Ripe cocoa pod cannot be bonemealed.
* Update API.md to describe the stricter API semantics.
2022-05-06 15:09:23 +02:00
kabou c83076b756 Improve mcl_bone_meal fr translations.
* Changed the wording after suggestions by AFCMS.
2022-05-06 15:09:23 +02:00
kabou bcc3a22333 Add missing es translation to mcl_bone_meal. 2022-05-06 15:09:23 +02:00
kabou af1b007b77 Fix squid ink sac description and add translations.
* Fix the squid ink sac craftitem description.
* Update de translation.
* Add es, fr, pl and ru translations.
  Note that I do not master all of these languages and this is a best effort
  based on picking what I guessed are the most likely translations.
2022-05-06 15:09:23 +02:00
kabou 35049c765e Update lapis lazuli description translations.
* Updated de, es, fr, pl, ru and zh_TW translations for the new lapis
  lazuli craftitem description.
  Note that I do not master all of these languages and this is a best
  effort based on picking what I guessed are the most likely translations
  from web pages.
2022-05-06 15:09:23 +02:00
kabou 7e54c3d5bf Update cocoa beans description.
After the cocoa beans <-> brown dye change, some of the old dye use was still
left in the description and usage help texts of the cocoa beans craftitem.
The mcl_cocoa locale template and translations are also updated.

* Update the cocoa beans craftitem description and usage help text.
* Update de, es, fr, pl, ru and zh_TW translations.
  Note that I do not master all of these languages and this is a best effort
  based on picking what I guessed are the most likely translations.
* Don't set stack_max to what would be the default anyway.
2022-05-06 15:09:23 +02:00
kabou b5a0a792a9 Remove stray line from locale template.
* Removed a line from the mcl_bone_meal locale template that had by
  accident put there during the bone meal <-> white dye changes.
2022-05-06 15:09:23 +02:00
kabou f6fd0b4c37 Update mcl_dye translations.
* Added de, es, fr, pl, ru and zh_TW translations for the new white
  black and brown dye items.  The new blue dye description is unchanged
  and needs no translation update.
  Note that I do not master all of these languages and this is a best
  effort based on picking what I guessed are the most likely translations
  from web pages.
2022-05-06 15:09:23 +02:00
kabou 70a1fdad5a Add black, white, blue and brown dyes.
Until now, the black, white, blue and brown dyes doubled as squid ink sac,
bone meal, lapis lazuli and cocoa beans.  Since these latter items have all
been given their own craftitem registration, the missing dyes can finally
be added in their own right.

* Add `"mcl_dye:black"` and its crafting recipe.
* Add `"mcl_dye:white"` and its crafting recipe.
* Add `"mcl_dye:blue"` and its crafting recipe.
* Add `"mcl_dye:brown"` and its crafting recipe.
* Remove aliases for white and brown dyes.
* Rename dye item images to be conforming to mineclone naming standards.
* Minor simplifications of mcl_dye/init.lua.
2022-05-06 15:09:23 +02:00
kabou cb6a9e7e35 Replace blue dye with "mcl_core:lapis".
The lapis ore drop has been registered as `"mcl_dye:blue"`
because it doubled as the blue dye for lack of a proper blue dye.
This commit makes the lapis item its own `"mcl_core:lapis"` item and
updates the lapis users (but not the blue dye users.)

* Add craftitem for `"mcl_core:lapis"`.
* Update crafting recipes for lapis block.
* Update lapis ore drops.
2022-05-06 15:09:23 +02:00
kabou 81ea298011 Replace black dye with "mcl_mobitems:ink_sac".
The squid ink sac mob drop has been registered as `"mcl_dye:black"`
because it doubled as the black dye for lack of a proper black dye.
This commit makes the squid ink sac its own `"mcl_mobitems:ink_sac"`
item and updates the ink sac users (but not the black dye users.)

* Add craftitem for "mcl_mobitems:ink_sac".
* Update squid drop.
* Update crafting recipe for book and quill.
* Update fishing loot.
2022-05-06 15:09:23 +02:00
kabou df08a113b7 Revert vector-fu.
* Metatable based direct operator maths on vectors are new in minetest
  5.5 which means that they are not yet supported in 5.4.  Revert back
  to vector.subtract().
2022-05-06 15:09:23 +02:00
kabou 8072f2089d Use better override mechanism.
* Use `minetest.override_item()` instead of re-registering the node with
  ":" prefixed to its name.  Thanks again to wsor for mentioning this.
2022-05-06 15:09:23 +02:00
kabou 8131950287 Update bone block crafting recipe.
* Update `mcl_core:bone_block` crafting recipe with new bone meal
  itemname.
2022-05-06 15:09:23 +02:00
kabou 195f0dfbaa Move cocoa beans item to mcl_cocoas.
* Add `mcl_cocoas:coca_beans` craftitem to mcl_cocoas.
* Remove `mcl_dye:brown` craftitem from mcl_dye.
* Move cocoa beans translations from mcl_dye to mcl_cocoas.
* Add `mcl_dye:brown` alias for `mcl_cocoas:cocoa_beans` to
  mcl_dye.
* Abstract cocoa pod node registration into a loop.
* Update chocolate cookies crafting recipe in mcl_farming.
2022-05-06 15:09:07 +02:00
kabou 82112e42fe Add more particles when bonemealing grass.
* Bonemealing dirt_with_grass spawns new growth over a wide area, so it
  looks better if we spawn a few more extra bone meal particles.
* Update mod.conf depends to mcl_bone_meal.
2022-05-06 14:39:35 +02:00
kabou 8f05b612c9 Update to new bone meal API.
* Update to use new mcl_bone_meal API:
* Use new bone meal item and remove related comment.
* Update mod depends in mod.conf
* Spelling fixes: s/bonemeal/bone meal/g
2022-05-06 14:39:35 +02:00
kabou c9afccd0c3 Add mcl_bone_meal.
* New mod mcl_bone_meal, replacing bone meal functionality previously
  held in mcl_dye.
* Improve bonemealing API using callbacks in the nodes that support
  bonemealing.
* Rename bone meal item to `"mcl_bone_meal:bone_meal"` and updated its
  crafting recipe.
* Implement legacy compatibility for older bone meal API.
* Remove all non dye-related bone meal code, texture and translations from
  mcl_dye.
* Add legacy compatibility shims to mcl_dye that refer to mcl_bone_meal.
* Add an alias for "mcl_dye:white" to keep mcl_dye and its API working
  uniterrupted.
* Update mod depends in mcl_dye mod.conf.
2022-05-06 14:39:35 +02:00
kabou c5dd0b7016 Add bonemealing callback for fern.
* Adds a _mcl_on_bonemealing callback to fern.
2022-05-06 14:39:35 +02:00
kabou 7b2c1be538 Add bonemealing callback for tall grass.
* Adds a _mcl_on_bonemealing callback to tall grass.
2022-05-06 14:39:35 +02:00
kabou 15c4f5bf2a Add bonemealing callback for double flowers.
* Adds a _mcl_on_bonemealing callback to the double flowers.
2022-05-06 14:39:35 +02:00
kabou b0111847b7 Add bonemealing callback for dirt with grass.
* Add new file mcl_flowers/bonemeal.lua, containing the bonemealing
  callback for "mcl_core:dirt_with_grass".
* Override "mcl_core:dirt_with_grass" with a _mcl_on_bonemealing handler
  calling a function defined in mcl_flowers. This sidesteps the problem
  that bonemealing a node from mcl_core needs knowledge of mcl_flowers,
  which would create a circular dependency.  H/t to cora for suggesting
  this solution. H/t to wsor for suggesting a solution that also works.
2022-05-06 14:39:35 +02:00
kabou dcbf5cffdd Add bonemealing callback to cocoa.
* Adds a _mcl_on_bonemealing callback to the unripe cocoa pods.
2022-05-06 14:39:35 +02:00
kabou d90387edc9 Refactor beetroots and add bonemealing callback.
* Abstract unripe beetroot plant node registrations into a single
  indexed definition and do the registration in a loop.
* Adds a _mcl_on_bonemealing callback to the unripe melon plants.
2022-05-06 14:39:35 +02:00
kabou a108d5c11f Add bonemealing callback to melons.
* Adds a _mcl_on_bonemealing callback to the unripe melon plants.
2022-05-06 14:39:35 +02:00
kabou 0b792a31b8 Add bonemealing callback to pumpkins.
* Adds a _mcl_on_bonemealing callback to the unripe pumpkin plants.
2022-05-06 14:39:35 +02:00
kabou b4ff81f311 Add bonemealing callback to carrots.
* Adds a _mcl_on_bonemealing callback to the unripe carrot plants.
2022-05-06 14:39:35 +02:00
kabou 1fccf729ad Add bonemealing callback to potatoes.
* Adds a _mcl_on_bonemealing callback to the unripe potato plants.
2022-05-06 14:39:35 +02:00
kabou 2cec651783 Add bonemealing callback to wheat.
* Adds a _mcl_on_bonemealing callback to the unripe wheat node definitions.
2022-05-06 14:39:35 +02:00
kabou 5217c88daa Add bonemealing callback to small mushrooms.
* Adds a _mcl_on_bonemealing callback to the mushroom node definitions.
2022-05-06 14:39:35 +02:00
kabou 5c7350b78f Add bonemealing callback to saplings.
* Adds a _mcl_on_bonemealing callback to the sapling node definitions.
2022-05-06 14:39:35 +02:00
88 changed files with 856 additions and 674 deletions

View File

@ -82,7 +82,7 @@ mobs_mc.items = {
flint_and_steel = "fire:flint_and_steel",
water_source = "default:water_source",
river_water_source = "default:river_water_source",
black_dye = "dye:black",
ink_sac = "mcl_mobitems:ink_sac",
poppy = "flowers:rose",
dandelion = "flowers:dandelion_yellow",
coal = "default:coal_lump",

View File

@ -40,7 +40,7 @@ mobs:register_mob("mobs_mc:squid", {
run_end = 60,
},
drops = {
{name = mobs_mc.items.black_dye,
{name = mobs_mc.items.ink_sac,
chance = 1,
min = 1,
max = 3,

View File

@ -314,7 +314,7 @@ local professions = {
{
{ E1, { "mesecons:redstone", 1, 4 } },
{ E1, { "mcl_dye:blue", 1, 2 } },
{ E1, { "mcl_core:lapis", 1, 2 } },
},
{

View File

@ -57,7 +57,7 @@ mobs_mc.override.items = {
flint_and_steel = "mcl_fire:flint_and_steel",
water_source = "mcl_core:water_source",
river_water_source = "mclx_core:river_water_source",
black_dye = "mcl_dye:black",
ink_sac = "mcl_mobitems:ink_sac",
poppy = "mcl_flowers:poppy",
dandelion = "mcl_flowers:dandelion",
coal = "mcl_core:coal_lump",

View File

@ -0,0 +1,63 @@
# Bone meal API
Bonemealing callbacks and particle functions.
## _mcl_on_bonemealing(pointed_thing, placer)
The bone meal API provides a callback definition that nodes can use to
register a handler that is executed when a bone meal item is used on it.
Nodes that wish to use the bone meal API should in their node registration
define a callback handler named `_mcl_on_bonemealing`.
Note that by registering the callback handler, the node declares that bone
meal can be used on it and as a result, when the user is not in creative
mode, the used bone meal is spent and taken from the itemstack passed to
the `on_place()` handler of the bone meal item used.
It is for all intents and purposes up to the callback defined in the node to
decide how to handle the specific effect that bone meal has on that node.
The `_mcl_on_bonemealing` callback handler is a
`function(pointed_thing, placer)`
Its arguments are:
* `pointed_thing`: exact pointing location (see Minetest API), where the
bone meal is applied
* `placer`: ObjectRef of the player who aplied the bone meal, can be nil!
The return value of the handler function indicates if the bonemealing had
its intended effect. If `true`, 'bone meal particles' are spawned at the
position of the bonemealed node.
The `on_place` code in the bone meal item will spawn bone meal particles and
decrease the bone meal itemstack if the handler returned `true` and the
`placer` is not in creative mode.
## mcl_bone_meal.add_bone_meal_particle(pos, def)
Spawns standard or custom bone meal particles.
* `pos`: position, is ignored if you define def.minpos and def.maxpos
* `def`: (optional) particle definition; see minetest.add_particlespawner()
for more details.
# Legacy API
The bone meal API also provides a legacy compatibility function. This
function is not meant to be continued and callers should migrate to the
newer bonemealing API.
## mcl_bone_meal.register_on_bone_meal_apply(function(pointed_thing, placer))
Called when the bone meal is applied anywhere.
* `pointed_thing`: exact pointing location (see Minetest API), where the
bone meal is applied
* `placer`: ObjectRef of the player who aplied the bone meal, can be nil!
This function is deprecated and will be removed at some time in the future.
## mcl_dye.add_bone_meal_particle(pos, def)
## mcl_dye.register_on_bone_meal_apply(function(pointed_thing, user))
These shims in mcl_dye that point to corresponding legacy compatibility
functions in mcl_bone_meal remain for legacy callers that have not yet been
updated to the new API. These shims will be removed at some time in the
future.

View File

@ -0,0 +1,133 @@
local S = minetest.get_translator(minetest.get_current_modname())
local longdesc = S(
"Bone meal is a white dye and also useful as a fertilizer to " ..
"speed up the growth of many plants."
)
local usagehelp = S(
"Rightclick a sheep to turn its wool white. Rightclick a plant " ..
"to speed up its growth. Note that not all plants can be " ..
"fertilized like this. When you rightclick a grass block, tall " ..
"grass and flowers will grow all over the place."
)
mcl_bone_meal = {}
-- Bone meal particle api:
--- Spawns bone meal particles.
-- pos: where the particles spawn
-- def: particle spawner parameters, see minetest.add_particlespawner() for
-- details on these parameters.
--
function mcl_bone_meal.add_bone_meal_particle(pos, def)
if not def then
def = {}
end
minetest.add_particlespawner({
amount = def.amount or 10,
time = def.time or 0.1,
minpos = def.minpos or vector.subtract(pos, 0.5),
maxpos = def.maxpos or vector.add(pos, 0.5),
minvel = def.minvel or vector.new(-0.01, 0.01, -0.01),
maxvel = def.maxvel or vector.new(0.01, 0.01, 0.01),
minacc = def.minacc or vector.new(0, 0, 0),
maxacc = def.maxacc or vector.new(0, 0, 0),
minexptime = def.minexptime or 1,
maxexptime = def.maxexptime or 4,
minsize = def.minsize or 0.7,
maxsize = def.maxsize or 2.4,
texture = "mcl_particles_bonemeal.png^[colorize:#00EE00:125", -- TODO: real MC color
glow = def.glow or 1,
})
end
-- Begin legacy bone meal API.
--
-- Compatibility code for legacy users of the old bone meal API.
-- This code will be removed at some time in the future.
--
mcl_bone_meal.bone_meal_callbacks = {}
-- Shims for the old API are still available in mcl_dye and defer to
-- the real functions in mcl_bone_meal.
--
function mcl_bone_meal.register_on_bone_meal_apply(func)
minetest.log("warning", "register_on_bone_meal_apply(func) is deprecated. Read mcl_bone_meal/API.md!")
table.insert(mcl_bone_meal.bone_meal_callbacks, func)
end
-- Legacy registered users of the old API are handled through this function.
--
local function apply_bone_meal(pointed_thing, placer)
for _, func in pairs(mcl_bone_meal.bone_meal_callbacks) do
if func(pointed_thing, placer) then
return true
end
end
return false
end
-- End legacy bone meal API
minetest.register_craftitem("mcl_bone_meal:bone_meal", {
description = S("Bone Meal"),
_tt_help = S("Speeds up plant growth"),
_doc_items_longdesc = longdesc,
_doc_items_usagehelp = usagehelp,
inventory_image = "mcl_bone_meal.png",
groups = {craftitem=1},
on_place = function(itemstack, placer, pointed_thing)
local pos = pointed_thing.under
local node = minetest.get_node(pos)
local ndef = minetest.registered_nodes[node.name]
-- Use pointed node's on_rightclick function first, if present.
if placer and not placer:get_player_control().sneak then
if ndef and ndef.on_rightclick then
return ndef.on_rightclick(pos, node, placer, itemstack, pointed_thing) or itemstack
end
end
-- If the pointed node can be bonemealed, let it handle the processing.
if ndef and ndef._mcl_on_bonemealing then
if ndef._mcl_on_bonemealing(pointed_thing, placer) then
mcl_bone_meal.add_bone_meal_particle(pos)
end
if not minetest.is_creative_enabled(placer:get_player_name()) then
itemstack:take_item()
end
-- Otherwise try the legacy API.
elseif apply_bone_meal(pointed_thing, placer) and
not minetest.is_creative_enabled(placer:get_player_name()) then
itemstack:take_item()
end
return itemstack
end,
_on_dispense = function(itemstack, pos, droppos, dropnode, dropdir)
local pointed_thing
if dropnode.name == "air" then
pointed_thing = {above = droppos, under = vector.offset(droppos, 0, -1 ,0)}
else
pointed_thing = {above = pos, under = droppos}
end
local node = minetest.get_node(pointed_thing.under)
local ndef = minetest.registered_nodes[node.name]
-- If the pointed node can be bonemealed, let it handle the processing.
if ndef and ndef._mcl_on_bonemealing then
if ndef._mcl_on_bonemealing(pointed_thing, nil) then
mcl_bone_meal.add_bone_meal_particle(pos)
end
itemstack:take_item()
else
-- Otherwise try the legacy API.
if apply_bone_meal(pointed_thing, nil) then
itemstack:take_item()
end
end
return itemstack
end,
_dispense_into_walkable = true
})
minetest.register_craft({
output = "mcl_bone_meal:bone_meal 3",
recipe = {{"mcl_mobitems:bone"}},
})

View File

@ -0,0 +1,5 @@
# textdomain: mcl_bone_meal
Bone Meal=Knochenmehl
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=Knochenmehl ist ein weißer Farbstoff und auch nützlich als Dünger, um das Wachstum vieler Pflanzen zu beschleunigen.
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=Rechtsklicken Sie auf ein Schaf, um die Wolle weiß einzufärben. Rechtsklicken Sie auf eine Pflanze, um ihr Wachstum zu beschleunigen. Beachten Sie, dass nicht alle Pflanzen darauf ansprechen. Benutzen Sie es auf einem Grasblock, wächst viel hohes Gras und vielleicht auch ein paar Blumen.
Speeds up plant growth=Beschleunigt Pflanzenwachstum

View File

@ -0,0 +1,5 @@
# textdomain: mcl_bone_meal
Bone Meal=Harina de hueso
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=La harina de hueso es un tinte blanco y también es útil como fertilizante para acelerar el crecimiento de muchas plantas.
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=RHaga clic derecho en una oveja para volver su lana blanca. Haga clic derecho en una planta para acelerar su crecimiento. Tenga en cuenta que no todas las plantas pueden ser fertilizadas de esta manera. Cuando haces clic derecho en un bloque de hierba, crecerán hierba alta y flores por todo el lugar.
Speeds up plant growth=Acelera el crecimiento de las plantas

View File

@ -0,0 +1,6 @@
# textdomain: mcl_bone_meal
Bone Meal=Farine d'Os
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=La farine d'os est une teinture blanche et est également utile comme engrais pour accélérer la croissance de nombreuses plantes.
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=
Cliquez avec le bouton droit sur un mouton pour blanchir sa laine. Cliquez avec le bouton droit sur une plante pour accélérer sa croissance. Cependant, toutes les plantes ne peuvent pas être fertilisées de cette manière. Lorsque vous cliquez avec le bouton droit sur un bloc d'herbe, les hautes herbes et les fleurs poussent autour.
Speeds up plant growth=Accélère la croissance des plantes

View File

@ -0,0 +1,5 @@
# textdomain: mcl_bone_meal
Bone Meal=Mączka kostna
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=Mączka kostna to biała farba i przydatny nawóz, który przyspiesza rośnięcie wielu roślin.
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=Kliknij prawym na owcę, aby wybielić jej wełnę. Kliknij prawym na roślinę aby przyspieszyć jej wzrost. Zważ, że nie na wszystkie rośliny to tak działa. Gdy klikniesz prawym na blok trawy, wysoka trawa wyrośnie wokół.
Speeds up plant growth=Przyspiesza wzrost roślin

View File

@ -0,0 +1,5 @@
# textdomain: mcl_bone_meal
Bone Meal=Костная мука
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=Костная мука является белым красителем. Она также полезна в качестве удобрения, чтобы увеличить скорость роста многих растений.
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=Кликните правой по овце, чтобы сделать её шерсть белой. Кликните правой по растению, чтобы ускорить его рост. Имейте в виду, что не все растения можно удобрять таким способом. Если вы кликнете по травяному блоку, то на этом месте вырастет высокая трава и цветы.
Speeds up plant growth=Ускоряет рост растений

View File

@ -0,0 +1,5 @@
# textdomain: mcl_bone_meal
Bone Meal=骨粉
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=骨粉是一種白色染料,也可作為肥料,加速許多植物的生長。
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=右鍵點擊一隻羊,使其羊毛變白。右鍵點擊一株植物以加快其生長速度。注意,不是所有的植物都能像這樣施肥。當你右鍵點擊一個草方時,高高的草和花會到處生長。
Speeds up plant growth=加速植物生長

View File

@ -0,0 +1,5 @@
# textdomain: mcl_bone_meal
Bone Meal=
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=
Speeds up plant growth=

View File

@ -0,0 +1,3 @@
name = mcl_bone_meal
description = Bone meal can be used as a fertilizer and as a dye.
author = kabou

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

View File

@ -187,11 +187,11 @@ minetest.register_on_player_receive_fields(function ( player, formname, fields )
end
end)
if minetest.get_modpath("mcl_dye") and minetest.get_modpath("mcl_mobitems") then
if minetest.get_modpath("mcl_mobitems") then
minetest.register_craft({
type = "shapeless",
output = "mcl_books:writable_book",
recipe = { "mcl_books:book", "mcl_dye:black", "mcl_mobitems:feather" },
recipe = { "mcl_books:book", "mcl_mobitems:ink_sac", "mcl_mobitems:feather" },
})
end

View File

@ -2,29 +2,33 @@ local S = minetest.get_translator(minetest.get_current_modname())
mcl_cocoas = {}
-- Place cocoa
--- Place a cocoa pod.
-- Attempt to place a cocoa pod on a jungle tree. Checks if attachment
-- point is a jungle tree and sets the correct orientation of the stem.
--
function mcl_cocoas.place(itemstack, placer, pt, plantname)
-- check if pointing at a node
if not pt or pt.type ~= "node" then
return
end
local under = minetest.get_node(pt.under)
local node = minetest.get_node(pt.under)
-- return if any of the nodes are not registered
if not minetest.registered_nodes[under.name] then
local def = minetest.registered_nodes[node.name]
if not def then
return
end
-- Am I right-clicking on something that has a custom on_rightclick set?
if placer and not placer:get_player_control().sneak then
if minetest.registered_nodes[under.name] and minetest.registered_nodes[under.name].on_rightclick then
return minetest.registered_nodes[under.name].on_rightclick(pt.under, under, placer, itemstack) or itemstack
if def and def.on_rightclick then
return def.on_rightclick(pt.under, node, placer, itemstack) or itemstack
end
end
-- Check if pointing at jungle tree
if under.name ~= "mcl_core:jungletree"
if node.name ~= "mcl_core:jungletree"
or minetest.get_node(pt.above).name ~= "air" then
return
end
@ -39,9 +43,7 @@ function mcl_cocoas.place(itemstack, placer, pt, plantname)
-- Add the node, set facedir and remove 1 item from the itemstack
minetest.set_node(pt.above, {name = plantname, param2 = minetest.dir_to_facedir(clickdir)})
minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0}, true)
if not minetest.is_creative_enabled(placer:get_player_name()) then
itemstack:take_item()
end
@ -49,137 +51,139 @@ function mcl_cocoas.place(itemstack, placer, pt, plantname)
return itemstack
end
-- Attempts to grow a cocoa at pos, returns true when grown, returns false if there's no cocoa
-- or it is already at full size
--- Grows cocoa pod one size larger.
-- Attempts to grow a cocoa at pos, returns true when grown, returns false
-- if there's no cocoa or it is already at full size.
--
function mcl_cocoas.grow(pos)
local node = minetest.get_node(pos)
if node.name == "mcl_cocoas:cocoa_1" then
minetest.set_node(pos, {name = "mcl_cocoas:cocoa_2", param2 = node.param2})
elseif node.name == "mcl_cocoas:cocoa_2" then
minetest.set_node(pos, {name = "mcl_cocoas:cocoa_3", param2 = node.param2})
return true
else
return false
end
return false
return true
end
-- Note: cocoa beans are implemented as mcl_dye:brown
-- Cocoa definition
-- 1st stage
-- only caller was mcl_dye, now these can be local functions.
-- TODO: remove aliases, replace global functions with local functions.
local cocoa_place = mcl_cocoas.place
local cocoa_grow = mcl_cocoas.grow
-- Cocoa pod variant definitions.
--[[ TODO: Use a mesh for cocoas for perfect texture compability. ]]
local crop_def = {
description = S("Premature Cocoa Pod"),
_doc_items_create_entry = true,
_doc_items_longdesc = S("Cocoa pods grow on the side of jungle trees in 3 stages."),
drawtype = "nodebox",
tiles = {
"[combine:16x16:6,1=mcl_cocoas_cocoa_stage_0.png", "[combine:16x16:6,11=mcl_cocoas_cocoa_stage_0.png",
"mcl_cocoas_cocoa_stage_0.png", "mcl_cocoas_cocoa_stage_0.png^[transformFX",
"[combine:16x16:-5,0=mcl_cocoas_cocoa_stage_0.png", "[combine:16x16:-5,0=mcl_cocoas_cocoa_stage_0.png",
},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
walkable = true,
drop = "mcl_dye:brown",
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.0625, 0.1875, 0.125, 0.25, 0.4375}, -- Pod
-- FIXME: This has a thickness of 0. Is this OK in Minetest?
{0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem
local podinfo = {
{ desc = S("Premature Cocoa Pod"),
longdesc = S("Cocoa pods grow on the side of jungle trees in 3 stages."),
tiles = {
"[combine:16x16:6,1=mcl_cocoas_cocoa_stage_0.png",
"[combine:16x16:6,11=mcl_cocoas_cocoa_stage_0.png",
"mcl_cocoas_cocoa_stage_0.png",
"mcl_cocoas_cocoa_stage_0.png^[transformFX",
"[combine:16x16:-5,0=mcl_cocoas_cocoa_stage_0.png",
"[combine:16x16:-5,0=mcl_cocoas_cocoa_stage_0.png",
},
n_box = {-0.125, -0.0625, 0.1875, 0.125, 0.25, 0.4375},
s_box = {-0.125, -0.0625, 0.1875, 0.125, 0.5, 0.5 },
},
collision_box = {
type = "fixed",
fixed = {
{-0.125, -0.0625, 0.1875, 0.125, 0.25, 0.4375}, -- Pod
{ desc = S("Medium Cocoa Pod"),
tiles = {
"[combine:16x16:5,1=mcl_cocoas_cocoa_stage_1.png",
"[combine:16x16:5,9=mcl_cocoas_cocoa_stage_1.png",
"mcl_cocoas_cocoa_stage_1.png",
"mcl_cocoas_cocoa_stage_1.png^[transformFX",
"[combine:16x16:-4,0=mcl_cocoas_cocoa_stage_1.png",
"[combine:16x16:-4,0=mcl_cocoas_cocoa_stage_1.png",
},
n_box = {-0.1875, -0.1875, 0.0625, 0.1875, 0.25, 0.4375},
s_box = {-0.1875, -0.1875, 0.0625, 0.1875, 0.5, 0.5 },
},
selection_box = {
type = "fixed",
fixed = {
{-0.125, -0.0625, 0.1875, 0.125, 0.5, 0.5}, -- Pod
{ desc = S("Mature Cocoa Pod"),
longdesc = S("A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further."),
tiles = {
-- The following 2 textures were derived from the original
-- because the size of the top/bottom is slightly different :-(
-- TODO: Find a way to *only* use the base texture
"mcl_cocoas_cocoa_top_stage_2.png",
"mcl_cocoas_cocoa_top_stage_2.png^[transformFY",
"mcl_cocoas_cocoa_stage_2.png",
"mcl_cocoas_cocoa_stage_2.png^[transformFX",
"[combine:16x16:-3,0=mcl_cocoas_cocoa_stage_2.png",
"[combine:16x16:-3,0=mcl_cocoas_cocoa_stage_2.png",
},
},
groups = {
handy=1,axey=1, cocoa=1, not_in_creative_inventory=1, dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, attached_node_facedir=1,
},
sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = false,
_mcl_blast_resistance = 3,
_mcl_hardness = 0.2,
}
-- 2nd stage
minetest.register_node("mcl_cocoas:cocoa_1", table.copy(crop_def))
crop_def.description = S("Medium Cocoa Pod")
crop_def._doc_items_create_entry = false
crop_def.groups.cocoa = 2
crop_def.tiles = {
"[combine:16x16:5,1=mcl_cocoas_cocoa_stage_1.png", "[combine:16x16:5,9=mcl_cocoas_cocoa_stage_1.png",
"mcl_cocoas_cocoa_stage_1.png", "mcl_cocoas_cocoa_stage_1.png^[transformFX",
"[combine:16x16:-4,0=mcl_cocoas_cocoa_stage_1.png", "[combine:16x16:-4,0=mcl_cocoas_cocoa_stage_1.png",
}
crop_def.node_box = {
type = "fixed",
fixed = {
{-0.1875, -0.1875, 0.0625, 0.1875, 0.25, 0.4375}, -- Pod
{0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem
},
}
crop_def.collision_box = {
type = "fixed",
fixed = {
{-0.1875, -0.1875, 0.0625, 0.1875, 0.25, 0.4375}, -- Pod
},
}
crop_def.selection_box = {
type = "fixed",
fixed = {
{-0.1875, -0.1875, 0.0625, 0.1875, 0.5, 0.5},
n_box = {-0.25, -0.3125, -0.0625, 0.25, 0.25, 0.4375},
s_box = {-0.25, -0.3125, -0.0625, 0.25, 0.5, 0.5 },
},
}
minetest.register_node("mcl_cocoas:cocoa_2", table.copy(crop_def))
for i = 1, 3 do
local def = {
description = podinfo[i].desc,
_doc_items_create_entry = true,
_doc_items_longdesc = podinfo[i].longdesc,
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
tiles = podinfo[i].tiles,
use_texture_alpha = "clip",
node_box = {
type = "fixed",
fixed = {
podinfo[i].n_box, -- Pod
-- FIXME: This has a thickness of 0. Is this OK in Minetest?
{ 0, 0.25, 0.25, 0, 0.5, 0.5 }, }, -- Stem
},
collision_box = {
type = "fixed",
fixed = podinfo[i].n_box
},
selection_box = {
type = "fixed",
fixed = podinfo[i].s_box
},
groups = {
handy = 1, axey = 1, attached_node_facedir = 1,
dig_by_water = 1, destroy_by_lava_flow = 1, dig_by_piston = 1,
cocoa = i, not_in_creative_inventory = 1,
},
sunlight_propagates = true,
walkable = true,
drop = "mcl_cocoas:cocoa_beans",
sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = false,
_mcl_blast_resistance = 3,
_mcl_hardness = 0.2,
_mcl_on_bonemealing = function(pointed_thing, placer)
local pos = pointed_thing.under
return cocoa_grow(pos)
end,
}
-- Final stage
crop_def.description = S("Mature Cocoa Pod")
crop_def._doc_items_longdesc = S("A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further.")
crop_def._doc_items_create_entry = true
crop_def.groups.cocoa = 3
crop_def.tiles = {
-- The following 2 textures were derived from the original because the size of the top/bottom is slightly different :-(
-- TODO: Find a way to *only* use the base texture
"mcl_cocoas_cocoa_top_stage_2.png", "mcl_cocoas_cocoa_top_stage_2.png^[transformFY",
"mcl_cocoas_cocoa_stage_2.png", "mcl_cocoas_cocoa_stage_2.png^[transformFX",
"[combine:16x16:-3,0=mcl_cocoas_cocoa_stage_2.png", "[combine:16x16:-3,0=mcl_cocoas_cocoa_stage_2.png",
}
crop_def.node_box = {
type = "fixed",
fixed = {
{-0.25, -0.3125, -0.0625, 0.25, 0.25, 0.4375}, -- Pod
{0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem
},
}
crop_def.collision_box = {
type = "fixed",
fixed = {
{-0.25, -0.3125, -0.0625, 0.25, 0.25, 0.4375}, -- Pod
},
}
crop_def.selection_box = {
type = "fixed",
fixed = {
{-0.25, -0.3125, -0.0625, 0.25, 0.5, 0.5},
},
}
crop_def.drop = "mcl_dye:brown 3"
minetest.register_node("mcl_cocoas:cocoa_3", table.copy(crop_def))
if i == 2 then
def._doc_items_longdesc = nil
def._doc_items_create_entry = false
end
if i == 3 then
def.drop = "mcl_cocoas:cocoa_beans 3"
def._mcl_on_bonemealing = nil
end
minetest.register_node("mcl_cocoas:cocoa_" .. i, table.copy(def))
end
minetest.register_craftitem("mcl_cocoas:cocoa_beans", {
description = S("Cocoa Beans"),
_tt_help = S("Grows at the side of jungle trees"),
_doc_items_longdesc = S("Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye."),
_doc_items_usagehelp = S("Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa."),
inventory_image = "mcl_cocoa_beans.png",
groups = {craftitem = 1, compostability = 65},
on_place = function(itemstack, placer, pointed_thing)
return cocoa_place(itemstack, placer, pointed_thing, "mcl_cocoas:cocoa_1")
end,
})
minetest.register_abm({
label = "Cocoa pod growth",
@ -197,4 +201,3 @@ minetest.register_abm({
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mcl_cocoas:cocoa_1", "nodes", "mcl_cocoas:cocoa_2")
end

View File

@ -1,4 +1,8 @@
# textdomain: mcl_cocoas
Cocoa Beans=Kakaobohnen
Grows at the side of jungle trees=Wächst an der Seite von Dschungelbäumen
Cocoa beans can be used to plant cocoa pods, bake chocolate cookies or craft brown dye.=Kakaobohnen können benutzt werden, um Kakao anzupflanzen, Kekse zu backen oder braune Farbstoffe herzustellen.
Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Rechtsklicken Sie an die Seite eines Dschungelbaumstamms (Dschungelholz), um eine junge Kakaoschote zu pflanzen.
Premature Cocoa Pod=Junge Kakaoschote
Cocoa pods grow on the side of jungle trees in 3 stages.=Kakaoschoten wachsen an der Seite von Dschungelbäumen in 3 Stufen.
Medium Cocoa Pod=Mittelgroße Kakaoschote

View File

@ -1,4 +1,8 @@
# textdomain: mcl_cocoas
Cocoa Beans=Granos de cacao
Grows at the side of jungle trees=Crece al lado de los árboles de la jungla
Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.=Los granos de cacao se pueden usar para plantar cacao, hornear galletas o hacer tintes marrones.
Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Haga clic derecho en el costado del tronco de un árbol de la jungla para plantar un cacao joven.
Premature Cocoa Pod=Vaina de cacao prematura
Cocoa pods grow on the side of jungle trees in 3 stages.=Las vainas de cacao crecen al lado de los árboles de jungla en 3 etapas.
Medium Cocoa Pod=Vaina de cacao mediana

View File

@ -1,4 +1,8 @@
# textdomain: mcl_cocoas
Cocoa Beans=Fèves de Cacao
Grows at the side of jungle trees=Pousse à côté des arbres de la jungle
Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.=Les fèves de cacao peuvent être utilisées pour planter du cacao, faire des biscuits ou fabriquer de la teinture brune.
Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Clic droit sur le côté d'un tronc d'arbre de la jungle (Bois Acajou) pour planter un jeune cacaoyer.
Premature Cocoa Pod=Gousse de cacao prématurée
Cocoa pods grow on the side of jungle trees in 3 stages.=Les cabosses de cacao poussent sur le côté des arbres d'Acajou en 3 étapes.
Medium Cocoa Pod=Gousse de cacao moyenne

View File

@ -1,4 +1,8 @@
# textdomain: mcl_cocoas
Cocoa Beans=Ziarna kakaowe
Grows at the side of jungle trees=Rośnie na boku tropikalnych drzew
Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.=Ziarna kakaowe mogą być używane do sadzenia kakao, pieczenia ciasteczek lub robienia brązowego barwnika.
Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Naciśnij prawym na boku tropikalnego pnia (Tropikalne drewno) aby zasadzić młode kakao.
Premature Cocoa Pod=Niedojrzała roślina kakao
Cocoa pods grow on the side of jungle trees in 3 stages.=Roślina kakao rośnie na bokach tropikalnych drzew w 3 etapach
Medium Cocoa Pod=Średnio-dojrzała roślina kakao

View File

@ -1,4 +1,8 @@
# textdomain: mcl_cocoas
Cocoa Beans=Какао-бобы
Grows at the side of jungle trees=Растут на стволах деревьев джунглей
Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.=Какао-бобы можно использовать для посадки какао, выпечки печенья или изготовления коричневого красителя.
Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Кликните правой по боковой части ствола дерева джунглей, чтобы посадить молодое какао.
Premature Cocoa Pod=Молодой стручок какао
Cocoa pods grow on the side of jungle trees in 3 stages.=Стручки какао растут на деревьях джунглей в 3 этапа.
Medium Cocoa Pod=Средний стручок какао

View File

@ -1,4 +1,8 @@
# textdomain: mcl_cocoas
Cocoa Beans=可可豆
Grows at the side of jungle trees=在叢林木側生長
Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.=可可豆可用於種植可可、烘烤餅乾或製作棕色染料。
Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=右鍵點擊叢林木的一側,可以種植一個可可。
Premature Cocoa Pod=成長中的可可豆莢第1階段
Cocoa pods grow on the side of jungle trees in 3 stages.=可可莢果分3個階段生長在叢林樹的側面。
Medium Cocoa Pod=成長中的可可豆莢第2階段

View File

@ -1,4 +1,8 @@
# textdomain: mcl_cocoas
Cocoa Beans=
Grows at the side of jungle trees=
Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.=
Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=
Premature Cocoa Pod=
Cocoa pods grow on the side of jungle trees in 3 stages.=
Medium Cocoa Pod=

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 B

View File

@ -11,7 +11,7 @@ local composter_description = S(
"Composter"
)
local composter_longdesc = S(
"Composters can convert various organic items into bonemeal."
"Composters can convert various organic items into bone meal."
)
local composter_usagehelp = S(
"Use organic items on the composter to fill it with layers of compost. " ..
@ -83,7 +83,7 @@ local function composter_add_item(pos, node, player, itemstack, pointed_thing)
-- get current compost level
local level = registered_nodes[node.name]["_mcl_compost_level"]
-- spawn green particles above new layer
mcl_dye.add_bone_meal_particle(vector_offset(pos, 0, level/8, 0))
mcl_bone_meal.add_bone_meal_particle(vector_offset(pos, 0, level/8, 0))
-- TODO: play some sounds
-- update composter block
if level < 7 then
@ -138,8 +138,8 @@ local function composter_harvest(pos, node, player, itemstack, pointed_thing)
end
-- reset ready type composter to empty type
swap_node(pos, {name="mcl_composters:composter"})
-- spawn bone meal item (wtf dye?! is this how they make white cocoa)
add_item(pos, "mcl_dye:white")
-- spawn bone meal item
add_item(pos, "mcl_bone_meal:bone_meal")
-- TODO play some sounds
return itemstack
end
@ -170,7 +170,7 @@ end
--
minetest.register_node("mcl_composters:composter", {
description = composter_description,
_tt_help = S("Converts organic items into bonemeal"),
_tt_help = S("Converts organic items into bone meal"),
_doc_items_longdesc = composter_longdesc,
_doc_items_usagehelp = composter_usagehelp,
paramtype = "light",

View File

@ -1,7 +1,7 @@
# textdomain: mcl_composters
Composter=
Composters can convert various organic items into bonemeal.=
Composters can convert various organic items into bone meal.=
Use organic items on the composter to fill it with layers of compost. Every time an item is put in the composter, there is a chance that the composter adds another layer of compost. Some items have a bigger chance of adding an extra layer than other items. After filling up with 7 layers of compost, the composter is full. After a delay of approximately one second the composter becomes ready and bone meal can be retrieved from it. Right-clicking the composter takes out the bone meal empties the composter."=
filled=
ready for harvest=
Converts organic items into bonemeal=
Converts organic items into bone meal=

View File

@ -1,5 +1,5 @@
name = mcl_composters
author = kabou
description = Composters can convert various organic items into bonemeal.
depends = mcl_core, mcl_sounds, mcl_dye
depends = mcl_core, mcl_sounds, mcl_bone_meal
optional_depends = doc

View File

@ -126,14 +126,14 @@ minetest.register_craft({
minetest.register_craft({
output = "mcl_core:bone_block",
recipe = {
{ "mcl_dye:white", "mcl_dye:white", "mcl_dye:white" },
{ "mcl_dye:white", "mcl_dye:white", "mcl_dye:white" },
{ "mcl_dye:white", "mcl_dye:white", "mcl_dye:white" },
{ "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal" },
{ "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal" },
{ "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal" },
},
})
minetest.register_craft({
output = "mcl_dye:white 9",
output = "mcl_bone_meal:bone_meal 9",
recipe = {
{ "mcl_core:bone_block" },
},
@ -298,14 +298,14 @@ minetest.register_craft({
minetest.register_craft({
output = "mcl_core:lapisblock",
recipe = {
{"mcl_dye:blue", "mcl_dye:blue", "mcl_dye:blue"},
{"mcl_dye:blue", "mcl_dye:blue", "mcl_dye:blue"},
{"mcl_dye:blue", "mcl_dye:blue", "mcl_dye:blue"},
{"mcl_core:lapis", "mcl_core:lapis", "mcl_core:lapis"},
{"mcl_core:lapis", "mcl_core:lapis", "mcl_core:lapis"},
{"mcl_core:lapis", "mcl_core:lapis", "mcl_core:lapis"},
}
})
minetest.register_craft({
output = "mcl_dye:blue 9",
output = "mcl_core:lapis 9",
recipe = {
{"mcl_core:lapisblock"},
}

View File

@ -99,6 +99,14 @@ minetest.register_craftitem("mcl_core:emerald", {
groups = { craftitem=1 },
})
minetest.register_craftitem("mcl_core:lapis", {
description = S("Lapis Lazuli"),
_doc_items_longdesc = S("Lapis Lazuli are required for enchanting items on an enchanting table."),
inventory_image = "mcl_core_lapis.png",
stack_max = 64,
groups = { craftitem=1 },
})
minetest.register_craftitem("mcl_core:brick", {
description = S("Brick"),
_doc_items_longdesc = S("Bricks are used to craft brick blocks."),

View File

@ -130,6 +130,8 @@ Jungle Wood=Dschungelholz
Jungle Wood Planks=Dschungelholzplanken
Jungle leaves are grown from jungle trees.=Dschungelblätter wachsen an Dschungelbäumen.
Ladder=Leiter
Lapis Lazuli=Lapislazuli
Lapis Lazuli are required for enchanting items on an enchanting table.=Lapislazuli werden zum Verzaubern von Gegenständen auf einem Zaubertisch benötigt.
Lapis Lazuli Block=Lapislazuliblock
Lapis Lazuli Ore=Lapislazulierz
Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=Lapislazulierz ist das Erz von Lapislazuli. Es kann relativ selten in Ansammlungen in der Nähe des Weltbodens gefunden werden.

View File

@ -130,6 +130,8 @@ Jungle Wood=Tronco de jungla
Jungle Wood Planks=Madera de jungla
Jungle leaves are grown from jungle trees.=Las hojas de jungla se cultivan de los árboles de jungla.
Ladder=Escalera
Lapis Lazuli=Lapislázuli
Lapis Lazuli are required for enchanting items on an enchanting table.=Los lapislázuli son necesarios para encantar objetos en una mesa de encantamiento.
Lapis Lazuli Block=Bloque de lapislázuli
Lapis Lazuli Ore=Mena de lapislázuli
Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=El mineral de lapislázuli es el mineral de lapislázuli. Rara vez se puede encontrar en grupos, se encuentra cerca del fondo del mundo.

View File

@ -130,6 +130,8 @@ Jungle Wood=Bois d'Acajou
Jungle Wood Planks=Planches d'Acajou
Jungle leaves are grown from jungle trees.=Les feuilles d'Acajou sont cultivées à partir d'arbres d'Acajou.
Ladder=Échelle
Lapis Lazuli=Lapis Lazuli
Lapis Lazuli are required for enchanting items on an enchanting table.=Les lapis-lazuli sont nécessaires pour enchanter des objets sur une table d'enchantement.
Lapis Lazuli Block=Bloc de Lapis-Lazuli
Lapis Lazuli Ore=Minerai de Lapis-Lazuli
Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=Le minerai de lapis-lazuli produit du lapis-lazuli. Il peut être rarement trouvé dans des filons près du fond du monde.

View File

@ -130,6 +130,8 @@ Jungle Wood=Tropikalne drewno
Jungle Wood Planks=Tropikalne deski
Jungle leaves are grown from jungle trees.=Tropikalne liście rosną na tropikalnych drzewach.
Ladder=Drabina
Lapis Lazuli=Lazuryt
Lapis Lazuli are required for enchanting items on an enchanting table.=Lapis Lazuli są wymagane do zaklinania przedmiotów na zaklinającym stole.
Lapis Lazuli Block=Blok lazurytu
Lapis Lazuli Ore=Ruda lazurytu
Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=Ruda lazurytu jest rzadko występującym blokiem, który można znaleźć w grupach przy dnie świata.

View File

@ -130,6 +130,8 @@ Jungle Wood=Дерево джунглей
Jungle Wood Planks=Доски из дерева джунглей
Jungle leaves are grown from jungle trees.=Листва дерева джунглей произрастает на деревьях джунглей.
Ladder=Лестница
Lapis Lazuli=Ляпис-лазурь
Lapis Lazuli are required for enchanting items on an enchanting table.=Лазурит требуется для зачарования предметов на столе зачаровывания.
Lapis Lazuli Block=Ляпис-лазурный блок
Lapis Lazuli Ore=Ляпис-лазурная руда
Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=Ляпис-лазурная руда это руда ляпис-лазури. Она изредка встречается в виде скоплений вблизи дна мира.

View File

@ -129,6 +129,8 @@ Jungle Wood=叢林原木
Jungle Wood Planks=叢林木材
Jungle leaves are grown from jungle trees.=叢林樹葉是由叢林樹生長出來的。
Ladder=梯子
Lapis Lazuli=青金石
Lapis Lazuli are required for enchanting items on an enchanting table.=为附魔台上的物品附魔需要青金石。
Lapis Lazuli Block=青金石磚
Lapis Lazuli Ore=青金石礦
Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=青金石礦是青金石的礦石。在世界底部附近能發現成群的和稀有的青金石礦。

View File

@ -130,6 +130,8 @@ Jungle Wood=
Jungle Wood Planks=
Jungle leaves are grown from jungle trees.=
Ladder=
Lapis Lazuli=
Lapis Lazuli are required for enchanting items on an enchanting table.=
Lapis Lazuli Block=
Lapis Lazuli Ore=
Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=

View File

@ -179,11 +179,11 @@ minetest.register_node("mcl_core:stone_with_lapis", {
drop = {
max_items = 1,
items = {
{items = {"mcl_dye:blue 8"},rarity = 5},
{items = {"mcl_dye:blue 7"},rarity = 5},
{items = {"mcl_dye:blue 6"},rarity = 5},
{items = {"mcl_dye:blue 5"},rarity = 5},
{items = {"mcl_dye:blue 4"}},
{items = {"mcl_core:lapis 8"},rarity = 5},
{items = {"mcl_core:lapis 7"},rarity = 5},
{items = {"mcl_core:lapis 6"},rarity = 5},
{items = {"mcl_core:lapis 5"},rarity = 5},
{items = {"mcl_core:lapis 4"}},
}
},
sounds = mcl_sounds.node_sound_stone_defaults(),

View File

@ -205,6 +205,14 @@ local function register_sapling(subname, description, longdesc, tt_help, texture
nn == "mcl_core:podzol" or nn == "mcl_core:podzol_snow" or
nn == "mcl_core:dirt" or nn == "mcl_core:mycelium" or nn == "mcl_core:coarse_dirt"
end),
_mcl_on_bonemealing = function(pointed_thing, placer)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
-- Saplings: 45% chance to advance growth stage
if math.random(1,100) <= 45 then
return mcl_core.grow_sapling(pos, n)
end
end,
node_placement_prediction = "",
_mcl_blast_resistance = 0,
_mcl_hardness = 0,

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

View File

@ -7,7 +7,6 @@ local S = minetest.get_translator(modname)
local copper_mod = minetest.get_modpath("mcl_copper")
local cobble = "mcl_deepslate:deepslate_cobbled"
local stick = "mcl_core:stick"
--[[
local mountains = {
@ -101,11 +100,11 @@ end
local lapis_drops = {
max_items = 1, items = {
{ items = { "mcl_dye:blue 8" }, rarity = 5 },
{ items = { "mcl_dye:blue 7" }, rarity = 5 },
{ items = { "mcl_dye:blue 6" }, rarity = 5 },
{ items = { "mcl_dye:blue 5" }, rarity = 5 },
{ items = { "mcl_dye:blue 4" } }
{ items = { "mcl_core:lapis 8" }, rarity = 5 },
{ items = { "mcl_core:lapis 7" }, rarity = 5 },
{ items = { "mcl_core:lapis 6" }, rarity = 5 },
{ items = { "mcl_core:lapis 5" }, rarity = 5 },
{ items = { "mcl_core:lapis 4" } }
}
}
@ -115,7 +114,7 @@ local deepslate_ores = {
{ "Gold", "mcl_raw_ores:raw_gold", "mcl_core:gold_ingot", 4, 0 },
{ "Emerald", "mcl_core:emerald", "mcl_core:emerald", 4, 6 },
{ "Diamond", "mcl_core:diamond", "mcl_core:diamond", 4, 4 },
{ "Lapis Lazuli", lapis_drops, "mcl_dye:blue", 3, 6 },
{ "Lapis Lazuli", lapis_drops, "mcl_core:lapis", 3, 6 },
}
for _, p in pairs(deepslate_ores) do

View File

@ -1,14 +0,0 @@
# mcl_dye
# Bone meal API
Callback and particle functions.
## mcl_dye.add_bone_meal_particle(pos, def)
Spawns standard or custom bone meal particles.
* `pos`: position, is ignored if you define def.minpos and def.maxpos
* `def`: (optional) particle definition
## mcl_dye.register_on_bone_meal_apply(function(pointed_thing, user))
Called when the bone meal is applied anywhere.
* `pointed_thing`: exact pointing location (see Minetest API), where the bone meal is applied
* `user`: ObjectRef of the player who aplied the bone meal, can be nil!

View File

@ -15,7 +15,6 @@ mcl_dye = {}
local S = minetest.get_translator(minetest.get_current_modname())
local math = math
local string = string
-- Other mods can use these for looping through available colors
@ -62,43 +61,39 @@ mcl_dye.excolors = {"white", "lightgrey", "grey", "darkgrey", "black", "red", "o
-- - unicolor_medium_<excolor>_s50
-- - unicolor_dark_<excolor>_s50
-- Local stuff
local dyelocal = {}
-- This collection of colors is partly a historic thing, partly something else.
dyelocal.dyes = {
{"white", "mcl_dye_white", S("Bone Meal"), {dye=1, craftitem=1, basecolor_white=1, excolor_white=1, unicolor_white=1}},
{"grey", "dye_grey", S("Light Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}},
{"dark_grey", "dye_dark_grey", S("Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}},
{"black", "mcl_dye_black", S("Ink Sac"), {dye=1, craftitem=1, basecolor_black=1, excolor_black=1, unicolor_black=1}},
{"violet", "dye_violet", S("Purple Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}},
{"blue", "mcl_dye_blue", S("Lapis Lazuli"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_blue=1}},
{"lightblue", "mcl_dye_light_blue", S("Light Blue Dye"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_light_blue=1}},
{"cyan", "dye_cyan", S("Cyan Dye"), {dye=1, craftitem=1, basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}},
{"dark_green", "dye_dark_green", S("Cactus Green"),{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}},
{"green", "mcl_dye_lime", S("Lime Dye"), {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}},
{"yellow", "dye_yellow", S("Dandelion Yellow"), {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}},
{"brown", "mcl_dye_brown", S("Cocoa Beans"), {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1, compostability = 65}},
{"orange", "dye_orange", S("Orange Dye"), {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}},
{"red", "dye_red", S("Rose Red"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}},
{"magenta", "dye_magenta", S("Magenta Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}},
{"pink", "dye_pink", S("Pink Dye"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_light_red=1}},
local dyes = {
{"white", S("White Dye"), {basecolor_white=1, excolor_white=1, unicolor_white=1}},
{"grey", S("Light Grey Dye"), {basecolor_grey=1, excolor_grey=1, unicolor_grey=1}},
{"dark_grey", S("Grey Dye"), {basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}},
{"black", S("Black Dye"), {basecolor_black=1, excolor_black=1, unicolor_black=1}},
{"violet", S("Purple Dye"), {basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}},
{"blue", S("Blue Dye"), {basecolor_blue=1, excolor_blue=1, unicolor_blue=1}},
{"lightblue", S("Light Blue Dye"), {basecolor_blue=1, excolor_blue=1, unicolor_light_blue=1}},
{"cyan", S("Cyan Dye"), {basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}},
{"dark_green", S("Cactus Green"), {basecolor_green=1, excolor_green=1, unicolor_dark_green=1}},
{"green", S("Lime Dye"), {basecolor_green=1, excolor_green=1, unicolor_green=1}},
{"yellow", S("Dandelion Yellow"), {basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}},
{"brown", S("Brown Dye"), {basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1}},
{"orange", S("Orange Dye"), {basecolor_orange=1, excolor_orange=1, unicolor_orange=1}},
{"red", S("Rose Red"), {basecolor_red=1, excolor_red=1, unicolor_red=1}},
{"magenta", S("Magenta Dye"), {basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}},
{"pink", S("Pink Dye"), {basecolor_red=1, excolor_red=1, unicolor_light_red=1}},
}
local mg_name = minetest.get_mapgen_setting("mg_name")
dyelocal.unicolor_to_dye_id = {}
for d=1, #dyelocal.dyes do
for k, _ in pairs(dyelocal.dyes[d][4]) do
local unicolor_to_dye_id = {}
for d = 1, #dyes do
for k, _ in pairs(dyes[d][3]) do
if string.sub(k, 1, 9) == "unicolor_" then
dyelocal.unicolor_to_dye_id[k] = dyelocal.dyes[d][1]
unicolor_to_dye_id[k] = dyes[d][1]
end
end
end
-- Takes an unicolor group name (e.g. “unicolor_white”) and returns a corresponding dye name (if it exists), nil otherwise.
-- Takes an unicolor group name (e.g. “unicolor_white”) and returns a
-- corresponding dye name (if it exists), nil otherwise.
function mcl_dye.unicolor_to_dye(unicolor_group)
local color = dyelocal.unicolor_to_dye_id[unicolor_group]
local color = unicolor_to_dye_id[unicolor_group]
if color then
return "mcl_dye:" .. color
else
@ -107,323 +102,32 @@ function mcl_dye.unicolor_to_dye(unicolor_group)
end
-- Define items
for _, row in ipairs(dyelocal.dyes) do
local name = row[1]
-- White and brown dyes are defined explicitly below
if name ~= "white" and name ~= "brown" then
local img = row[2]
local description = row[3]
local groups = row[4]
local item_name = "mcl_dye:"..name
local item_image = img..".png"
minetest.register_craftitem(item_name, {
inventory_image = item_image,
description = description,
_doc_items_longdesc = S("This item is a dye which is used for dyeing and crafting."),
_doc_items_usagehelp = S("Rightclick on a sheep to dye its wool. Other things are dyed by crafting."),
groups = groups,
stack_max = 64,
})
end
end
-- Bone Meal
function mcl_dye.add_bone_meal_particle(pos, def)
if not def then
def = {}
end
minetest.add_particlespawner({
amount = def.amount or 10,
time = def.time or 0.1,
minpos = def.minpos or vector.subtract(pos, 0.5),
maxpos = def.maxpos or vector.add(pos, 0.5),
minvel = def.minvel or vector.new(-0.01, 0.01, -0.01),
maxvel = def.maxvel or vector.new(0.01, 0.01, 0.01),
minacc = def.minacc or vector.new(0, 0, 0),
maxacc = def.maxacc or vector.new(0, 0, 0),
minexptime = def.minexptime or 1,
maxexptime = def.maxexptime or 4,
minsize = def.minsize or 0.7,
maxsize = def.maxsize or 2.4,
texture = "mcl_particles_bonemeal.png^[colorize:#00EE00:125", -- TODO: real MC color
glow = def.glow or 1,
for _, row in ipairs(dyes) do
local groups = row[3]
groups.dye = 1
groups.craftitem = 1
minetest.register_craftitem("mcl_dye:" .. row[1], {
inventory_image = "mcl_dye_" .. row[1] .. ".png",
description = row[2],
_doc_items_longdesc = S("This item is a dye which is used for dyeing and crafting."),
_doc_items_usagehelp = S("Rightclick on a sheep to dye its wool. Other things are dyed by crafting."),
groups = groups,
})
end
mcl_dye.bone_meal_callbacks = {}
-- Legacy support for things now in mcl_bone_meal.
-- These shims will at some time in the future be removed.
--
function mcl_dye.add_bone_meal_particle(pos, def)
minetest.log("warning", "mcl_dye.add_bone_meal_particles() is deprecated. Read mcl_bone_meal/API.md!")
mcl_bone_meal.add_bone_meal_particle(pos, def)
end
function mcl_dye.register_on_bone_meal_apply(func)
table.insert(mcl_dye.bone_meal_callbacks, func)
minetest.log("warning", "mcl_dye.register_on_bone_meal_apply() is deprecated. Read mcl_bone_meal/API.md!")
mcl_bone_meal.register_on_bone_meal_apply(func)
end
local function apply_bone_meal(pointed_thing)
-- Bone meal currently spawns all flowers found in the plains.
local flowers_table_plains = {
"mcl_flowers:dandelion",
"mcl_flowers:dandelion",
"mcl_flowers:poppy",
"mcl_flowers:oxeye_daisy",
"mcl_flowers:tulip_orange",
"mcl_flowers:tulip_red",
"mcl_flowers:tulip_white",
"mcl_flowers:tulip_pink",
"mcl_flowers:azure_bluet",
}
local flowers_table_simple = {
"mcl_flowers:dandelion",
"mcl_flowers:poppy",
}
local flowers_table_swampland = {
"mcl_flowers:blue_orchid",
}
local flowers_table_flower_forest = {
"mcl_flowers:dandelion",
"mcl_flowers:poppy",
"mcl_flowers:oxeye_daisy",
"mcl_flowers:tulip_orange",
"mcl_flowers:tulip_red",
"mcl_flowers:tulip_white",
"mcl_flowers:tulip_pink",
"mcl_flowers:azure_bluet",
"mcl_flowers:allium",
}
local pos = pointed_thing.under
local n = minetest.get_node(pos)
if n.name == "" then return false end
for _, func in pairs(mcl_dye.bone_meal_callbacks) do
if func(pointed_thing, user) then
return true
end
end
if minetest.get_item_group(n.name, "sapling") >= 1 then
mcl_dye.add_bone_meal_particle(pos)
-- Saplings: 45% chance to advance growth stage
if math.random(1,100) <= 45 then
return mcl_core.grow_sapling(pos, n)
end
elseif minetest.get_item_group(n.name, "mushroom") == 1 then
mcl_dye.add_bone_meal_particle(pos)
-- Try to grow huge mushroom
-- Must be on a dirt-type block
local below = minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z})
if below.name ~= "mcl_core:mycelium" and below.name ~= "mcl_core:dirt" and minetest.get_item_group(below.name, "grass_block") ~= 1 and below.name ~= "mcl_core:coarse_dirt" and below.name ~= "mcl_core:podzol" then
return false
end
-- Select schematic
local schematic, offset, height
if n.name == "mcl_mushrooms:mushroom_brown" then
schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_brown.mts"
offset = { x = -3, y = -1, z = -3 }
height = 8
elseif n.name == "mcl_mushrooms:mushroom_red" then
schematic = minetest.get_modpath("mcl_mushrooms").."/schematics/mcl_mushrooms_huge_red.mts"
offset = { x = -2, y = -1, z = -2 }
height = 8
else
return false
end
-- 40% chance
if math.random(1, 100) <= 40 then
-- Check space requirements
for i=1,3 do
local cpos = vector.add(pos, {x=0, y=i, z=0})
if minetest.get_node(cpos).name ~= "air" then
return false
end
end
local yoff = 3
local minp, maxp = {x=pos.x-3, y=pos.y+yoff, z=pos.z-3}, {x=pos.x+3, y=pos.y+yoff+(height-3), z=pos.z+3}
local diff = vector.subtract(maxp, minp)
diff = vector.add(diff, {x=1,y=1,z=1})
local totalnodes = diff.x * diff.y * diff.z
local goodnodes = minetest.find_nodes_in_area(minp, maxp, {"air", "group:leaves"})
if #goodnodes < totalnodes then
return false
end
-- Place the huge mushroom
minetest.remove_node(pos)
local place_pos = vector.add(pos, offset)
local ok = minetest.place_schematic(place_pos, schematic, 0, nil, false)
return ok ~= nil
end
return false
-- Wheat, Potato, Carrot, Pumpkin Stem, Melon Stem: Advance by 2-5 stages
elseif string.find(n.name, "mcl_farming:wheat_") then
mcl_dye.add_bone_meal_particle(pos)
local stages = math.random(2, 5)
return mcl_farming:grow_plant("plant_wheat", pos, n, stages, true)
elseif string.find(n.name, "mcl_farming:potato_") then
mcl_dye.add_bone_meal_particle(pos)
local stages = math.random(2, 5)
return mcl_farming:grow_plant("plant_potato", pos, n, stages, true)
elseif string.find(n.name, "mcl_farming:carrot_") then
mcl_dye.add_bone_meal_particle(pos)
local stages = math.random(2, 5)
return mcl_farming:grow_plant("plant_carrot", pos, n, stages, true)
elseif string.find(n.name, "mcl_farming:pumpkin_") then
mcl_dye.add_bone_meal_particle(pos)
local stages = math.random(2, 5)
return mcl_farming:grow_plant("plant_pumpkin_stem", pos, n, stages, true)
elseif string.find(n.name, "mcl_farming:melontige_") then
mcl_dye.add_bone_meal_particle(pos)
local stages = math.random(2, 5)
return mcl_farming:grow_plant("plant_melon_stem", pos, n, stages, true)
elseif string.find(n.name, "mcl_farming:beetroot_") then
mcl_dye.add_bone_meal_particle(pos)
-- Beetroot: 75% chance to advance to next stage
if math.random(1, 100) <= 75 then
return mcl_farming:grow_plant("plant_beetroot", pos, n, 1, true)
end
elseif n.name == "mcl_cocoas:cocoa_1" or n.name == "mcl_cocoas:cocoa_2" then
mcl_dye.add_bone_meal_particle(pos)
-- Cocoa: Advance by 1 stage
mcl_cocoas.grow(pos)
return true
elseif minetest.get_item_group(n.name, "grass_block") == 1 then
-- Grass Block: Generate tall grass and random flowers all over the place
for i = -7, 7 do
for j = -7, 7 do
for y = -1, 1 do
pos = vector.offset(pointed_thing.above, i, y, j)
n = minetest.get_node(pos)
local n2 = minetest.get_node(vector.offset(pos, 0, -1, 0))
if n.name ~= "" and n.name == "air" and (minetest.get_item_group(n2.name, "grass_block_no_snow") == 1) then
-- Randomly generate flowers, tall grass or nothing
if math.random(1, 100) <= 90 / ((math.abs(i) + math.abs(j)) / 2)then
-- 90% tall grass, 10% flower
mcl_dye.add_bone_meal_particle(pos, {amount = 4})
if math.random(1,100) <= 90 then
local col = n2.param2
minetest.add_node(pos, {name="mcl_flowers:tallgrass", param2=col})
else
local flowers_table
if mg_name == "v6" then
flowers_table = flowers_table_plains
else
local biome = minetest.get_biome_name(minetest.get_biome_data(pos).biome)
if biome == "Swampland" or biome == "Swampland_shore" or biome == "Swampland_ocean" or biome == "Swampland_deep_ocean" or biome == "Swampland_underground" then
flowers_table = flowers_table_swampland
elseif biome == "FlowerForest" or biome == "FlowerForest_beach" or biome == "FlowerForest_ocean" or biome == "FlowerForest_deep_ocean" or biome == "FlowerForest_underground" then
flowers_table = flowers_table_flower_forest
elseif biome == "Plains" or biome == "Plains_beach" or biome == "Plains_ocean" or biome == "Plains_deep_ocean" or biome == "Plains_underground" or biome == "SunflowerPlains" or biome == "SunflowerPlains_ocean" or biome == "SunflowerPlains_deep_ocean" or biome == "SunflowerPlains_underground" then
flowers_table = flowers_table_plains
else
flowers_table = flowers_table_simple
end
end
minetest.add_node(pos, {name=flowers_table[math.random(1, #flowers_table)]})
end
end
end
end
end
end
return true
-- Double flowers: Drop corresponding item
elseif n.name == "mcl_flowers:rose_bush" or n.name == "mcl_flowers:rose_bush_top" then
mcl_dye.add_bone_meal_particle(pos)
minetest.add_item(pos, "mcl_flowers:rose_bush")
return true
elseif n.name == "mcl_flowers:peony" or n.name == "mcl_flowers:peony_top" then
mcl_dye.add_bone_meal_particle(pos)
minetest.add_item(pos, "mcl_flowers:peony")
return true
elseif n.name == "mcl_flowers:lilac" or n.name == "mcl_flowers:lilac_top" then
mcl_dye.add_bone_meal_particle(pos)
minetest.add_item(pos, "mcl_flowers:lilac")
return true
elseif n.name == "mcl_flowers:sunflower" or n.name == "mcl_flowers:sunflower_top" then
mcl_dye.add_bone_meal_particle(pos)
minetest.add_item(pos, "mcl_flowers:sunflower")
return true
elseif n.name == "mcl_flowers:tallgrass" then
mcl_dye.add_bone_meal_particle(pos)
-- Tall Grass: Grow into double tallgrass
local toppos = { x=pos.x, y=pos.y+1, z=pos.z }
local topnode = minetest.get_node(toppos)
if minetest.registered_nodes[topnode.name].buildable_to then
minetest.set_node(pos, { name = "mcl_flowers:double_grass", param2 = n.param2 })
minetest.set_node(toppos, { name = "mcl_flowers:double_grass_top", param2 = n.param2 })
return true
end
elseif n.name == "mcl_flowers:fern" then
mcl_dye.add_bone_meal_particle(pos)
-- Fern: Grow into large fern
local toppos = { x=pos.x, y=pos.y+1, z=pos.z }
local topnode = minetest.get_node(toppos)
if minetest.registered_nodes[topnode.name].buildable_to then
minetest.set_node(pos, { name = "mcl_flowers:double_fern", param2 = n.param2 })
minetest.set_node(toppos, { name = "mcl_flowers:double_fern_top", param2 = n.param2 })
return true
end
end
return false
end
minetest.register_craftitem("mcl_dye:white", {
inventory_image = "mcl_dye_white.png",
description = S("Bone Meal"),
_tt_help = S("Speeds up plant growth"),
_doc_items_longdesc = S("Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants."),
_doc_items_usagehelp = S("Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place."),
stack_max = 64,
groups = dyelocal.dyes[1][4],
on_place = function(itemstack, user, pointed_thing)
-- Use pointed node's on_rightclick function first, if present
local node = minetest.get_node(pointed_thing.under)
if user and not user:get_player_control().sneak then
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, user, itemstack) or itemstack
end
end
-- Use the bone meal on the ground
if (apply_bone_meal(pointed_thing, user) and (not minetest.is_creative_enabled(user:get_player_name()))) then
itemstack:take_item()
end
return itemstack
end,
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)
-- Apply bone meal, if possible
local pointed_thing
if dropnode.name == "air" then
pointed_thing = { above = droppos, under = { x=droppos.x, y=droppos.y-1, z=droppos.z } }
else
pointed_thing = { above = pos, under = droppos }
end
local success = apply_bone_meal(pointed_thing, nil)
if success then
stack:take_item()
end
return stack
end,
_dispense_into_walkable = true
})
minetest.register_craftitem("mcl_dye:brown", {
inventory_image = "mcl_dye_brown.png",
_tt_help = S("Grows at the side of jungle trees"),
_doc_items_longdesc = S("Cocoa beans are a brown dye and can be used to plant cocoas."),
_doc_items_usagehelp = S("Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa."),
description = S("Cocoa Beans"),
stack_max = 64,
groups = dyelocal.dyes[12][4],
on_place = function(itemstack, placer, pointed_thing)
return mcl_cocoas.place(itemstack, placer, pointed_thing, "mcl_cocoas:cocoa_1")
end,
})
-- End of legacy support
-- Dye mixing
minetest.register_craft({
@ -466,19 +170,16 @@ minetest.register_craft({
output = "mcl_dye:magenta 2",
recipe = {"mcl_dye:violet", "mcl_dye:pink"},
})
minetest.register_craft({
type = "shapeless",
output = "mcl_dye:pink 2",
recipe = {"mcl_dye:red", "mcl_dye:white"},
})
minetest.register_craft({
type = "shapeless",
output = "mcl_dye:cyan 2",
recipe = {"mcl_dye:blue", "mcl_dye:dark_green"},
})
minetest.register_craft({
type = "shapeless",
output = "mcl_dye:violet 2",
@ -491,6 +192,14 @@ minetest.register_craft({
})
-- Dye creation
minetest.register_craft({
output = "mcl_dye:black",
recipe = {{"mcl_mobitems:ink_sac"}},
})
minetest.register_craft({
output = "mcl_dye:white",
recipe = {{"mcl_bone_meal:bone_meal"}},
})
minetest.register_craft({
output = "mcl_dye:yellow",
recipe = {{"mcl_flowers:dandelion"}},
@ -499,6 +208,10 @@ minetest.register_craft({
output = "mcl_dye:yellow 2",
recipe = {{"mcl_flowers:sunflower"}},
})
minetest.register_craft({
output = "mcl_dye:blue",
recipe = {{"mcl_core:lapis"}},
})
minetest.register_craft({
output = "mcl_dye:lightblue",
recipe = {{"mcl_flowers:blue_orchid"}},
@ -523,6 +236,10 @@ minetest.register_craft({
output = "mcl_dye:magenta 2",
recipe = {{"mcl_flowers:lilac"}},
})
minetest.register_craft({
output = "mcl_dye:brown",
recipe = {{"mcl_cocoas:cocoa_beans"}},
})
minetest.register_craft({
output = "mcl_dye:orange",
recipe = {{"mcl_flowers:tulip_orange"}},
@ -557,7 +274,3 @@ minetest.register_craft({
recipe = "mcl_core:cactus",
cooktime = 10,
})
minetest.register_craft({
output = "mcl_dye:white 3",
recipe = {{"mcl_mobitems:bone"}},
})

View File

@ -1,27 +1,19 @@
# textdomain: mcl_dye
Bone Meal=Knochenmehl
White Dye=Weißer Farbstoff
Light Grey Dye=Hellgrauer Farbstoff
Grey Dye=Grauer Farbstoff
Ink Sac=Tintenbeutel
Black Dye=Schwarzer Farbstoff
Purple Dye=Violetter Farbstoff
Lapis Lazuli=Lapislazuli
Blue Dye=Blaue Farbstoff
Light Blue Dye=Hellblauer Farbstoff
Cyan Dye=Türkiser Farbstoff
Cactus Green=Kaktusgrün
Lime Dye=Lindgrüner Farbstoff
Dandelion Yellow=Löwenzahngelb
Cocoa Beans=Kakaobohnen
Brown Dye=Brauner Farbstoff
Orange Dye=Orange Farbstoff
Rose Red=Rosenrot
Magenta Dye=Magenta Farbstoff
Pink Dye=Rosa Farbstoff
This item is a dye which is used for dyeing and crafting.=Dieser Gegenstand ist ein Farbstoff, der zum Einfärben und in der Herstellung benutzt werden kann.
Rightclick on a sheep to dye its wool. Other things are dyed by crafting.=Rechtsklicken Sie auf ein Schaf, um seine Wolle zu färben. Andere Dinge werden mit der Fertigung eingefärbt.
Bone Meal=Knochenmehl
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=Knochenmehl ist ein weißer Farbstoff und auch nützlich als Dünger, um das Wachstum vieler Pflanzen zu beschleunigen.
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=Rechtsklicken Sie auf ein Schaf, um die Wolle weiß einzufärben. Rechtsklicken Sie auf eine Pflanze, um ihr Wachstum zu beschleunigen. Beachten Sie, dass nicht alle Pflanzen darauf ansprechen. Benutzen Sie es auf einem Grasblock, wächst viel hohes Gras und vielleicht auch ein paar Blumen.
Cocoa beans are a brown dye and can be used to plant cocoas.=Kakaobohnen sind ein brauner Farbstoff und werden benutzt, um Kakao anzupflanzen.
Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Rechtsklicken Sie auf ein Schaf, um die Wolle braun einzufärben. Rechtsklicken Sie an die Seite eines Dschungelbaumstamms (Dschungelholz), um eine junge Kakaoschote zu pflanzen.
Cocoa Beans=Kakaobohnen
Grows at the side of jungle trees=Wächst an der Seite von Dschungelbäumen
Speeds up plant growth=Beschleunigt Pflanzenwachstum

View File

@ -1,25 +1,19 @@
# textdomain: mcl_dye
Bone Meal=Harina de hueso
White Dye=Tinte blanca
Light Grey Dye=Tinte gris claro
Grey Dye=Tinte gris
Ink Sac=Saco de tinta
Black Dye=Tinte negro
Purple Dye=Tinte púrpura
Lapis Lazuli=Lapislázuli
Blue Dye=Tinte azul
Light Blue Dye=Tinte azul claro
Cyan Dye=Tinte cian
Cactus Green=Tinte verde
Lime Dye=Tinte amarillo verdoso
Dandelion Yellow=Tinte amarillo
Cocoa Beans=Granos de cacao
Brown Dye=Tinte marrón
Orange Dye=Tinte naranja
Rose Red=Tinte rojo
Magenta Dye=Tinte magenta
Pink Dye=Tinte rosado
This item is a dye which is used for dyeing and crafting.=Este artículo es un tinte que se utiliza para teñir y elaborar.
Rightclick on a sheep to dye its wool. Other things are dyed by crafting.=Haga clic derecho sobre una oveja para teñir su lana. Otras cosas pueden ser teñidas mediante la elaboración.
Bone Meal=Harina de hueso
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=La harina de hueso es un tinte blanco y también es útil como fertilizante para acelerar el crecimiento de muchas plantas.
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=RHaga clic derecho en una oveja para volver su lana blanca. Haga clic derecho en una planta para acelerar su crecimiento. Tenga en cuenta que no todas las plantas pueden ser fertilizadas de esta manera. Cuando haces clic derecho en un bloque de hierba, crecerán hierba alta y flores por todo el lugar.
Cocoa beans are a brown dye and can be used to plant cocoas.=Los granos de cacao son un tinte marrón y se pueden usar para plantar cacao.
Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Haga clic derecho en una oveja para convertir su lana en marrón. Haga clic derecho en el costado del tronco de un árbol de jungla para plantar un cacao joven.
Cocoa Beans=Granos de cacao

View File

@ -1,27 +1,19 @@
# textdomain: mcl_dye
Bone Meal=Poudre d'Os
White Dye=Teinture Blanche
Light Grey Dye=Teinture Gris Clair
Grey Dye=Teinture Gris
Ink Sac=Poche d'Encre
Black Dye=Teinture Noire
Purple Dye=Teinture Violette
Lapis Lazuli=Lapis Lazuli
Blue Dye=Teinture Bleu
Light Blue Dye=Teinture Bleu Clair
Cyan Dye=Teinture Cyan
Cactus Green=Cactus Vert
Lime Dye=Teinture Vert Clair
Dandelion Yellow=Pissenlit Jaune
Cocoa Beans=Fèves de Cacao
Brown Dye=Teinture Marron
Orange Dye=Teinture Orange
Rose Red=Rose Rouge
Magenta Dye=Teinture Magenta
Pink Dye=Teinture Rose
This item is a dye which is used for dyeing and crafting.=Cet objet est un colorant utilisé pour la teinture et l'artisanat.
Rightclick on a sheep to dye its wool. Other things are dyed by crafting.=Clic droit sur un mouton pour teindre sa laine. D'autres choses sont teintes par l'artisanat.
Bone Meal=Farine d'Os
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=La farine d'os est une teinture blanche et également utile comme engrais pour accélérer la croissance de nombreuses plantes.
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=Cliquez avec le bouton droit sur un mouton pour blanchir sa laine. Cliquez avec le bouton droit sur une plante pour accélérer sa croissance. Notez que toutes les plantes ne peuvent pas être fertilisées comme ça. Lorsque vous cliquez avec le bouton droit sur un bloc d'herbe, les hautes herbes et les fleurs poussent partout.
Cocoa beans are a brown dye and can be used to plant cocoas.=Les fèves de cacao ont une teinture brune et peuvent être utilisées pour planter du cacao.
Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Faites un clic droit sur un mouton pour brunir sa laine. Clic droit sur le côté d'un tronc d'arbre de la jungle (Bois Acajou) pour planter un jeune cacao.
Cocoa Beans=Fèves de Cacao
Grows at the side of jungle trees=Pousse à côté des arbres de la jungle
Speeds up plant growth=Accélère la croissance des plantes

View File

@ -1,27 +1,19 @@
# textdomain: mcl_dye
Bone Meal=Mączka kostna
White Dye=Biały farba
Light Grey Dye=Jasnoszara farba
Grey Dye=Szara farba
Ink Sac=Torbiel z atramentem
Black Dye=Czarny farba
Purple Dye=Fioletowa farba
Lapis Lazuli=Lazuryt
Blue Dye=Niebieska farba
Light Blue Dye=Jasnoniebieska farba
Cyan Dye=Błękitna farba
Cactus Green=Kaktusowa zieleń
Lime Dye=Jasnozielona farba
Dandelion Yellow=Mleczowy żółty
Cocoa Beans=Ziarna kakaowe
Brown Dye=Brązowy farba
Orange Dye=Pomarańczowa farba
Rose Red=Różany czerwony
Magenta Dye=Karmazynowa farba
Pink Dye=Różowa farba
This item is a dye which is used for dyeing and crafting.=Ten przedmiot to farba wykorzystywana to farbowania i wytwarzania.
Rightclick on a sheep to dye its wool. Other things are dyed by crafting.=Kliknij prawym na owcę aby zafarbować jej wełnę. Inne rzeczy mogą być zafarbowane przy wytwarzaniu.
Bone Meal=Mączka kostna
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=Mączka kostna to biała farba i przydatny nawóz, który przyspiesza rośnięcie wielu roślin.
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=Kliknij prawym na owcę, aby wybielić jej wełnę. Kliknij prawym na roślinę aby przyspieszyć jej wzrost. Zważ, że nie na wszystkie rośliny to tak działa. Gdy klikniesz prawym na blok trawy, wysoka trawa wyrośnie wokół.
Cocoa beans are a brown dye and can be used to plant cocoas.=Ziarna kakaowe mogą być wykorzystane do sadzenia kakao.
Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Naciśnij prawym aby zafarbować wełnę owcy na brązowo. Naciśnij prawym na boku tropikalnego pnia (Tropikalne drewno) aby zasadzić młode kakao.
Cocoa Beans=Ziarna kakaowe
Grows at the side of jungle trees=Rośnie na boku tropikalnych drzew
Speeds up plant growth=Przyspiesza wzrost roślin

View File

@ -1,27 +1,19 @@
# textdomain: mcl_dye
Bone Meal=Костная мука
White Dye=Белый краситель
Light Grey Dye=Светло-серый краситель
Grey Dye=Серый краситель
Ink Sac=Чернильный мешок
Black Dye=Чёрный краситель
Purple Dye=Пурпурный краситель
Lapis Lazuli=Ляпис-лазурь
Blue Dye=голубой краситель
Light Blue Dye=Светло-голубой краситель
Cyan Dye=Голубой краситель
Cactus Green=Зелень кактуса
Lime Dye=Зелёный лаймовый краситель
Dandelion Yellow=Одуванчиковый жёлтый краситель
Cocoa Beans=Какао-бобы
Brown Dye=Коричневый краситель
Orange Dye=Оранжевый краситель
Rose Red=Экстракт красной розы
Magenta Dye=Фиолетовый краситель
Pink Dye=Розовый краситель
This item is a dye which is used for dyeing and crafting.=Это краситель, которые используется, чтобы окрашивать и крафтить.
Rightclick on a sheep to dye its wool. Other things are dyed by crafting.=Кликните правой по овце, чтобы окрасить её шерсть. Остальные вещи окрашиваются путём крафтинга.
Bone Meal=Костная мука
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=Костная мука является белым красителем. Она также полезна в качестве удобрения, чтобы увеличить скорость роста многих растений.
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=Кликните правой по овце, чтобы сделать её шерсть белой. Кликните правой по растению, чтобы ускорить его рост. Имейте в виду, что не все растения можно удобрять таким способом. Если вы кликнете по травяному блоку, то на этом месте вырастет высокая трава и цветы.
Cocoa beans are a brown dye and can be used to plant cocoas.=Какао-бобы являются коричневым красителем. Их также можно использовать, чтобы посадить какао.
Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Кликните правой по овце, чтобы сделать её шерсть коричневой. Кликните правой по боковой части ствола дерева джунглей, чтобы посадить молодое какао.
Cocoa Beans=Какао-бобы
Grows at the side of jungle trees=Растут на стволах деревьев джунглей
Speeds up plant growth=Ускоряет рост растений

View File

@ -1,25 +1,19 @@
# textdomain: mcl_dye
Bone Meal=骨粉
White Dye=白色染料
Light Grey Dye=淺灰色染料
Grey Dye=灰色染料
Ink Sac=墨囊
Black Dye=黑色染料
Purple Dye=紫色染料
Lapis Lazuli=青金石
Blue Dye=藍色染料
Light Blue Dye=淺藍色染料
Cyan Dye=青色染料
Cactus Green=仙人掌綠
Lime Dye=淺綠色染料
Dandelion Yellow=蒲公英黃
Cocoa Beans=可可豆
Brown Dye=棕色染料
Orange Dye=橙色染料
Rose Red=玫瑰紅
Magenta Dye=洋紅色染料
Pink Dye=粉紅色染料
This item is a dye which is used for dyeing and crafting.=這個物品是一種用於染色和合成的染料。
Rightclick on a sheep to dye its wool. Other things are dyed by crafting.=右鍵單擊綿羊以染它的毛。其他東西是通過合成染色的。
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=骨粉是一種白色染料,也可作為肥料,加速許多植物的生長。
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=右鍵點擊一隻羊,使其羊毛變白。右鍵點擊一株植物以加快其生長速度。注意,不是所有的植物都能像這樣施肥。當你右鍵點擊一個草方時,高高的草和花會到處生長。
Cocoa beans are a brown dye and can be used to plant cocoas.=可可豆是一種棕色染料,也可用於種植可可。
Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=右鍵點擊一隻羊,使其羊毛變成褐色。右鍵點擊叢林木的一側,可以種植一個可可。
Grows at the side of jungle trees=在叢林木側生長
Speeds up plant growth=加速植物生長

View File

@ -1,27 +1,19 @@
# textdomain: mcl_dye
Bone Meal=
White Dye=
Light Grey Dye=
Grey Dye=
Ink Sac=
Black Dye=
Purple Dye=
Lapis Lazuli=
Blue Dye=
Light Blue Dye=
Cyan Dye=
Cactus Green=
Lime Dye=
Dandelion Yellow=
Cocoa Beans=
Brown Dye=
Orange Dye=
Rose Red=
Magenta Dye=
Pink Dye=
This item is a dye which is used for dyeing and crafting.=
Rightclick on a sheep to dye its wool. Other things are dyed by crafting.=
Bone Meal=
Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=
Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=
Cocoa beans are a brown dye and can be used to plant cocoas.=
Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=
Cocoa Beans=
Grows at the side of jungle trees=
Speeds up plant growth=

View File

@ -1,2 +1,3 @@
name = mcl_dye
depends = mcl_core, mcl_flowers, mcl_mobitems, mcl_cocoas
description = Adds color to your world!
depends = mcl_bone_meal, mcl_cocoas

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 193 B

View File

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 205 B

View File

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

View File

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

View File

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

View File

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

View File

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

View File

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

View File

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

View File

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

View File

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

View File

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

After

Width:  |  Height:  |  Size: 201 B

View File

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

View File

@ -520,7 +520,7 @@ function mcl_enchanting.show_enchanting_formspec(player)
local table_slots = mcl_enchanting.get_table_slots(player, itemstack, num_bookshelves)
for i, slot in ipairs(table_slots) do
any_enchantment = any_enchantment or slot
local enough_lapis = inv:contains_item("enchanting_lapis", ItemStack({name = "mcl_dye:blue", count = i}))
local enough_lapis = inv:contains_item("enchanting_lapis", ItemStack({name = "mcl_core:lapis", count = i}))
local enough_levels = slot and slot.level_requirement <= player_levels
local can_enchant = (slot and enough_lapis and enough_levels)
local ending = (can_enchant and "" or "_off")
@ -555,7 +555,7 @@ function mcl_enchanting.handle_formspec_fields(player, formname, fields)
local meta = player:get_meta()
local num_bookshelfes = meta:get_int("mcl_enchanting:num_bookshelves")
local itemstack = inv:get_stack("enchanting_item", 1)
local cost = ItemStack({name = "mcl_dye:blue", count = button_pressed})
local cost = ItemStack({name = "mcl_core:lapis", count = button_pressed})
if not inv:contains_item("enchanting_lapis", cost) then
return
end
@ -607,7 +607,7 @@ function mcl_enchanting.allow_inventory_action(player, action, inventory, invent
if action == "move" then
local listname = inventory_info.to_list
local stack = inventory:get_stack(inventory_info.from_list, inventory_info.from_index)
if stack:get_name() == "mcl_dye:blue" and listname ~= "enchanting_item" then
if stack:get_name() == "mcl_core:lapis" and listname ~= "enchanting_item" then
local count = stack:get_count()
local old_stack = inventory:get_stack("enchanting_lapis", 1)
if old_stack:get_name() ~= "" then
@ -630,7 +630,7 @@ function mcl_enchanting.on_inventory_action(player, action, inventory, inventory
if action == "move" and inventory_info.to_list == "enchanting" then
local stack = inventory:get_stack("enchanting", 1)
local result_list
if stack:get_name() == "mcl_dye:blue" then
if stack:get_name() == "mcl_core:lapis" then
result_list = "enchanting_lapis"
stack:add_item(inventory:get_stack("enchanting_lapis", 1))
else

View File

@ -13,78 +13,44 @@ minetest.register_craftitem("mcl_farming:beetroot_seeds", {
end
})
minetest.register_node("mcl_farming:beetroot_0", {
description = S("Premature Beetroot Plant (Stage 1)"),
_doc_items_longdesc = S("Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature."),
_doc_items_entry_name = S("Premature Beetroot Plant"),
paramtype = "light",
paramtype2 = "meshoptions",
sunlight_propagates = true,
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:beetroot_seeds",
tiles = {"mcl_farming_beetroot_0.png"},
inventory_image = "mcl_farming_beetroot_0.png",
wield_image = "mcl_farming_beetroot_0.png",
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -5/16, 0.5}
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
local size = {[0]=-5, -3, 2}
minetest.register_node("mcl_farming:beetroot_1", {
description = S("Premature Beetroot Plant (Stage 2)"),
_doc_items_create_entry = false,
paramtype = "light",
paramtype2 = "meshoptions",
sunlight_propagates = true,
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:beetroot_seeds",
tiles = {"mcl_farming_beetroot_1.png"},
inventory_image = "mcl_farming_beetroot_1.png",
wield_image = "mcl_farming_beetroot_1.png",
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -3/16, 0.5}
for i = 0, 2 do
minetest.register_node("mcl_farming:beetroot_".. i, {
description = S("Premature Beetroot Plant (Stage ".. i + 1 ..")"),
_doc_items_longdesc = S("Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature."),
_doc_items_entry_name = S("Premature Beetroot Plant"),
paramtype = "light",
paramtype2 = "meshoptions",
sunlight_propagates = true,
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:beetroot_seeds",
tiles = {"mcl_farming_beetroot_".. i ..".png"},
inventory_image = "mcl_farming_beetroot_".. i ..".png",
wield_image = "mcl_farming_beetroot_".. i ..".png",
selection_box = {
type = "fixed",
fixed = { {-0.5, -0.5, -0.5, 0.5, size[i]/16, 0.5} },
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
minetest.register_node("mcl_farming:beetroot_2", {
description = S("Premature Beetroot Plant (Stage 3)"),
_doc_items_create_entry = false,
paramtype = "light",
paramtype2 = "meshoptions",
sunlight_propagates = true,
place_param2 = 3,
walkable = false,
drawtype = "plantlike",
drop = "mcl_farming:beetroot_seeds",
tiles = {"mcl_farming_beetroot_2.png"},
inventory_image = "mcl_farming_beetroot_2.png",
wield_image = "mcl_farming_beetroot_2.png",
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 2/16, 0.5}
groups = {
dig_immediate=3, not_in_creative_inventory=1,
plant=1, attached_node=1, dig_by_water=1,
destroy_by_lava_flow=1,dig_by_piston=1
},
},
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
})
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
_mcl_on_bonemealing = function(pointed_thing, placer)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
-- 75% chance to advance to next stage
if math.random(1, 100) <= 75 then
return mcl_farming:grow_plant("plant_beetroot", pos, n, 1, true)
end
end
})
end
minetest.register_node("mcl_farming:beetroot", {
description = S("Mature Beetroot Plant"),

View File

@ -45,6 +45,12 @@ for i=1, 7 do
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
_mcl_on_bonemealing = function(pointed_thing, placer)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
local stages = math.random(2, 5)
return mcl_farming:grow_plant("plant_carrot", pos, n, stages, true)
end
})
end

View File

@ -109,6 +109,12 @@ for s=1,7 do
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1, plant_melon_stem=s},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
_mcl_on_bonemealing = function(pointed_thing, placer)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
local stages = math.random(2, 5)
return mcl_farming:grow_plant("plant_melon_stem", pos, n, stages, true)
end
})
end

View File

@ -49,6 +49,12 @@ for i=1, 7 do
groups = {dig_immediate=3, not_in_creative_inventory=1,plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
_mcl_on_bonemealing = function(pointed_thing, placer)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
local stages = math.random(2, 5)
return mcl_farming:grow_plant("plant_potato", pos, n, stages, true)
end
})
end

View File

@ -79,6 +79,12 @@ for s=1,7 do
groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
_mcl_on_bonemealing = function(pointed_thing, placer)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
local stages = math.random(2, 5)
return mcl_farming:grow_plant("plant_pumpkin_stem", pos, n, stages, true)
end
})
end

View File

@ -64,6 +64,12 @@ for i=1,7 do
dig_by_water=1,destroy_by_lava_flow=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_leaves_defaults(),
_mcl_blast_resistance = 0,
_mcl_on_bonemealing = function(pointed_thing, placer)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
local stages = math.random(2, 5)
return mcl_farming:grow_plant("plant_wheat", pos, n, stages, true)
end
})
end
@ -117,7 +123,7 @@ minetest.register_craft({
minetest.register_craft({
output = "mcl_farming:cookie 8",
recipe = {
{"mcl_farming:wheat_item", "mcl_dye:brown", "mcl_farming:wheat_item"},
{"mcl_farming:wheat_item", "mcl_cocoas:cocoa_beans", "mcl_farming:wheat_item"},
}
})

View File

@ -88,7 +88,7 @@ local fish = function(itemstack, player, pointed_thing)
{ itemstring = "mcl_mobitems:string", weight = 5 },
{ itemstring = "mcl_potions:water", weight = 10 },
{ itemstring = "mcl_mobitems:bone", weight = 10 },
{ itemstring = "mcl_dye:black", weight = 1, amount_min = 10, amount_max = 10 },
{ itemstring = "mcl_mobitems:ink_sac", weight = 1, amount_min = 10, amount_max = 10 },
{ itemstring = "mcl_mobitems:string", weight = 10 }, -- TODO: Tripwire Hook
},
stacks_min = 1,

View File

@ -0,0 +1,135 @@
-- bonemealing grass nodes
--
-- When bonemealing "mcl_core:dirt_with_grass", it spawns grass and flowers
-- over a 7x7 patch of adjacent grassy nodes.
--
-- Because of potential dependency complications it is not advisable to add
-- callbacks to mcl_core that create dependencies on mods that depend on
-- mcl_core, such as mcl_flowers.
--
-- To work around this restriction, the bonemealing callback is defined here
-- and the _mcl_on_bonemealing callback in "mcl_core:dirt_with_grass" node
-- definition is overwritten with it.
local mg_name = minetest.get_mapgen_setting("mg_name")
local flowers_table_simple = {
"mcl_flowers:dandelion",
"mcl_flowers:poppy",
}
local flowers_table_plains = {
"mcl_flowers:dandelion",
"mcl_flowers:dandelion",
"mcl_flowers:poppy",
"mcl_flowers:oxeye_daisy",
"mcl_flowers:tulip_orange",
"mcl_flowers:tulip_red",
"mcl_flowers:tulip_white",
"mcl_flowers:tulip_pink",
"mcl_flowers:azure_bluet",
}
local flowers_table_swampland = {
"mcl_flowers:blue_orchid",
}
local flowers_table_flower_forest = {
"mcl_flowers:dandelion",
"mcl_flowers:poppy",
"mcl_flowers:oxeye_daisy",
"mcl_flowers:tulip_orange",
"mcl_flowers:tulip_red",
"mcl_flowers:tulip_white",
"mcl_flowers:tulip_pink",
"mcl_flowers:azure_bluet",
"mcl_flowers:allium",
}
local biome_flowers_tables = {
["Plains"] = flowers_table_plains,
["Plains_beach"] = flowers_table_plains,
["Plains_ocean"] = flowers_table_plains,
["Plains_deep_ocean"] = flowers_table_plains,
["Plains_underground"] = flowers_table_plains,
["SunflowerPlains"] = flowers_table_plains,
["SunflowerPlains_ocean"] = flowers_table_plains,
["SunflowerPlains_deep_ocean"] = flowers_table_plains,
["SunflowerPlains_underground"] = flowers_table_plains,
["Swampland"] = flowers_table_swampland,
["Swampland_shore"] = flowers_table_swampland,
["Swampland_ocean"] = flowers_table_swampland,
["Swampland_deep_ocean"] = flowers_table_swampland,
["Swampland_underground"] = flowers_table_swampland,
["FlowerForest"] = flowers_table_flower_forest,
["FlowerForest_beach"] = flowers_table_flower_forest,
["FlowerForest_ocean"] = flowers_table_flower_forest,
["FlowerForest_deep_ocean"] = flowers_table_flower_forest,
["FlowerForest_underground"] = flowers_table_flower_forest,
}
-- Randomly generate flowers, tall grass or nothing
-- pos: node to place into
-- color: param2 value for tall grass
--
local function add_random_flower(pos, color)
-- 90% tall grass, 10% flower
local rnd = math.random(1,100)
if rnd <= 60 then
minetest.add_node(pos, {name="mcl_flowers:tallgrass", param2=color})
elseif rnd <= 80 then
-- double tallgrass
local toppos = vector.offset(pos, 0, 1, 0)
local topnode = minetest.get_node(toppos)
if minetest.registered_nodes[topnode.name].buildable_to then
minetest.set_node(pos, { name = "mcl_flowers:double_grass", param2 = color })
minetest.set_node(toppos, { name = "mcl_flowers:double_grass_top", param2 = color })
return true
end
else
local flowers_table
if mg_name == "v6" then
flowers_table = flowers_table_plains
else
local biome = minetest.get_biome_name(minetest.get_biome_data(pos).biome)
flowers_table = biome_flowers_tables[biome] or flowers_table_simple
end
minetest.add_node(pos, {name=flowers_table[math.random(1, #flowers_table)]})
end
end
--- Generate tall grass and random flowers in a 7x7 area
-- Bonemealing callback handler for "mcl_core:dirt_with_grass"
--
local function bonemeal_grass(pointed_thing, placer)
local pos, below, r, color
for i = -7, 7 do for j = -7, 7 do for y = -1, 1 do
pos = vector.offset(pointed_thing.above, i, y, j)
if minetest.get_node(pos).name == "air" then
below = minetest.get_node(vector.offset(pos, 0, -1, 0))
r = ((math.abs(i) + math.abs(j)) / 2)
if (minetest.get_item_group(below.name, "grass_block_no_snow") == 1) and
math.random(1, 100) <= 90 / r then
color = below.param2
add_random_flower(pos, color)
if math.random(1,5) == 1 then
mcl_bone_meal.add_bone_meal_particle(pos)
end
end
end
end end end
return true
end
-- Override "mcl_core:dirt_with_grass" bonemealing handler.
local nodename = "mcl_core:dirt_with_grass"
local olddef = minetest.registered_nodes[nodename]
if not olddef then
minetest.log("warning", "'mcl_core:dirt_with_grass' not registered, cannot add override!")
else
local oldhandler = olddef._mcl_on_bonemealing
local newhandler = function (pointed_thing, placer)
bonemeal_grass(pointed_thing, placer)
if oldhandler then
oldhandler(pointed_thing, placer)
end
end
minetest.override_item(nodename, {_mcl_on_bonemealing = newhandler})
end

View File

@ -161,6 +161,18 @@ local def_tallgrass = {
_mcl_fortune_drop = fortune_wheat_seed_drop,
node_placement_prediction = "",
on_place = on_place_flower,
_mcl_on_bonemealing = function(pointed_thing, placer)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
-- Grow into double tallgrass
local toppos = vector.offset(pos, 0, 1, 0)
local topnode = minetest.get_node(toppos)
if minetest.registered_nodes[topnode.name].buildable_to then
minetest.set_node(pos, { name = "mcl_flowers:double_grass", param2 = n.param2 })
minetest.set_node(toppos, { name = "mcl_flowers:double_grass_top", param2 = n.param2 })
return true
end
end,
_mcl_blast_resistance = 0,
_mcl_hardness = 0,
}
@ -179,6 +191,18 @@ def_fern.selection_box = {
fixed = { -6/16, -0.5, -6/16, 6/16, 5/16, 6/16 },
}
def_fern.groups.compostability = 65
def_fern._mcl_on_bonemealing = function(pointed_thing, placer)
local pos = pointed_thing.under
local n = minetest.get_node(pos)
-- Grow into double fern.
local toppos = vector.offset(pos, 0, 1, 0)
local topnode = minetest.get_node(toppos)
if minetest.registered_nodes[topnode.name].buildable_to then
minetest.set_node(pos, { name = "mcl_flowers:double_fern", param2 = n.param2 })
minetest.set_node(toppos, { name = "mcl_flowers:double_fern_top", param2 = n.param2 })
return true
end
end
minetest.register_node("mcl_flowers:fern", def_fern)
@ -208,10 +232,16 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
if name == "double_grass" then
bottom_groups.compostability = 50
end
local on_bonemealing
if is_flower then
bottom_groups.flower = 1
bottom_groups.place_flowerlike = 1
bottom_groups.dig_immediate = 3
on_bonemealing = function(pointed_thing, placer)
local pos = pointed_thing.under
minetest.add_item(pos, "mcl_flowers:"..name)
return true
end
else
bottom_groups.place_flowerlike = 2
bottom_groups.handy = 1
@ -329,6 +359,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
minetest.remove_node(top)
end
end,
_mcl_on_bonemealing = on_bonemealing,
groups = bottom_groups,
sounds = mcl_sounds.node_sound_leaves_defaults(),
})
@ -365,6 +396,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
minetest.remove_node(bottom)
end
end,
_mcl_on_bonemealing = on_bonemealing,
groups = top_groups,
sounds = mcl_sounds.node_sound_leaves_defaults(),
})
@ -519,3 +551,6 @@ if mod_mcimport and mg_name == "singlenode" and fix_doubleplants == true then
end
dofile(modpath.."/register.lua")
-- Bonemealing handler and override for "mcl_core:dirt_with_grass":
dofile(modpath.."/bonemealing.lua")

View File

@ -1,3 +1,3 @@
name=mcl_flowers
depends=mcl_core, mcl_util, mcl_sounds
optional_depends=screwdriver, doc, mcl_flowerpots
depends=mcl_core, mcl_util, mcl_sounds, mcl_bone_meal
optional_depends=screwdriver, doc, mcl_flowerpots

View File

@ -181,6 +181,14 @@ minetest.register_craftitem("mcl_mobitems:bone", {
_mcl_toollike_wield = true,
})
minetest.register_craftitem("mcl_mobitems:ink_sac", {
description = S("Squid Ink Sac"),
_doc_items_longdesc = S("This item is dropped by dead squids. Ink sacs can be used as an ingredient to craft book and quill or black dye."),
inventory_image = "mcl_mobitems_ink_sac.png",
stack_max = 64,
groups = { craftitem = 1 },
})
minetest.register_craftitem("mcl_mobitems:string",{
description = S("String"),
_doc_items_longdesc = S("Strings are used in crafting."),

View File

@ -52,6 +52,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful
Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Halten Sie den Knochen in der Nähe von Wölfen, um sie anzulocken. Benutzen Sie die „Platzieren“-Taste auf dem Wolf, um ihm den Knochen zu geben und ihn zu zähmen. Sie können dem gezähmten Wolf Befehle erteilen, indem Sie die „Platzieren“-Taste auf ihm benutzen.
Squid Ink Sac=Tintenbeutel
This item is dropped by dead squids. Ink sacs can be used to as an ingredient to craft book and quill or black dye.=Dieser Gegenstand wird von toten Tintenfischen abgeworfen. Tintenbeutel können als Zutat zum Herstellen von Büchern und Federn oder schwarzen Farbstoff verwendet werden.
String=Faden
Strings are used in crafting.=Fäden sind nützlich in der Fertigung.
Blaze Rod=Lohenrute

View File

@ -52,6 +52,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful
Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Empuña el hueso cerca de los lobos para atraerlos. Usa la tecla "Colocar" en el lobo para darle un hueso y domesticarlo. Luego puede dar órdenes al lobo domesticado utilizando la tecla "Colocar".
Squid Ink Sac=Saco de tinta
This item is dropped by dead squids. Ink sacs can be used to as an ingredient to craft book and quill or black dye.=Este objeto lo sueltan los calamares muertos. Los sacos de tinta se pueden usar como ingrediente para crear libros y plumas o tinte negro.
String=Cuerda
Strings are used in crafting.=Las cuerdas se usan en la elaboración.
Blaze Rod=Vara de blaze

View File

@ -52,6 +52,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful
Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Maniez l'os près des loups pour les attirer. Utilisez la touche «Placer» sur le loup pour lui donner un os et l'apprivoiser. Vous pouvez ensuite donner des commandes au loup apprivoisé en utilisant la touche "Placer" sur celui-ci.
Squid Ink Sac=Poche d'encre
This item is dropped by dead squids. Ink sacs can be used to as an ingredient to craft book and quill or black dye.=Cet objet est lâché par les calmars morts. Les poches d'encre peuvent être utilisés comme ingrédient pour fabriquer des livres vierges ou de la teinture noire.
String=Ficelle
Strings are used in crafting.=Les ficelles sont utilisées dans l'artisanat.
Blaze Rod=Bâton de Blaze
@ -91,4 +94,4 @@ Carrot on a Stick=Carotte sur un Batôn
Lets you ride a saddled pig=Vous permet de monter un cochon sellé
A carrot on a stick can be used on saddled pigs to ride them.=Une carotte sur un bâton peut être utilisée sur les porcs sellés pour les monter.
Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.=Placez-le sur un cochon sellé pour le monter. Vous pouvez maintenant monter le cochon comme un cheval. Les porcs marcheront également vers vous lorsque vous brandirez la carotte sur un bâton.
Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.=Placez-le sur un cochon sellé pour le monter. Vous pouvez maintenant monter le cochon comme un cheval. Les porcs marcheront également vers vous lorsque vous brandirez la carotte sur un bâton.

View File

@ -53,6 +53,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful
Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Trzymaj kość w pobliżu wilków aby je zwabić. Użyj przycisku "Umieść" na wilku aby dać mu kość i go oswoić. Możesz wtedy wydawać polecenia oswojonemu wilkowi klikając przycisk "Umieść" na nim.
Squid Ink Sac=Torbiel z atramentem
This item is dropped by dead squids. Ink sacs can be used to as an ingredient to craft book and quill or black dye.=Ten przedmiot wypada z martwych kałamarnic. Torbiel z atramentem może być używany jako składnik do tworzenia książek i piór lub czarnego barwnika.
String=Nić
Strings are used in crafting.=Nić jest użyteczna w wytwarzaniu.
Blaze Rod=Płomienna różdżka

View File

@ -52,6 +52,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful
Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Положите кость рядом с волками, чтобы привлечь их. Используйте клавишу “Разместить” на волке, чтобы дать ему кость и приручить его. Вы можете командовать приручёнными волками с помощью клавиши “Разместить”.
Squid Ink Sac=Чернильный мешок
This item is dropped by dead squids. Ink sacs can be used to as an ingredient to craft book and quill or black dye.=Этот предмет выпадает из мертвых кальмаров. Чернильные мешочки можно использовать в качестве ингредиента для изготовления книги и пера или черной краски.
String=Нити
Strings are used in crafting.=Нити используются для крафтинга
Blaze Rod=Огненный стержень

View File

@ -52,6 +52,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful
Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=
Squid Ink Sac=
This item is dropped by dead squids. Ink sacs can be used as an ingredient to craft book and quill or black dye.=
String=
Strings are used in crafting.=
Blaze Rod=

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

View File

@ -1,5 +1,8 @@
local S = minetest.get_translator(minetest.get_current_modname())
local modpath = minetest.get_modpath(minetest.get_current_modname())
local schempath = modpath .. "/schematics/"
local on_place = mcl_util.generate_on_place_plant_function(function(place_pos, place_node)
local soil_node = minetest.get_node_or_nil({x=place_pos.x, y=place_pos.y-1, z=place_pos.z})
if not soil_node then return false end
@ -16,6 +19,40 @@ local on_place = mcl_util.generate_on_place_plant_function(function(place_pos, p
return ((snn == "mcl_core:podzol" or snn == "mcl_core:podzol_snow" or snn == "mcl_core:mycelium" or snn == "mcl_core:mycelium_snow") or (light_ok and minetest.get_item_group(snn, "solid") == 1 and minetest.get_item_group(snn, "opaque") == 1))
end)
-- Try to grow huge mushroom
local function apply_bonemeal(pos, schematic, offset)
-- Must be on a dirt-type block
local below = minetest.get_node(vector.offset(pos, 0, -1, 0))
if minetest.get_item_group(below.name, "grass_block") ~= 1
and below.name ~= "mcl_core:mycelium"
and below.name ~= "mcl_core:dirt"
and below.name ~= "mcl_core:coarse_dirt"
and below.name ~= "mcl_core:podzol" then
return false
end
-- 40% chance
if math.random(1, 100) <= 40 then
-- Check space requirements
for i= 1, 3 do
local cpos = vector.offset(pos, 0, i, 0)
if minetest.get_node(cpos).name ~= "air" then
return false
end
end
local minp = vector.offset(pos, -3, 3, -3)
local maxp = vector.offset(pos, 3, 8, 3)
local diff = vector.subtract(maxp, minp)
local goodnodes = minetest.find_nodes_in_area(minp, maxp, {"air", "group:leaves"})
if #goodnodes < (diff.x + 1) * (diff.y + 1) * (diff.z + 1) then
return false
end
-- Place the huge mushroom
minetest.remove_node(pos)
return minetest.place_schematic(pos + offset, schematic, 0, nil, false)
end
return false
end
local longdesc_intro_brown = S("Brown mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.")
local longdesc_intro_red = S("Red mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.")
@ -51,6 +88,11 @@ minetest.register_node("mcl_mushrooms:mushroom_brown", {
},
node_placement_prediction = "",
on_place = on_place,
_mcl_on_bonemealing = function(pointed_thing, placer)
local schematic = schempath .. "mcl_mushrooms_huge_brown.mts"
local offset = vector.new(-3, -1, -3)
return apply_bonemeal(pointed_thing.under, schematic, offset)
end,
_mcl_blast_resistance = 0,
})
@ -78,6 +120,11 @@ minetest.register_node("mcl_mushrooms:mushroom_red", {
},
node_placement_prediction = "",
on_place = on_place,
_mcl_on_bonemealing = function(pointed_thing, placer)
local schematic = schempath .. "mcl_mushrooms_huge_red.mts"
local offset = vector.new(-2, -1, -2)
return apply_bonemeal(pointed_thing.under, schematic, offset)
end,
_mcl_blast_resistance = 0,
})

View File

@ -84,7 +84,7 @@ function tsm_railcorridors.get_treasures(pr)
{ itemstring = "mcl_farming:melon_seeds", weight = 10, amount_min = 2, amount_max = 4 },
{ itemstring = "mcl_farming:pumpkin_seeds", weight = 10, amount_min = 2, amount_max = 4 },
{ itemstring = "mcl_core:iron_ingot", weight = 10, amount_min = 1, amount_max = 5 },
{ itemstring = "mcl_dye:blue", weight = 5, amount_min = 4, amount_max = 9 },
{ itemstring = "mcl_core:lapis", weight = 5, amount_min = 4, amount_max = 9 },
{ itemstring = "mesecons:redstone", weight = 5, amount_min = 4, amount_max = 9 },
{ itemstring = "mcl_core:gold_ingot", weight = 5, amount_min = 1, amount_max = 3 },
{ itemstring = "mcl_core:diamond", weight = 3, amount_min = 1, amount_max = 2 },