Compare commits

..

111 Commits

Author SHA1 Message Date
kay27 f204470052 Merge pull request 'Lava produce sparks' (#292) from MrRar/MineClone5:lava into master
Reviewed-on: MineClone5/MineClone5#292
2022-04-22 19:47:17 +00:00
kay27 721e721427 Merge pull request 'Remove image stack wieldview' (#295) from MrRar/MineClone5:wieldview into master
Reviewed-on: MineClone5/MineClone5#295
2022-04-22 19:45:32 +00:00
kay27 e4f218fded Merge pull request '/spawnstruct placed schematics one block lower than player is standing' (#296) from cableguy67-spawnstruct-fix into master
Reviewed-on: MineClone5/MineClone5#296
2022-04-22 19:40:17 +00:00
CableGuy67 5432c6bd92 /spawnstruct placed schematics one block lower than player is standing
Because the position of the player is -0.5 from the block (when not flying) /spawnstruct would place the schematic a block lower than the player's feet.
2022-04-22 13:51:17 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 c5ad0d5f33 Remove image stack wieldview 2022-04-20 16:56:17 -05:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 b6a4c1a995 Lava sparks: performance improvement 2022-04-19 08:01:56 -05:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 f0b8e8ea11 Lava produce sparks 2022-04-15 13:56:49 -05:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 d0fcab11e9 Merge pull request 'Armor wearing mobs' (#285) from MrRar/MineClone5:zarmor into master
Reviewed-on: MineClone5/MineClone5#285
2022-04-13 18:41:51 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 b7f3b8edd5 No sun damage wearing helment 2022-04-13 12:52:39 -05:00
3raven 940499ee7e Merge pull request 'Make the shield drop at death' (#290) from 3raven-patch-2 into master
Reviewed-on: MineClone5/MineClone5#290
2022-04-12 22:09:34 +00:00
3raven 9b04b285b7 Make the shield drop at death 2022-04-12 22:08:33 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 1d315c569f Bonus: Mobs Redo bug fix 2022-04-10 14:05:15 -05:00
3raven 64766109f5 Merge pull request 'master' (#287) from 3raven/MineClone5:master into master
Reviewed-on: MineClone5/MineClone5#287

Add buttons, pressure plate, and target; french translation

Missing : translation of mcl_lanterns, entities-counting proprerties of heavy/light pressure plate
2022-04-09 20:23:46 +00:00
3raven c6f09e30a5 Mise à jour de 'mods/ITEMS/mcl_lanterns/register.lua' 2022-04-09 19:49:59 +00:00
3raven a47e0d2f17 Mise à jour de 'mods/ITEMS/mcl_lanterns/init.lua' 2022-04-09 19:49:23 +00:00
3raven a1ca0c3431 Mise à jour de 'mods/ITEMS/mcl_lanterns/register.lua' 2022-04-09 19:31:56 +00:00
3raven c72c960e8a Mise à jour de 'mods/ITEMS/mcl_lanterns/init.lua' 2022-04-09 19:29:52 +00:00
3raven 0184925890 Mise à jour de 'mods/ITEMS/mcl_lanterns/local/mcl_lanterns.fr.tr' 2022-04-09 19:26:04 +00:00
3raven 44d32b5d17 fix 2022-04-09 12:12:07 +00:00
3raven 07d564b5a2 Mise à jour de 'mods/ITEMS/mcl_beds/init.lua' 2022-04-09 12:05:00 +00:00
3raven 1e431814bc Mise à jour de 'mods/ITEMS/mcl_lanterns/init.lua' 2022-04-09 11:48:43 +00:00
3raven 337b4e1d05 Mise à jour de 'mods/ITEMS/mcl_lanterns/register.lua' 2022-04-09 11:47:14 +00:00
3raven f052e26e0c fix 2022-04-09 11:43:47 +00:00
3raven c55aab9360 Update french translation 2022-04-09 10:31:13 +00:00
3raven 421c1e8d00 Ajouter 'mods/MAPGEN/mcl_villages/locale/mcl_villages.fr.tr' 2022-04-09 10:21:26 +00:00
3raven 3591ef1fae French translation 2022-04-09 09:59:27 +00:00
3raven 47ed81490a french translation 2022-04-09 09:52:46 +00:00
3raven 609653eaf2 Update french translation 2022-04-09 09:44:49 +00:00
3raven f828ee6a19 Mise à jour de 'mods/HUD/mcl_achievements/locale/template.txt' 2022-04-09 09:28:36 +00:00
3raven e14545a2b8 French translation 2022-04-09 08:51:53 +00:00
3raven c3111c99b2 French translation 2022-04-09 08:49:47 +00:00
3raven 140fd67686 Add french translation 2022-04-09 08:07:47 +00:00
3raven 700200958d wrong place 2022-04-09 08:03:37 +00:00
3raven 8cd3b63fae Add Translations 2022-04-09 08:02:22 +00:00
3raven 4c957a3e7c Add Translation 2022-04-09 08:01:16 +00:00
3raven 2b87fb2cd2 Update french translation 2022-04-09 07:51:40 +00:00
3raven cbfac60742 Mise à jour de 'mods/ITEMS/mcl_furnaces/locale/template.txt' 2022-04-09 07:45:41 +00:00
3raven f46d093038 remove doublon 2022-04-09 07:44:09 +00:00
3raven cc300971b3 Update 2022-04-09 07:42:19 +00:00
3raven 9dd85f9f7b Update french translation 2022-04-09 07:12:24 +00:00
3raven 7f34c979ff update 2022-04-09 06:49:31 +00:00
3raven 6afda0af92 Update french translation 2022-04-09 06:42:51 +00:00
3raven f60588cf25 Update
Please when you add stuff update the template.txt and not just one translation file
2022-04-09 06:38:04 +00:00
3raven fd94fba22c Update french translation 2022-04-09 06:15:06 +00:00
3raven 99c4fbfc38 Update 2022-04-09 06:13:17 +00:00
3raven e4865338fc Update translation 2022-04-09 06:12:07 +00:00
3raven c1a7d3e504 Update 2022-04-09 06:07:35 +00:00
3raven b7c521bedc Update french translation 2022-04-09 05:37:39 +00:00
3raven 8f64a1e18c Update translation 2022-04-09 05:35:54 +00:00
3raven e017d4a724 Add translation 2022-04-09 05:33:22 +00:00
3raven 69fc0228d6 Update french translation 2022-04-09 05:00:07 +00:00
3raven c0e83aa0cd Update template.txt 2022-04-09 04:41:09 +00:00
3raven 5429a259ff Update french translation 2022-04-09 04:24:09 +00:00
3raven 3e8e74b633 Update template 2022-04-09 04:21:16 +00:00
3raven a2933ece62 Add french translation 2022-04-09 04:12:11 +00:00
3raven 820ceceffc Add target 2022-04-09 03:55:23 +00:00
3raven 11a9f6baea Add target 2022-04-09 03:54:13 +00:00
3raven 5d214ae4bf Add target 2022-04-09 03:53:12 +00:00
3raven 13e92cd5b3 Add target from mcl 2 2022-04-09 03:51:46 +00:00
3raven 5fa14070d3 Add target from mcl2 2022-04-09 03:50:37 +00:00
3raven 3129379fe9 Add steel and black stone pressure plate
light and heavy weighted pressure plate don't work the same as in minecraft. They dont give signal proportional to entities number.
Modified heavey weighted pressure plate so it detect all entities as in minecraft wiki.
2022-04-09 03:21:38 +00:00
3raven 45c3889316 Add nether wood pressure plate 2022-04-09 02:58:14 +00:00
3raven b0392bbeb9 Add blackstone button 2022-04-09 02:39:52 +00:00
3raven 7db8d3cd5f Add nether wood buttons 2022-04-09 02:28:43 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 86328c0822 WIP Zombies and Husks wear armor 2022-04-08 16:13:07 -05:00
3raven 89f835ab7b Merge pull request 'master' (#284) from 3raven/MineClone5:master into master
Reviewed-on: MineClone5/MineClone5#284
2022-04-08 20:54:49 +00:00
3raven 5f2ea5b073 Mise à jour de 'mods/ITEMS/mcl_nether/README.txt' 2022-04-08 20:45:03 +00:00
3raven 8e98239a57 README
Add license info
2022-04-08 20:40:45 +00:00
3raven 521b890612 Replace proprietary texture
Replace by the texture from PixelPerfection Legacy by XSSheep (CC-BY-SA)
2022-04-08 20:28:59 +00:00
kay27 8eb0ba5501 Merge pull request 'Replace mcl_end_crystal_beam.png with free version.' (#282) from CableGuy67/MineClone5:kabou_mcl2_fix into master
Reviewed-on: MineClone5/MineClone5#282
2022-04-07 21:57:10 +00:00
kabou ed963428c0 Replace mcl_end_crystal_beam.png with free version.
* Replace mcl_end_crystal_beam.png with unknown provenance with a
  version from the PixelPerfection texture pack that has a know good
  free licence.
2022-04-07 22:54:00 +03:00
kay27 f5ab76592c Merge pull request 'Lightning command: Strike player by name' (#274) from MrRar/MineClone5:master into master
Reviewed-on: MineClone5/MineClone5#274
2022-04-04 13:56:13 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 d424aaa5bc Lightning mod: fix localization template 2022-04-04 07:48:05 -05:00
kay27 05fdda96ad Merge pull request 'Adds new advancements and minor detail changes' (#275) from PrairieAstronomer/MineClone5:pw_achievements into master
Reviewed-on: MineClone5/MineClone5#275
2022-04-04 00:34:10 +00:00
kay27 bba0ef15cb Merge pull request 'Fix mobs staying red after explosion' (#276) from MrRar/MineClone5:fix-red into master
Reviewed-on: MineClone5/MineClone5#276
2022-04-04 00:29:54 +00:00
PrairieWind 4444437f94 Update 'mods/ITEMS/mcl_beds/respawn_anchor.lua' 2022-04-02 12:28:16 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 b99fbe8f69 Fix mobs staying red after explosion 2022-04-01 08:15:55 -05:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 ddaa96589e Make params description sensable 2022-04-01 07:58:26 -05:00
PrairieAstronomer 2ea868ba79 fixed formating of respawn_ancher.lua file 2022-03-29 13:37:45 -06:00
PrairieAstronomer c9470b8262 adds new advancements and minor detail changes 2022-03-29 12:49:39 -06:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 1273d59995 Lightning command: Strike player by name 2022-03-29 12:16:06 -05:00
debiankaios 0dfe211053 Merge pull request 'Added Lodestones (New clean PR)' (#270) from chmodsayshello/MineClone5:Lodestone_New_PR into master
Reviewed-on: MineClone5/MineClone5#270 (two times)
2022-03-28 19:15:43 +00:00
debiankaios 5b8d9cd2f0 Merge pull request 'Fix some formatting issues in extra_mobs and mcl_mushroom' (#267) from rudzik8/MineClone5:fixformat into master
Reviewed-on: MineClone5/MineClone5#267
2022-03-28 18:45:56 +00:00
chmodsayshello d467060897 upload textures 2022-03-28 16:08:08 +00:00
chmodsayshello dc93dd87e2 upload textures 1/2 2022-03-28 16:07:51 +00:00
chmodsayshello da7be430ce update dependencies 2022-03-28 16:07:10 +00:00
chmodsayshello fc50c81571 update main lua script to add lodestone etc. 2022-03-28 16:06:30 +00:00
Mikita Wiśniewski fa4a554b28 Fix some format issues in mcl_mushroom (again)
just forgot to fix something
2022-03-26 20:40:22 +07:00
Mikita Wiśniewski ddb618c2e3 Fix comment translation in mcl_mushroom 2022-03-26 20:29:25 +07:00
chmodsayshello 650e2f5c60 Merge pull request 'Update Fork' (#3) from MineClone5/MineClone5:master into master
Reviewed-on: chmodsayshello/MineClone5#3
2022-03-26 09:45:54 +00:00
Mikita Wiśniewski 297f9ba11a Fix some formatting issues 2022-03-25 11:20:07 +07:00
kay27 833e32410e Merge pull request 'Fix Respawn Anchor Not Glowstone Consuming On Charge' (#264) from chmodsayshello/MineClone5:Respawn_Anchor_FIX into master
Reviewed-on: MineClone5/MineClone5#264
2022-03-24 22:30:43 +00:00
kay27 a7ca121f73 Merge pull request 'Incorrect fortune effect on a non-ore' (#265) from cableguy67-patch-1 into master
Reviewed-on: MineClone5/MineClone5#265
2022-03-24 22:30:12 +00:00
CableGuy67 9e72966f91 missed the comma on the previous line
When removing the last line the previous comma wasn't removed.
2022-03-24 18:42:45 +00:00
CableGuy67 7ad5f7c66e Incorrect fortune effect on a non-ore
This Easter Egg had almost a year. Time to put it to bed.
2022-03-24 17:44:09 +00:00
chmodsayshello 1c12f3da19 Charging no longer not consuming 2022-03-23 21:11:03 +00:00
chmodsayshello 63123816f0 Merge pull request 'Update Fix Branch' (#2) from MineClone5/MineClone5:master into Respawn_Anchor_FIX
Reviewed-on: chmodsayshello/MineClone5#2
2022-03-23 21:10:02 +00:00
kay27 0b4f28d8b3 Merge pull request 'Added Respawn-Anchors' (#263) from chmodsayshello/MineClone5:Respawn_anchor into master
Reviewed-on: MineClone5/MineClone5#263
2022-03-23 15:50:49 +00:00
chmodsayshello 6c41b8a265 remove debug logging 2/2 2022-03-23 13:55:38 +00:00
chmodsayshello fc59d05679 remove debug logging 1/2 2022-03-23 13:54:53 +00:00
chmodsayshello a32531c8f6 update mcl_spawm to support respawn anchors 2022-03-23 13:52:53 +00:00
chmodsayshello fb6315ea62 add crafting recepie 2022-03-23 13:51:28 +00:00
chmodsayshello d97c7b29c6 update dependencies 2022-03-23 13:46:11 +00:00
chmodsayshello 1dd81decd5 update init.lua to load the respawn anchors 2022-03-23 13:45:14 +00:00
chmodsayshello 57c099943a upload main lua script 2022-03-23 13:44:18 +00:00
chmodsayshello 6521e1f22e Upload Textures 2/2 2022-03-23 13:43:03 +00:00
chmodsayshello f49d7da655 Upload Textures 1/2 2022-03-23 13:42:36 +00:00
chmodsayshello 7117ce55db Merge pull request 'Update Fork' (#1) from MineClone5/MineClone5:master into master
Reviewed-on: chmodsayshello/MineClone5#1
2022-03-23 13:40:25 +00:00
kay27 7b0119ddd6 Merge pull request '#248 move compostability rating to items groups instead of the list in the mod' (#257) from CableGuy67/MineClone5:mark_compostable into master
Reviewed-on: MineClone5/MineClone5#257
2022-03-20 20:16:34 +00:00
Mark Roth 6c196ae63a Add compostability to GROUPS.md 2022-03-20 14:07:57 +02:00
Mark Roth c282324661 #248 move compostability rating to items groups instead of the list in the mod 2022-03-20 01:07:42 +02:00
104 changed files with 1665 additions and 922 deletions

View File

@ -71,6 +71,7 @@ Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times
* `coral_block=X`: Coral block (1 = alive, 2 = dead)
* `coral_species=X`: Specifies the species of a coral; equal X means equal species
* `set_on_fire=X`: Sets any (not fire-resistant) mob or player on fire for X seconds when touching
* `compostability`: Amount from 1 to 100 that defines the percentage of likelyhood that the composter will advance a level.
#### Footnotes

View File

@ -417,6 +417,7 @@ function mcl_util.deal_damage(target, damage, mcl_reason)
-- target:punch(puncher, 1.0, {full_punch_interval = 1.0, damage_groups = {fleshy = damage}}, vector.direction(puncher:get_pos(), target:get_pos()), damage)
if luaentity.health > 0 then
luaentity.health = luaentity.health - damage
luaentity.pause_timer = 0.4
end
return
end

View File

@ -246,4 +246,4 @@ water-16,
water)
--spawn egg
mobs:register_egg("extra_mobs:dolphin", S("dolphin"), "extra_mobs_spawn_icon_dolphin.png", 0)
mobs:register_egg("extra_mobs:dolphin", S("Dolphin"), "extra_mobs_spawn_icon_dolphin.png", 0)

View File

@ -0,0 +1,17 @@
# textdomain:extra_mobs
Hoglin=Hoglin
piglin=Piglin
piglin Brute=Piglin Barbare
Strider=Arpenteur
Fox=Renard
Cod=Poisson
Salmon=Saumon
dolphin=Dauphin
Glow Squid=Pieuvre Lumineuse
Glow Ink Sac=Sac d'Encre Lumineuse
Use it to craft the Glow Item Frame.=Utilisez le pour fabriquer le Cadre à Objet Lumineux
Use the Glow Ink Sac and the normal Item Frame to craft the Glow Item Frame.=Utiliser le Sac d'Encre Lumineuse et le Cadre à Objet normal pour fabriquer le Cadre à Objet Lumineux.
Glow Item Frame=Cadre à Objet Lumineux
Can hold an item and glows=Peut exposer un objet et éclairer
Glow Item frames are decorative blocks in which items can be placed.=les Cadres à Objet Lumineux sont des blocs décoratifs pouvant contenir des objets.
Just place any item on the item frame. Use the item frame again to retrieve the item.=Placer n'importe quel objet sur le cadre. Récupérer l'objet en faisant un clic droit sur le cadre.

View File

@ -296,5 +296,5 @@ minetest.LIGHT_MAX+1,
mobs_mc.spawn_height.nether_min,
mobs_mc.spawn_height.nether_max)
-- spawn eggs
mobs:register_egg("extra_mobs:piglin", S("piglin"), "extra_mobs_spawn_icon_piglin.png", 0)
mobs:register_egg("extra_mobs:piglin_brute", S("piglin Brute"), "extra_mobs_spawn_icon_piglin.png", 0)
mobs:register_egg("extra_mobs:piglin", S("Piglin"), "extra_mobs_spawn_icon_piglin.png", 0)
mobs:register_egg("extra_mobs:piglin_brute", S("Piglin Brute"), "extra_mobs_spawn_icon_piglin.png", 0)

View File

@ -6,6 +6,7 @@ Boats are used to travel on the surface of water.=Les bateaux sont utilisés pou
Dark Oak Boat=Bateau en Chêne Noir
Jungle Boat=Bateau en Acajou
Oak Boat=Bateau en Chêne
Obsidian Boat=Bateau en Obsidienne
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=Faites un clic droit sur une source d'eau pour placer le bateau. Faites un clic droit sur le bateau pour y entrer. Utilisez [Gauche] et [Droite] pour diriger, [Avant] pour accélérer et [Arrière] pour ralentir ou reculer. Utilisez [Sneak] pour le quitter, frappez le bateau pour le faire tomber en tant qu'objet.
Spruce Boat=Bateau en Sapin
Water vehicle=Véhicule aquatique

View File

@ -65,6 +65,8 @@ mcl_item_entity.register_pickup_achievement("tree", "mcl:mineWood")
mcl_item_entity.register_pickup_achievement("mcl_mobitems:blaze_rod", "mcl:blazeRod")
mcl_item_entity.register_pickup_achievement("mcl_mobitems:leather", "mcl:killCow")
mcl_item_entity.register_pickup_achievement("mcl_core:diamond", "mcl:diamonds")
mcl_item_entity.register_pickup_achievement("mcl_core:crying_obsidian", "mcl:whosCuttingOnions")
mcl_item_entity.register_pickup_achievement("mcl_nether:ancient_debris", "mcl:hiddenInTheDepths")
local function check_pickup_achievements(object, player)
if has_awards then

View File

@ -227,6 +227,11 @@ functions needed for the mob to work properly which contains the following:
older mobs.
'pushable' Allows players, & other mobs to push the mob.
'spawn_with_armor' If set to true, the mob has a small chance of spawning with
random matched armor. If set to a string, the string represents
the material type of the armor. Any materials used by
mcl_armor will work. Example: "gold"
It is assumed that the first texture is for armor.
MineClone 2 extensions:

View File

@ -375,6 +375,7 @@ function mobs:register_mob(name, def)
--moves the wrong way
swap_y_with_x = def.swap_y_with_x or false,
reverse_head_yaw = def.reverse_head_yaw or false,
_spawn_with_armor = def.spawn_with_armor,
--END HEAD CODE VARIABLES

View File

@ -13,8 +13,13 @@ mobs.can_despawn = function(self)
if self.tamed or self.bred or self.nametag then return false end
local mob_pos = self.object:get_pos()
if not mob_pos then return true end
local players = minetest_get_connected_players()
if #players == 0 then return false end
-- If no players, probably this is being called from get_staticdata() at server shutdown time
-- Minetest is to buggy (as of 5.5) to delete entities at server shutdown time anyway
local distance = 999
for _, player in pairs(minetest_get_connected_players()) do
for _, player in pairs(players) do
if player and player:get_hp() > 0 then
local player_pos = player:get_pos()
local new_distance = vector_distance(player_pos, mob_pos)
@ -62,6 +67,102 @@ mobs.mob_staticdata = function(self)
return minetest.serialize(tmp)
end
mobs.armor_setup = function(self)
if not self._armor_items then
local armor = {}
-- Source: https://minecraft.fandom.com/wiki/Zombie
local materials = {
{name = "leather", chance = 0.3706},
{name = "gold", chance = 0.4873},
{name = "chain", chance = 0.129},
{name = "iron", chance = 0.0127},
{name = "diamond", chance = 0.0004}
}
local types = {
{name = "helmet", chance = 0.15},
{name = "chestplate", chance = 0.75},
{name = "leggings", chance = 0.75},
{name = "boots", chance = 0.75}
}
local material
if type(self._spawn_with_armor) == "string" then
material = self._spawn_with_armor
else
local chance = 0
for i, m in pairs(materials) do
chance = chance + m.chance
if math.random() <= chance then
material = m.name
break
end
end
end
for i, t in pairs(types) do
if math.random() <= t.chance then
armor[t.name] = material
else
break
end
end
-- Save armor items in lua entity
self._armor_items = {}
for atype, material in pairs(armor) do
local item = "mcl_armor:" .. atype .. "_" .. material
self._armor_items[atype] = item
end
-- Setup armor drops
for atype, material in pairs(armor) do
local wear = math.random(1, 65535)
local item = "mcl_armor:" .. atype .. "_" .. material .. " 1 " .. wear
self.drops = table.copy(self.drops)
table.insert(self.drops, {
name = item,
chance = 1/0.085, -- 8.5%
min = 1,
max = 1,
looting = "rare",
looting_factor = 0.01 / 3,
})
end
-- Configure textures
local t = ""
local first_image = true
for atype, material in pairs(armor) do
if not first_image then
t = t .. "^"
end
t = t .. "mcl_armor_" .. atype .. "_" .. material .. ".png"
first_image = false
end
if t ~= "" then
self.base_texture = table.copy(self.base_texture)
self.base_texture[1] = t
end
-- Configure damage groups based on armor
-- Source: https://minecraft.fandom.com/wiki/Armor#Armor_points
local points = 2
for atype, material in pairs(armor) do
local item_name = "mcl_armor:" .. atype .. "_" .. material
points = points + minetest.get_item_group(item_name, "mcl_armor_points")
end
local armor_strength = 100 - 4 * points
local armor_groups = self.object:get_armor_groups()
armor_groups.fleshy = armor_strength
self.armor = armor_groups
-- Helmet protects mob from sun damage
if armor.helmet then
self.ignited_by_sunlight = false
end
end
end
-- activate mob and reload settings
mobs.mob_activate = function(self, staticdata, def, dtime)
@ -104,6 +205,11 @@ mobs.mob_activate = function(self, staticdata, def, dtime)
self.base_colbox = self.collisionbox
self.base_selbox = self.selectionbox
end
-- Setup armor on mobs
if self._spawn_with_armor then
mobs.armor_setup(self)
end
-- for current mobs that dont have this set
if not self.base_selbox then

View File

@ -204,6 +204,7 @@ local zombie = {
attack_type = "punch",
punch_timer_cooloff = 0.5,
harmed_by_heal = true,
spawn_with_armor = true,
}
mobs:register_mob("mobs_mc:zombie", zombie)

View File

@ -238,8 +238,8 @@ after(5, function(dtime)
end)
minetest.register_chatcommand("lightning", {
params = "[<X> <Y> <Z>]",
description = S("Let lightning strike at the specified position or yourself"),
params = "[<X> <Y> <Z> | <player name>]",
description = S("Let lightning strike at the specified position or player. No parameter will strike yourself."),
privs = { maphack = true },
func = function(name, param)
local pos = {}
@ -247,21 +247,21 @@ minetest.register_chatcommand("lightning", {
pos.x = tonumber(pos.x)
pos.y = tonumber(pos.y)
pos.z = tonumber(pos.z)
local player_to_strike
if not (pos.x and pos.y and pos.z) then
pos = nil
player_to_strike = minetest.get_player_by_name(param)
if not player_to_strike and param == "" then
player_to_strike = minetest.get_player_by_name(name)
end
end
if name == "" and pos == nil then
if not player_to_strike and pos == nil then
return false, "No position specified and unknown player"
end
if pos then
lightning.strike(pos)
else
local player = minetest.get_player_by_name(name)
if player then
lightning.strike(player:get_pos())
else
return false, S("No position specified and unknown player")
end
elseif player_to_strike then
lightning.strike(player_to_strike:get_pos())
end
return true
end,

View File

@ -1,4 +1,4 @@
# textdomain: lightning
@1 was struck by lightning.=
Let lightning strike at the specified position or yourself=
Let lightning strike at the specified position or player. No parameter will strike yourself.=
No position specified and unknown player=

View File

@ -101,6 +101,18 @@ awards.register_achievement("mcl:bookcase", {
}
})
awards.register_achievement("mcl:buildIronPickaxe", {
title = S("Isn't It Iron Pick"),
-- TODO: This achievement should support all non-wood pickaxes
description = S("Craft a iron pickaxe using sticks and iron."),
icon = "default_tool_steelpick.png",
trigger = {
type = "craft",
item = "mcl_tools:pick_iron",
target = 1
}
})
-- Item pickup achievements: These are awarded when picking up a certain item.
-- The achivements are manually given in the mod mcl_item_entity.
awards.register_achievement("mcl:diamonds", {
@ -125,6 +137,24 @@ awards.register_achievement("mcl:mineWood", {
icon = "default_tree.png",
})
awards.register_achievement("mcl:whosCuttingOnions", {
title = S("Who is Cutting Onions?"),
description = S("Pick up a crying obsidian from the floor."),
icon = "default_obsidian.png^mcl_core_crying_obsidian.png",
})
awards.register_achievement("mcl:hiddenInTheDepths", {
title = S("Hidden in the Depths"),
description = S("Pick up an Ancient Debris from the floor."),
icon = "mcl_nether_ancient_debris_side.png",
})
awards.register_achievement("mcl:notQuiteNineLives", {
title = S('Not Quite "Nine" Lives'),
description = S("Charge a Respawn Anchor to the maximum."),
icon = "respawn_anchor_side4.png",
})
-- Smelting achivements: These are awarded when picking up an item from a furnace
-- output. They are given in mcl_furnaces.
awards.register_achievement("mcl:acquireIron", {
@ -163,6 +193,12 @@ awards.register_achievement("mcl:buildNetherPortal", {
icon = "default_obsidian.png",
})
awards.register_achievement("mcl:enterEndPortal", {
title = S("The End?"),
description = S("Or the beginning?\nHint: Enter an end portal."),
icon = "mcl_end_end_stone.png",
})
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
if non_pc_achievements then

View File

@ -10,7 +10,7 @@ Craft a stone pickaxe using sticks and cobblestone.=Fabriquez une pioche en pier
Craft a wooden sword using wooden planks and sticks on a crafting table.=Fabriquez une épée en bois à l'aide de planches et de bâtons en bois sur un établi.
DIAMONDS!=DIAMANTS!
Delicious Fish=Délicieux Poisson
Dispense With This=Dispenser de ça
Dispense With This=Dispensé de ça
Eat a cooked porkchop.=Mangez du porc cuit.
Eat a cooked rabbit.=Mangez du lapin cuit.
Get really desperate and eat rotten flesh.=Soyez vraiment désespéré et mangez de la chair pourrie.
@ -47,3 +47,19 @@ Use a crafting table to craft a wooden hoe from wooden planks and sticks.=Utilis
Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.=Utilisez un établi pour fabriquer une pioche en bois à partir de planches et de bâtons en bois.
Use obsidian and a fire starter to construct a Nether portal.=Utilisez de l'obsidienne et un briquet pour construire un portail du Nether.
Use wheat to craft a bread.=Utilisez du blé pour fabriquer un pain.
Stone Age=L'Age de Pierre
Mine a stone with new pickaxe.=Miner de la roche avec une nouvelle pioche
Hot Stuff=Chaud Devant !
Put lava in a bucket.=Remplir un Seau de lave
Ice Bucket Challenge=Le défi du seau d'eau glacée
Obtain an obsidian block.=Obtenir un bloc d'obsidienne
Isn't It Iron Pick=Bonne Pioche !
Craft a iron pickaxe using sticks and iron.=Fabriquer une pioche de fer avec des batons et du fer
Who is Cutting Onions?=Qui épluche des oignons ?
Pick up a crying obsidian from the floor.=Ramasser une obsidienne pleureuse sur le sol.
Hidden in the Depths=Caché dans les profondeurs
Pick up an Ancient Debris from the floor.=Ramasser un Ancien Débris
Not Quite "Nine" Lives=Presque "neuf" vies
Charge a Respawn Anchor to the maximum.=Charger une Ancre de Réapparition au maximum.
The End?=L'End ?
Or the beginning?\nHint: Enter an end portal.=Ou le commencement ?\nAstuce : Entrer dans un portail de l'End.

View File

@ -53,3 +53,13 @@ Hot Stuff=
Put lava in a bucket.=
Ice Bucket Challenge=
Obtain an obsidian block.=
Isn't It Iron Pick=
Craft a iron pickaxe using sticks and iron.=
Who is Cutting Onions?=
Pick up a crying obsidian from the floor.=
Hidden in the Depths=
Pick up an Ancient Debris from the floor.=
Not Quite "Nine" Lives=
Charge a Respawn Anchor to the maximum.=
The End?=
Or the beginning?\nHint: Enter an end portal.=

View File

@ -5,3 +5,4 @@ Error: Too many parameters!=Erreur: Trop de paramètres!
Error: Incorrect value of XP=Erreur: Valeur incorrecte de XP
Error: Player not found=Erreur: Joueur introuvable
Added @1 XP to @2, total: @3, experience level: @4=Ajout de @1 XP à @2, total: @3, niveau d'expérience: @4
Bottle o' Enchanting=Fiole d'expérience

View File

@ -0,0 +1,4 @@
# textdomain: mcl_info
Set debug bit mask: 0 @= disable, 1 @= biome name, 2 @= coordinates, 3 @= all=Réglage du masque de débugage : 0 @= désactiver, 1 @= nom de biome, 2 @= coordonnées, 3 @= tout=
Error! Possible values are integer numbers from @1 to @2=Erreur ! Les valeurs autorisées sont des nombres entiers de @1 à @2
Debug bit mask set to @1=Masque de débugage réglé à @1

View File

@ -0,0 +1,2 @@
# textdomain: mcl_observers
Bell=Cloche

View File

@ -0,0 +1,70 @@
local S = minetest.get_translator("mcl_target")
local mod_farming = minetest.get_modpath("mcl_farming")
mcl_target = {}
function mcl_target.hit(pos, time)
minetest.set_node(pos, {name="mcl_target:target_on"})
mesecon.receptor_on(pos, mesecon.rules.alldirs)
local timer = minetest.get_node_timer(pos)
timer:start(time)
end
minetest.register_node("mcl_target:target_off", {
description = S("Target"),
_doc_items_longdesc = S("A target is a block that provides a temporary redstone charge when hit by a projectile."),
_doc_items_usagehelp = S("Throw a projectile on the target to activate it."),
tiles = {"mcl_target_target_top.png", "mcl_target_target_top.png", "mcl_target_target_side.png"},
groups = {hoey = 1},
sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.1},
}),
mesecons = {
receptor = {
state = mesecon.state.off,
rules = mesecon.rules.alldirs,
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
minetest.register_node("mcl_target:target_on", {
description = S("Target"),
_doc_items_create_entry = false,
tiles = {"mcl_target_target_top.png", "mcl_target_target_top.png", "mcl_target_target_side.png"},
groups = {hoey = 1, not_in_creative_inventory = 1},
drop = "mcl_target:target_off",
sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.1},
}),
on_timer = function(pos, elapsed)
local node = minetest.get_node(pos)
if node.name == "mcl_target:target_on" then --has not been dug
minetest.set_node(pos, {name="mcl_target:target_off"})
mesecon.receptor_off(pos, mesecon.rules.alldirs)
end
end,
mesecons = {
receptor = {
state = mesecon.state.on,
rules = mesecon.rules.alldirs,
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
if mod_farming then
minetest.register_craft({
output = "mcl_target:target_off",
recipe = {
{"", "mesecons:redstone", ""},
{"mesecons:redstone", "mcl_farming:hay_block", "mesecons:redstone"},
{"", "mesecons:redstone", ""},
},
})
end

View File

@ -0,0 +1,4 @@
# textdomain: mcl_target
Target=Cible
A target is a block that provides a temporary redstone charge when hit by a projectile.=La cible est un bloc qui se comporte comme une source d'énergie temporaire quand elle est frappée par un projectile.
Throw a projectile on the target to activate it.=Lancer un projectile sur la cible pour l'activer.

View File

@ -0,0 +1,4 @@
# textdomain: mcl_target
Target=
A target is a block that provides a temporary redstone charge when hit by a projectile.=
Throw a projectile on the target to activate it.=

View File

@ -0,0 +1,3 @@
name = mcl_target
author = AFCMS
depends = mesecons, mcl_sounds

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

View File

@ -216,6 +216,18 @@ mesecon.register_button(
S("A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."),
"mesecons_button_push")
mesecon.register_button(
"polished_blackstone",
S("Polished Blackstone Button"),
"mcl_blackstone_polished.png",
"mcl_blackstone:blackstone_polished",
mcl_sounds.node_sound_stone_defaults(),
{material_stone=1,handy=1,pickaxey=1},
1,
false,
S("A polished blackstone button is a redstone component made out of polished blackstone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."),
"mesecons_button_push")
local woods = {
{ "wood", "mcl_core:wood", "default_wood.png", S("Oak Button") },
{ "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", S("Acacia Button") },
@ -223,6 +235,8 @@ local woods = {
{ "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", S("Dark Oak Button") },
{ "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", S("Spruce Button") },
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Button") },
{ "warped_hyphae_wood", "mcl_mushroom:warped_hyphae_wood", "warped_hyphae_wood.png", S("Warped Hyphae Button") },
{ "crimson_hyphae_wood", "mcl_mushroom:crimson_hyphae_wood", "crimson_hyphae_wood.png", S("Crimson Hyphae Button") },
}
for w=1, #woods do

View File

@ -1,6 +1,7 @@
# textdomain: mesecons_button
Use the button to push it.=Utilisez le bouton pour le pousser.
Stone Button=Bouton de pierre
Polished Blackstone Button=Bouton de Pierre Noire Polie
A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=Un bouton en pierre est un composant Redstone en pierre qui peut être poussé pour fournir de la puissance Redstone. Lorsqu'il est poussé, il alimente les composants Redstone adjacents pendant 1 seconde.
Oak Button=Bouton en Chêne
Acacia Button=Bouton en Acacia
@ -8,6 +9,8 @@ Birch Button=Bouton en Bouleau
Dark Oak Button=Bouton en Chêne Noir
Spruce Button=Bouton en Sapin
Jungle Button=Bouton en Acajou
Warped Hyphae Button=Bouton en Hyphae Tordu
Crimson Hyphae Button=Bouton en Hyphae Ecarlate
A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=Un bouton en bois est un composant de redstone en bois qui peut être poussé pour fournir une puissance de redstone. Lorsqu'il est poussé, il alimente les composants Redstone adjacents pendant 1,5 seconde. Les boutons en bois peuvent également être poussés par des flèches.
Provides redstone power when pushed=Fournit une puissance de redstone lorsqu'il est poussé
Push duration: @1s=Durée de poussée: @1s

View File

@ -1,6 +1,7 @@
# textdomain: mesecons_button
Use the button to push it.=
Stone Button=
Polished Blackstone Button=
A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=
Oak Button=
Acacia Button=
@ -8,6 +9,8 @@ Birch Button=
Dark Oak Button=
Spruce Button=
Jungle Button=
Warped Hyphae Button=
Crimson Hyphae Button=
A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=
Provides redstone power when pushed=
Push duration: @1s=

View File

@ -164,6 +164,8 @@ local woods = {
{ "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", S("Dark Oak Pressure Plate" )},
{ "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", S("Spruce Pressure Plate") },
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Pressure Plate") },
{ "warped_hyphae_wood", "mcl_mushrooom:warped_hyphae_wood", "warped_hyphae_wood.png", S("Warped Hyphae Pressure Plate")},
{ "crimson_hyphae_wood", "mcl_mushrooom:crimson_hyphae_wood", "crimson_hyphae_wood.png", S("Crimson Hyphae Pressure Plate")},
}
for w=1, #woods do
@ -201,6 +203,19 @@ mesecon.register_pressure_plate(
{ player = true, mob = true },
S("A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else."))
mesecon.register_pressure_plate(
"mesecons_pressureplates:pressure_plate_polished_blackstone",
S("Polished Blackstone Pressure Plate"),
{"mcl_blackstone_polished.png"},
{"mcl_blackstone_polished.png"},
"default_stone.png",
nil,
{{"mcl_blackstone:blackstone_polished", "mcl_blackstone:blackstone_polished"}},
mcl_sounds.node_sound_stone_defaults(),
{pickaxey=1, material_stone=1},
{ player = true, mob = true },
S("A polished blackstone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else."))
mesecon.register_pressure_plate(
"mesecons_pressureplates:pressure_plate_gold",
S("Light-Weighted Pressure Plate"),
@ -211,5 +226,18 @@ mesecon.register_pressure_plate(
{{"mcl_core:gold_ingot", "mcl_core:gold_ingot"}},
mcl_sounds.node_sound_metal_defaults(),
{pickaxey=1},
{ player = true, mob = true },
S("A light-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else."))
nil,
S("A light-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it."))
mesecon.register_pressure_plate(
"mesecons_pressureplates:pressure_plate_iron",
S("Heavy-Weighted Pressure Plate"),
{"default_steel_block.png"},
{"default_steel_block.png"},
"default_steel_block.png",
nil,
{{"mcl_core:iron_ingot", "mcl_core:iron_ingot"}},
mcl_sounds.node_sound_metal_defaults(),
{pickaxey=1},
nil,
S("A heavy-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it."))

View File

@ -6,10 +6,18 @@ Birch Pressure Plate=Plaque de pression en Bouleau
Dark Oak Pressure Plate=Plaque de pression en Chêne Noir
Spruce Pressure Plate=Plaque de pression en Sapin
Jungle Pressure Plate=Plaque de pression en Acajou
Warped Hyphae Pressure Plate=Plaque de pression en Hyphae Tordue
Crimson Hyphae Pressure Plate=Plaque de pression en Hyphae Ecarlate
A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=Une plaque de pression en bois est un composant de redstone qui alimente ses blocs environnants en puissance de redstone tandis que tout objet mobile (y compris les objets lâchés, les joueurs et les mobs) repose dessus.
Stone Pressure Plate=Plaque de pression en pierre
A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=Une plaque de pression en pierre est un composant de redstone qui alimente ses blocs environnants en puissance de redstone pendant qu'un joueur ou un mob se tient au-dessus. Il n'est déclenché par rien d'autre.
Provides redstone power when pushed=Fournit une puissance de redstone lorsqu'il est poussé
Polished Blackstone Pressure Plate=Plaque de pression en pierre noire polie
A polished blackstone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=Une plaque de pression en pierre noire polie est un composant de redstone qui alimente ses blocs environnants en puissance de redstone pendant qu'un joueur ou un mob se tient au-dessus. Il n'est déclenché par rien d'autre.
Light-Weighted Pressure Plate=Plaque de pression pondérée légère
A light-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=Une plaque de pression pondérée légère est un composant de redstone qui alimente ses blocs environnants en puissance de redstone tandis que tout objet mobile (y compris les objets lâchés, les joueurs et les mobs) repose dessus.
Heavy-Weighted Pressure Plate=Plaque de pression pondérée lourde
A heavy-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=Une plaque de pression pondérée lourde est un composant de redstone qui alimente ses blocs environnants en puissance de redstone tandis que tout objet mobile (y compris les objets lâchés, les joueurs et les mobs) repose dessus.
Provides redstone power when pushed=Fournit une puissance de redstone lorsque poussé
Pushable by players, mobs and objects=Poussable par les joueurs, les mobs et les objets
Pushable by players and mobs=Poussable par les joueurs et les mobs
Pushable by players=Poussable par les joueurs

View File

@ -6,9 +6,17 @@ Birch Pressure Plate=
Dark Oak Pressure Plate=
Spruce Pressure Plate=
Jungle Pressure Plate=
Warped Hyphae Pressure Plate=
Crimson Hyphae Pressure Plate=
A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=
Stone Pressure Plate=
A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=
Polished Blackstone Pressure Plate=
A polished blackstone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=
Light-Weighted Pressure Plate=
A light-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=
Heavy-Weighted Pressure Plate=
A heavy-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=
Provides redstone power when pushed=
Pushable by players, mobs and objects=
Pushable by players and mobs=

View File

@ -4,9 +4,11 @@ mcl_beds.pos = {}
mcl_beds.bed_pos = {}
local modpath = minetest.get_modpath("mcl_beds")
local S = minetest.get_translator(minetest.get_current_modname())
-- Load files
dofile(modpath .. "/functions.lua")
dofile(modpath .. "/api.lua")
dofile(modpath .. "/beds.lua")
dofile(modpath .. "/respawn_anchor.lua")

View File

@ -39,3 +39,4 @@ You're sleeping.=Tu dors.
You will fall asleep when all players are in bed.=Vous vous endormirez lorsque tous les joueurs seront au lit.
You're in bed.=Tu es au lit.
Allows you to sleep=Vous permet de dormir
Respawn Anchor=Ancre de Réapparition

View File

@ -40,3 +40,4 @@ You will fall asleep when all players are in bed.=
You will fall asleep when @1% of all players are in bed.=
You're in bed.=
Allows you to sleep=
Respawn Anchor=

View File

@ -2,4 +2,4 @@ name = mcl_beds
author = BlockMen
description =
depends = playerphysics
optional_depends = mcl_sounds, mcl_worlds, mcl_wool, mcl_dye, mcl_explosions, mcl_weather, mcl_spawn, doc
optional_depends = mcl_sounds, mcl_worlds, mcl_wool, mcl_dye, mcl_explosions, mcl_weather, mcl_spawn, doc, mcl_nether

View File

@ -0,0 +1,177 @@
--TODO: Add sounds for the respawn anchor
--Nether ends at y -29077
--Nether roof at y -28933
local S = minetest.get_translator(minetest.get_current_modname())
--local mod_doc = minetest.get_modpath("doc") -> maybe add documentation ?
minetest.register_node("mcl_beds:respawn_anchor",{
description=S("Respawn Anchor"),
tiles = {
"respawn_anchor_top_off.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side0.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
{-0.5, -0.5, -0.5, 0.5, -0.47, 0.5}, -- Bottom level, -0.47 because -0.5 is so low that you can see the texture of the block below through
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_1"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
end
end
end,
groups = {pickaxey=1, material_stone=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_1",{
description=S("Respawn Anchor"),
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side1.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_2"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_2",{
description=S("Respawn Anchor"),
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side2.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_3"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_3",{
description=S("Respawn Anchor"),
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side3.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_4"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_4",{
description=S("Respawn Anchor"),
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side4.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
awards.unlock(player:get_player_name(), "mcl:notQuiteNineLives")
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_craft({ output = "mcl_beds:respawn_anchor",
recipe = {
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"},
{"mcl_nether:glowstone", "mcl_nether:glowstone", "mcl_nether:glowstone"},
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"}
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -1,149 +1,149 @@
--[[
#!#!#!#Cake mod created by Jordan4ibanez#!#!#
#!#!#!#Released under CC Attribution-ShareAlike 3.0 Unported #!#!#
]]--
local CAKE_HUNGER_POINTS = 2
local S = minetest.get_translator(minetest.get_current_modname())
local cake_texture = {"cake_top.png","cake_bottom.png","cake_inner.png","cake_side.png","cake_side.png","cake_side.png"}
local slice_1 = { -7/16, -8/16, -7/16, -5/16, 0/16, 7/16}
local slice_2 = { -7/16, -8/16, -7/16, -3/16, 0/16, 7/16}
local slice_3 = { -7/16, -8/16, -7/16, -1/16, 0/16, 7/16}
local slice_4 = { -7/16, -8/16, -7/16, 1/16, 0/16, 7/16}
local slice_5 = { -7/16, -8/16, -7/16, 3/16, 0/16, 7/16}
local slice_6 = { -7/16, -8/16, -7/16, 5/16, 0/16, 7/16}
local full_cake = { -7/16, -8/16, -7/16, 7/16, 0/16, 7/16}
minetest.register_craft({
output = "mcl_cake:cake",
recipe = {
{"mcl_mobitems:milk_bucket", "mcl_mobitems:milk_bucket", "mcl_mobitems:milk_bucket"},
{"mcl_core:sugar", "mcl_throwing:egg", "mcl_core:sugar"},
{"mcl_farming:wheat_item", "mcl_farming:wheat_item", "mcl_farming:wheat_item"},
},
replacements = {
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
},
})
minetest.register_node("mcl_cake:cake", {
description = S("Cake"),
_tt_help = S("With 7 tasty slices!").."\n"..S("Hunger points: +@1 per slice", CAKE_HUNGER_POINTS),
_doc_items_longdesc = S("Cakes can be placed and eaten to restore hunger points. A cake has 7 slices. Each slice restores 2 hunger points and 0.4 saturation points. Cakes will be destroyed when dug or when the block below them is broken."),
_doc_items_usagehelp = S("Place the cake anywhere, then rightclick it to eat a single slice. You can't eat from the cake when your hunger bar is full."),
tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
inventory_image = "cake.png",
wield_image = "cake.png",
paramtype = "light",
is_ground_content = false,
drawtype = "nodebox",
selection_box = {
type = "fixed",
fixed = full_cake
},
node_box = {
type = "fixed",
fixed = full_cake
},
stack_max = 1,
groups = {handy=1, cake=7, food=2,no_eat_delay=1, attached_node=1, dig_by_piston=1, comparator_signal=14},
drop = "",
on_rightclick = function(pos, node, clicker, itemstack)
-- Cake is subject to protection
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(2, ItemStack("mcl_cake:cake_6"), ItemStack("mcl_cake:cake"), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= "mcl_cake:cake" or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.add_node(pos,{type="node",name="mcl_cake:cake_6",param2=0})
end
end,
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_saturation = 0.4,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
local register_slice = function(level, nodebox, desc)
local this = "mcl_cake:cake_"..level
local after_eat = "mcl_cake:cake_"..(level-1)
local on_rightclick
if level > 1 then
on_rightclick = function(pos, node, clicker, itemstack)
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(CAKE_HUNGER_POINTS, ItemStack(after_eat), ItemStack(this), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= this or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.add_node(pos,{type="node",name=after_eat,param2=0})
end
end
else
-- Last slice
on_rightclick = function(pos, node, clicker, itemstack)
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(CAKE_HUNGER_POINTS, ItemStack("mcl:cake:cake 0"), ItemStack("mcl_cake:cake_1"), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= this or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.remove_node(pos)
minetest.check_for_falling(pos)
end
end
end
minetest.register_node(this, {
description = desc,
_doc_items_create_entry = false,
tiles = cake_texture,
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
paramtype = "light",
is_ground_content = false,
drawtype = "nodebox",
selection_box = {
type = "fixed",
fixed = nodebox,
},
node_box = {
type = "fixed",
fixed = nodebox,
},
groups = {handy=1, cake=level, food=2,no_eat_delay=1,attached_node=1,not_in_creative_inventory=1,dig_by_piston=1,comparator_signal=level*2},
drop = "",
on_rightclick = on_rightclick,
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_saturation = 0.4,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mcl_cake:cake", "nodes", "mcl_cake:cake_"..level)
end
end
register_slice(6, slice_6, S("Cake (6 Slices Left)"))
register_slice(5, slice_5, S("Cake (5 Slices Left)"))
register_slice(4, slice_4, S("Cake (4 Slices Left)"))
register_slice(3, slice_3, S("Cake (3 Slices Left)"))
register_slice(2, slice_2, S("Cake (2 Slices Left)"))
register_slice(1, slice_1, S("Cake (1 Slice Left)"))
--[[
#!#!#!#Cake mod created by Jordan4ibanez#!#!#
#!#!#!#Released under CC Attribution-ShareAlike 3.0 Unported #!#!#
]]--
local CAKE_HUNGER_POINTS = 2
local S = minetest.get_translator(minetest.get_current_modname())
local cake_texture = {"cake_top.png","cake_bottom.png","cake_inner.png","cake_side.png","cake_side.png","cake_side.png"}
local slice_1 = { -7/16, -8/16, -7/16, -5/16, 0/16, 7/16}
local slice_2 = { -7/16, -8/16, -7/16, -3/16, 0/16, 7/16}
local slice_3 = { -7/16, -8/16, -7/16, -1/16, 0/16, 7/16}
local slice_4 = { -7/16, -8/16, -7/16, 1/16, 0/16, 7/16}
local slice_5 = { -7/16, -8/16, -7/16, 3/16, 0/16, 7/16}
local slice_6 = { -7/16, -8/16, -7/16, 5/16, 0/16, 7/16}
local full_cake = { -7/16, -8/16, -7/16, 7/16, 0/16, 7/16}
minetest.register_craft({
output = "mcl_cake:cake",
recipe = {
{"mcl_mobitems:milk_bucket", "mcl_mobitems:milk_bucket", "mcl_mobitems:milk_bucket"},
{"mcl_core:sugar", "mcl_throwing:egg", "mcl_core:sugar"},
{"mcl_farming:wheat_item", "mcl_farming:wheat_item", "mcl_farming:wheat_item"},
},
replacements = {
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
},
})
minetest.register_node("mcl_cake:cake", {
description = S("Cake"),
_tt_help = S("With 7 tasty slices!").."\n"..S("Hunger points: +@1 per slice", CAKE_HUNGER_POINTS),
_doc_items_longdesc = S("Cakes can be placed and eaten to restore hunger points. A cake has 7 slices. Each slice restores 2 hunger points and 0.4 saturation points. Cakes will be destroyed when dug or when the block below them is broken."),
_doc_items_usagehelp = S("Place the cake anywhere, then rightclick it to eat a single slice. You can't eat from the cake when your hunger bar is full."),
tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
inventory_image = "cake.png",
wield_image = "cake.png",
paramtype = "light",
is_ground_content = false,
drawtype = "nodebox",
selection_box = {
type = "fixed",
fixed = full_cake
},
node_box = {
type = "fixed",
fixed = full_cake
},
stack_max = 1,
groups = {handy=1, cake=7, food=2, no_eat_delay=1, compostability=100, attached_node=1, dig_by_piston=1, comparator_signal=14},
drop = "",
on_rightclick = function(pos, node, clicker, itemstack)
-- Cake is subject to protection
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(2, ItemStack("mcl_cake:cake_6"), ItemStack("mcl_cake:cake"), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= "mcl_cake:cake" or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.add_node(pos,{type="node",name="mcl_cake:cake_6",param2=0})
end
end,
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_saturation = 0.4,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
local register_slice = function(level, nodebox, desc)
local this = "mcl_cake:cake_"..level
local after_eat = "mcl_cake:cake_"..(level-1)
local on_rightclick
if level > 1 then
on_rightclick = function(pos, node, clicker, itemstack)
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(CAKE_HUNGER_POINTS, ItemStack(after_eat), ItemStack(this), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= this or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.add_node(pos,{type="node",name=after_eat,param2=0})
end
end
else
-- Last slice
on_rightclick = function(pos, node, clicker, itemstack)
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(CAKE_HUNGER_POINTS, ItemStack("mcl:cake:cake 0"), ItemStack("mcl_cake:cake_1"), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= this or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.remove_node(pos)
minetest.check_for_falling(pos)
end
end
end
minetest.register_node(this, {
description = desc,
_doc_items_create_entry = false,
tiles = cake_texture,
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
paramtype = "light",
is_ground_content = false,
drawtype = "nodebox",
selection_box = {
type = "fixed",
fixed = nodebox,
},
node_box = {
type = "fixed",
fixed = nodebox,
},
groups = {handy=1, cake=level, food=2, no_eat_delay=1, compostability=100, attached_node=1, not_in_creative_inventory=1, dig_by_piston=1, comparator_signal=level*2},
drop = "",
on_rightclick = on_rightclick,
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_saturation = 0.4,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mcl_cake:cake", "nodes", "mcl_cake:cake_"..level)
end
end
register_slice(6, slice_6, S("Cake (6 Slices Left)"))
register_slice(5, slice_5, S("Cake (5 Slices Left)"))
register_slice(4, slice_4, S("Cake (4 Slices Left)"))
register_slice(3, slice_3, S("Cake (3 Slices Left)"))
register_slice(2, slice_2, S("Cake (2 Slices Left)"))
register_slice(1, slice_1, S("Cake (1 Slice Left)"))

View File

@ -1,3 +1,5 @@
--TODO: Add advancement
local S = minetest.get_translator(minetest.get_current_modname())
mcl_compass = {}
@ -9,28 +11,58 @@ local compass_frames = 32
-- Timer for random compass spinning
local random_timer = 0
local random_timer_trigger = 0.5 -- random compass spinning tick in seconds. Increase if there are performance problems
local random_timer_trigger = 0.5 -- random compass spinning tick in seconds. Incr ease if there are performance problems
local random_frame = math.random(0, compass_frames-1)
function mcl_compass.get_compass_image(pos, dir)
function mcl_compass.get_compass_image(pos, dir, x, y, z)
-- Compasses do not work in certain zones
if mcl_worlds.compass_works(pos) then
local spawn = {x=0,y=0,z=0}
local ssp = minetest.setting_get_pos("static_spawnpoint")
if ssp then
spawn = ssp
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
spawn = {x=0,y=0,z=0}
if mcl_worlds.compass_works(pos) and x ~= nil and y ~= nil and z ~= nil then
local _, dim = mcl_worlds.y_to_layer(y)
local _, playerdim = mcl_worlds.y_to_layer(pos.y)
if dim == playerdim then --Check if player and compass target are in the same dimension, above check is just if the diemension is valid for the non lodestone compass
local spawn = {x=x,y=y,z=z}
local ssp = minetest.setting_get_pos("static_spawnpoint")
if ssp and x == 0 and y == 0 and z == 0 then
spawn = ssp
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
spawn = {x=0,y=0,z=0}
end
end
local angle_north = math.deg(math.atan2(spawn.x - pos.x, spawn.z - pos.z))
if angle_north < 0 then angle_north = angle_north + 360 end
local angle_dir = -math.deg(dir)
local angle_relative = (angle_north - angle_dir + 180) % 360
return math.floor((angle_relative/11.25) + 0.5) % compass_frames
else
return random_frame
end
local angle_north = math.deg(math.atan2(spawn.x - pos.x, spawn.z - pos.z))
if angle_north < 0 then angle_north = angle_north + 360 end
local angle_dir = -math.deg(dir)
local angle_relative = (angle_north - angle_dir + 180) % 360
return math.floor((angle_relative/11.25) + 0.5) % compass_frames
else
return random_frame
if x ~= 0 and y ~= 0 and z~= 0 and x ~= nil and y ~= nil and x~= nil then
local _, dim = mcl_worlds.y_to_layer(y)
local _, playerdim = mcl_worlds.y_to_layer(pos.y)
if dim == playerdim then --already explained that very same if statement above
local spawn = {x=x,y=y,z=z}
local ssp = minetest.setting_get_pos("static_spawnpoint")
if ssp and x == 0 and y == 0 and z == 0 then
spawn = ssp
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
spawn = {x=0,y=0,z=0}
end
end
local angle_north = math.deg(math.atan2(spawn.x - pos.x, spawn.z - pos.z))
if angle_north < 0 then angle_north = angle_north + 360 end
local angle_dir = -math.deg(dir)
local angle_relative = (angle_north - angle_dir + 180) % 360
return math.floor((angle_relative/11.25) + 0.5) % compass_frames
else
return random_frame
end
else
return random_frame
end
end
end
@ -52,9 +84,39 @@ minetest.register_globalstep(function(dtime)
end
if has_compass(player) then
local pos = player:get_pos()
local compass_image = mcl_compass.get_compass_image(pos, player:get_look_horizontal())
for j,stack in pairs(player:get_inventory():get_list("main")) do
x = stack:get_meta():get_string("x") -- i know i could write the pos in meta, but i like this method more, and it is basicly the same, since else there would be one table with 3 values, and i have 3 values on their own
y = stack:get_meta():get_string("y")
z = stack:get_meta():get_string("z")
x = tonumber(x)
y = tonumber(y)
z = tonumber(z)
if x == nil or y == nil or z == nil then --checking if the compass has lodestone meta
compass_image = mcl_compass.get_compass_image(pos, player:get_look_horizontal(), 0, 0, 0) --no lodestone meta
else
checkblock = {x = x, y = y, z = z}
local function get_far_node(pos) --function that tries to read node normally, and does it even if its unloaded https://dev.minetest.net/minetest.get_node
local node = minetest.get_node(pos)
if node.name == "ignore" then
minetest.get_voxel_manip():read_from_map(pos, pos)
node = minetest.get_node(pos)
end
return node
end
if get_far_node(checkblock).name == "mcl_compass:lodestone" then --check if lodestone still exists
compass_image = mcl_compass.get_compass_image(pos, player:get_look_horizontal(), x, y, z)
compass_image = compass_image .. "_lodestone"
else -- lodestone got destroyed
compass_image = random_frame .. "_lodestone"
end
end
if minetest.get_item_group(stack:get_name(), "compass") ~= 0 and
minetest.get_item_group(stack:get_name(), "compass")-1 ~= compass_image then
local itemname = "mcl_compass:"..compass_image
@ -81,8 +143,8 @@ for i,img in ipairs(images) do
inv = 0
end
local use_doc, longdesc, tt
--Why is there no usage help? This should be fixed.
--local usagehelp
--Why is there no usage help? This should be fixed.
--local usagehelp
use_doc = i == stereotype_frame
if use_doc then
tt = S("Points to the world origin")
@ -100,6 +162,18 @@ for i,img in ipairs(images) do
stack_max = 64,
groups = {not_in_creative_inventory=inv, compass=i, tool=1, disable_repair=1 }
})
minetest.register_craftitem(itemstring .. "_lodestone", {
description = S("Lodestone Compass"),
_tt_help = tt,
_doc_items_create_entry = use_doc,
_doc_items_longdesc = longdesc,
--_doc_items_usagehelp = usagehelp,
inventory_image = img .. "^[colorize:purple:50",
wield_image = img .. "^[colorize:purple:50",
stack_max = 64,
groups = {not_in_creative_inventory=1, compass=i, tool=1, disable_repair=1 }
})
-- Help aliases. Makes sure the lookup tool works correctly
if not use_doc and doc_mod then
@ -116,9 +190,42 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "mcl_compass:lodestone",
recipe = {
{"mcl_core:stonebrickcarved","mcl_core:stonebrickcarved","mcl_core:stonebrickcarved"},
{"mcl_core:stonebrickcarved", "mcl_nether:netherite_ingot", "mcl_core:stonebrickcarved"},
{"mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved"}
}
})
minetest.register_alias("mcl_compass:compass", "mcl_compass:"..stereotype_frame)
-- Export stereotype item for other mods to use
mcl_compass.stereotype = "mcl_compass:"..tostring(stereotype_frame)
minetest.register_node("mcl_compass:lodestone",{
description=S("Lodestone"),
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack).match(itemstack.get_name(itemstack),"mcl_compass:") then
if itemstack.get_name(itemstack) ~= "mcl_compass:lodestone" then
itemstack:get_meta():set_string("x", pos.x)
itemstack:get_meta():set_string("y", pos.y)
itemstack:get_meta():set_string("z", pos.z)
end
end
end,
tiles = {
"lodestone_top.png",
"lodestone_bottom.png",
"lodestone_side1.png",
"lodestone_side2.png",
"lodestone_side3.png",
"lodestone_side4.png"
},
groups = {pickaxey=1, material_stone=1},
_mcl_hardness = 1.5,
_mcl_blast_resistance = 6,
sounds = mcl_sounds.node_sound_stone_defaults()
})

View File

@ -2,3 +2,5 @@
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Les boussoles sont des outils qui pointent vers l'origine du monde (X@=0,Z@=0) ou le point d'apparition dans l'Overworld.
Compass=Boussole
Points to the world origin=Pointe vers l'origine mondiale
Lodestone Compass=Boussole magnétisée
Lodestone=Magnétite

View File

@ -2,3 +2,5 @@
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=
Compass=
Points to the world origin=
Lodestone Compass=
Lodestone=

View File

@ -1,4 +1,4 @@
name = mcl_compass
description = A compass item which points towards the world origin.
depends = mcl_core, mcl_worlds, mesecons
optional_depends = doc
depends = mcl_core, mcl_worlds, mesecons, mcl_nether, mcl_sounds
optional_depends = doc

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -32,108 +32,6 @@ minetest.register_craft({
}
})
local compostability = {
["mcl_cake:cake"] = 100,
["mcl_farming:pumpkin_pie"] = 100,
["mcl_farming:potato_item_baked"] = 85,
["mcl_farming:bread"] = 85,
["mcl_farming:cookie"] = 85,
["mcl_farming:hay_block"] = 85,
-- mushroom cap block have 64 variants, wtf!?
["mcl_mushrooms:brown_mushroom_block_cap_111111"] = 85,
["mcl_mushrooms:red_mushroom_block_cap_111111"] = 85,
["mcl_nether:nether_wart_block"] = 85,
["mcl_mushroom:warped_wart_block"] = 85,
["mcl_core:apple"] = 65,
-- missing: azalea
["mcl_farming:beetroot_item"] = 65,
-- missing: big dripleaf
["mcl_farming:carrot_item"] = 65,
-- what's up with cocoa beans?
["mcl_dye:brown"] = 65,
["mcl_flowers:fern"] = 65,
["mcl_flowers:double_fern"] = 65,
["mcl_flowers:allium"] = 65,
["mcl_flowers:azure_bluet"] = 65,
["mcl_flowers:blue_orchid"] = 65,
["mcl_flowers:dandelion"] = 65,
["mcl_flowers:lilac"] = 65,
["mcl_flowers:oxeye_daisy"] = 65,
["mcl_flowers:poppy"] = 65,
["mcl_flowers:tulip_orange"] = 65,
["mcl_flowers:tulip_pink"] = 65,
["mcl_flowers:tulip_red"] = 65,
["mcl_flowers:tulip_white"] = 65,
["mcl_flowers:peony"] = 65,
["mcl_flowers:rose_bush"] = 65,
["mcl_flowers:sunflower"] = 65,
["mcl_flowers:waterlily"] = 65,
["mcl_farming:melon"] = 65,
["mcl_core:moss"] = 65,
-- mushroom aliases below?
["mcl_farming:mushroom_brown"] = 65,
["mcl_mushrooms:mushroom_brown"] = 65,
["mcl_farming:mushroom_red"] = 65,
["mcl_mushrooms:mushroom_red"] = 65,
["mcl_mushrooms:brown_mushroom_block_stem_full"] = 65,
["mcl_mushrooms:red_mushroom_block_stem_full"] = 65,
-- nether wart
["mcl_farming:potato_item"] = 65,
["mcl_farming:pumpkin"] = 65,
["mcl_farming:pumpkin_face_light"] = 65,
["mcl_ocean:sea_pickle_"] = 65,
["mcl_mushroom:shroomlight"] = 65,
-- missing: spore blossom
["mcl_farming:wheat_item"] = 65,
["mcl_mushroom:crimson_fungus"] = 65,
["mcl_mushroom:warped_fungus"] = 65,
["mcl_mushroom:crimson_roots"] = 65,
["mcl_mushroom:warped_roots"] = 65,
["mcl_core:cactus"] = 50,
["mcl_ocean:dried_kelp_block"] = 50,
-- missing: flowering azalea leaves
-- missing: glow lichen
["mcl_farming:melon_item"] = 50,
["mcl_mushroom:nether_sprouts"] = 50,
["mcl_core:reeds"] = 50,
["mcl_flowers:double_grass"] = 50,
["mcl_core:vine"] = 50,
-- missing: weeping vines
["mcl_mushroom:twisting_vines"] = 50,
["mcl_flowers:tallgrass"] = 30,
["mcl_farming:beetroot_seeds"] = 30,
["mcl_core:dirt_with_grass"] = 30,
["mcl_core:tallgrass"] = 30,
["mcl_ocean:dried_kelp"] = 30,
["mcl_ocean:kelp"] = 30,
["mcl_core:leaves"] = 30,
["mcl_core:acacialeaves"] = 30,
["mcl_core:birchleaves"] = 30,
["mcl_core:darkleaves"] = 30,
["mcl_core:jungleleaves"] = 30,
["mcl_core:spruceleaves"] = 30,
--
["mcl_farming:melon_seeds"] = 30,
["mcl_core:moss_carpet"] = 30,
["mcl_farming:pumpkin_seeds"] = 30,
["mcl_core:sapling"] = 30,
["mcl_core:acaciasapling"] = 30,
["mcl_core:birchsapling"] = 30,
["mcl_core:darksapling"] = 30,
["mcl_core:junglesapling"] = 30,
["mcl_core:sprucesapling"] = 30,
["mcl_ocean:seagrass"] = 30,
-- missing: small dripleaf
["mcl_sweet_berry:sweet_berry"] = 30,
["mcl_farming:sweet_berry"] = 30,
["mcl_farming:wheat_seeds"] = 30,
}
local function composter_add_item(pos, node, player, itemstack, pointed_thing)
--
-- handler for filling the composter when rightclicked
@ -147,8 +45,9 @@ local function composter_add_item(pos, node, player, itemstack, pointed_thing)
return itemstack
end
local itemname = itemstack:get_name()
local chance = compostability[itemname]
if chance then
local chance = minetest.get_item_group(itemname, "compostability")
if chance > 0 then
if not minetest.is_creative_enabled(player:get_player_name()) then
itemstack:take_item()
end

View File

@ -21,6 +21,14 @@ MIT License.
The textures are taken from the Minecraft resource pack “Faithful 1.11” by Vattic and
xMrVizzy and contributers.
CC BY-SA 4.0
mcl_core_lava_spark.png is based on the Pixel Perfection resource pack for Minecraft 1.11,
authored by XSSheep.
Source: <https://www.planetminecraft.com/texture_pack/131pixel-perfection/>
License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)
Sounds
======
All sounds included in this mod are under the MIT License.

View File

@ -139,7 +139,7 @@ minetest.register_craftitem("mcl_core:apple", {
stack_max = 64,
on_place = minetest.item_eat(4),
on_secondary_use = minetest.item_eat(4),
groups = { food = 2, eatable = 4 },
groups = { food = 2, eatable = 4, compostability=65 },
_mcl_saturation = 2.4,
})

View File

@ -54,6 +54,137 @@ minetest.register_abm({
end,
})
--
-- Production of sparks from lava
--
local LAVA_SPARK_ABM_INTERVAL = 5
local lava_spark_limit = minetest.settings:get("mcl_core_lava_spark_limit")
if lava_spark_limit == nil then
lava_spark_limit = 10
else
lava_spark_limit = tonumber(lava_spark_limit)
end
local lava_spark_chance = 0
local lava_spark_abm_census = 0
local lava_spark_census = 0
function mcl_core.lava_spark_set_chance()
lava_spark_chance = lava_spark_limit / lava_spark_abm_census
minetest.after(LAVA_SPARK_ABM_INTERVAL, mcl_core.lava_spark_set_chance)
lava_spark_abm_census = 0
lava_spark_census = 0
end
if lava_spark_limit > 0 then
mcl_core.lava_spark_set_chance()
minetest.register_abm({
label = "Lava produce sparks",
nodenames = {"group:lava"},
neighbors = {"air"},
interval = LAVA_SPARK_ABM_INTERVAL,
chance = 18,
action = function(pos, node)
local above = minetest.get_node(vector.new(pos.x, pos.y + 1, pos.z))
if above.name ~= "air" then return end
lava_spark_abm_census = lava_spark_abm_census + 1
if lava_spark_census >= lava_spark_limit then return end
if math.random() > lava_spark_chance then return end
lava_spark_census = lava_spark_census + 1
minetest.after(math.random() * LAVA_SPARK_ABM_INTERVAL, mcl_core.lava_spark_add, pos)
end
})
end
function mcl_core.lava_spark_add(pos)
local node = minetest.get_node(pos)
if minetest.get_node_group(node.name, "lava") == 0 then return end
local above = minetest.get_node(vector.new(pos.x, pos.y + 1, pos.z))
if above.name ~= "air" then return end
local pos_addend = vector.new(
(math.random() - 0.5) * 0.8,
(math.random() - 0.5) * 0.8,
(math.random() - 0.5) * 0.8
)
local spark_pos = vector.add(pos, pos_addend)
local spark = minetest.add_entity(spark_pos, "mcl_core:lava_spark")
if not spark then return end
local velocity = vector.new(
(math.random() - 0.5) * 3,
(math.random() + 2) * 2,
(math.random() - 0.5) * 3
)
spark:set_velocity(velocity)
spark:set_acceleration(vector.new(0, -9, 0))
-- Set a random size
local size = 0.2 + math.random() * 0.2
local props = spark:get_properties()
if not props then return end
props.visual_size = vector.new(size, size, size)
spark:set_properties(props)
local luaentity = spark:get_luaentity()
if not luaentity then return end
luaentity._life_timer = 0.4 + math.random()
end
minetest.register_entity("mcl_core:lava_spark", {
physical = true,
visual = "sprite",
collide_with_objects = true,
textures = {"mcl_core_lava_spark.png"},
glow = 10,
static_save = false,
_smoke_timer = 0.1,
_life_timer = 1,
on_step = function(self, dtime)
if not self or not self.object then return end
self._life_timer = self._life_timer - dtime
if self._life_timer <= 0 then
self.object:remove()
return
end
self._smoke_timer = self._smoke_timer - dtime
if self._smoke_timer > 0 then return end
self._smoke_timer = 0.2 + math.random() * 0.3
local pos = self.object:get_pos()
-- Add smoke
minetest.add_particlespawner({
amount = 3,
time = 0.001,
minpos = pos,
maxpos = pos,
minvel = vector.new(-0.1, 1, -0.1),
maxvel = vector.new(0.1, 1.5, 0.1),
minexptime = 0.1,
maxexptime = 0.6,
minsize = 0.5,
maxsize = 1.5,
texture = "mcl_particles_smoke_anim.png",
animation = {
type = "vertical_frames",
aspect_w = 8,
aspect_h = 8,
}
})
end
})
--
-- Papyrus and cactus growing
--

View File

@ -92,6 +92,7 @@ Diorite=Diorite
Diorite is an igneous rock.=La diorite est une roche volcanique.
Dirt=Terre
Dirt acts as a soil for a few plants. When in light, this block may grow a grass or mycelium cover if such blocks are nearby.=La terre agit comme un sol pour quelques plantes. Lorsqu'il est à la lumière, ce bloc peut faire pousser une couverture d'herbe ou de mycélium si ces blocs sont à proximité.
Enchanted Golden Apple=Pomme Dorée Enchantée
Emerald=Emeraude
Emerald Ore=Minerai d'Emeraude
Emerald ore is the ore of emeralds. It is very rare and can be found alone, not in clusters.=Le minerai d'émeraude produit des émeraudes. Il est très rare et ne peut être trouvé que seul, pas en filons.
@ -154,6 +155,8 @@ Oak Wood Planks=Planches de Chêne
Oak leaves are grown from oak trees.=Les feuilles de chêne sont cultivées à partir de chênes.
Obsidian=Obsidienne
Obsidian is an extremely hard mineral with an enourmous blast-resistance. Obsidian is formed when water meets lava.=L'obsidienne est un minéral extrêmement dur avec une énorme résistance à l'explosion. L'obsidienne se forme lorsque l'eau rencontre la lave.
Crying Obsidian=Obsidienne Pleureuse
Crying obsidian is a luminous obsidian that can generate as part of ruined portals.=L'obsidienne pleureuse est de l'obsidienne lumineuse générée comme composant des portails en ruines.
One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava.=L'un des blocs les plus courants au monde, presque tout le sous-sol est en pierre. Il contient parfois des minerais. La pierre peut être créée lorsque l'eau rencontre la lave.
Orange Stained Glass=Verre Orange
Packed Ice=Glace Compactée
@ -202,20 +205,45 @@ Stained glass is a decorative and mostly transparent block which comes in variou
Stick=Bâton
Sticks are a very versatile crafting material; used in countless crafting recipes.=Les bâtons sont un matériau d'artisanat très polyvalent; utilisé dans d'innombrables recettes d'artisanat.
Stone=Roche
Stripped Acacia Log=Bois d'Acacia
Stripped Acacia Wood=Bois Ecorché d'Acacia
Stripped Birch Log=Bois de Bouleau
Stripped Birch Wood=Bois Ecorché de Bouleau
Stripped Dark Oak Log=Bois de Chêne Noir
Stripped Dark Oak Wood=Bois Ecorché de Chêne Noir
Stripped Jungle Log=Bois d'Acajou
Stripped Jungle Wood=Bois Ecorché d'Acajou
Stripped Oak Log=Bois de Chêne
Stripped Oak Wood=Bois Ecorché de Chêne
Stripped Spruce Log=Bois de Sapin
Stripped Spruce Wood=Bois Ecorché de Sapin
Stone Bricks=Pierre Taillée
Sugar=Sucre
Sugar Canes=Canne à Sucre
Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.=Les cannes à sucre sont une plante qui a certaines utilisations dans l'artisanat. Les cannes à sucre poussent lentement jusqu'à 3 blocs lorsqu'elles sont à côté de l'eau et sont placées sur un bloc d'herbe, de terre, de sable, de sable rouge, de podzol ou de terre stérile. Lorsqu'une canne à sucre est cassée, toutes les cannes à sucre connectées au-dessus se brisent également.
Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.=Les cannes à sucre ne peuvent être placées que sur d'autres cannes à sucre et sur des blocs sur lesquels elles poussent.
Sugar comes from sugar canes and is used to make sweet foods.=Le sucre provient des cannes à sucre et est utilisé pour fabriquer des aliments sucrés.
The stripped trunk of an acacia tree.=Le tronc écorché d'un acacia.
The stripped trunk of a birch tree.=Le tronc écorché d'un bouleau.
The stripped trunk of a dark oak tree.=Le tronc écorché d'un chêne noir.
The stripped trunk of a jungle tree.=Le tronc écorché d'un acajou.
The stripped trunk of an oak tree.=Le tronc écorché d'un chêne.
The stripped trunk of a spruce tree.=Le tronc écorché d'un sapin.
The trunk of a birch tree.=Le tronc d'un bouleau.
The trunk of a dark oak tree.=Le tronc d'un chêne noir.
The trunk of a jungle tree.=Le tronc d'un acajou.
The trunk of a spruce tree.=Le tronc d'un sapin.
The trunk of an acacia.=Le tronc d'un acacia
The trunk of an oak tree.=Le tronc d'un chêne.
The stripped wood of an acacia tree.=Les planches écorchée d'un acacia.
The stripped wood of a birch tree.=Les planches écorchée d'un bouleau.
The stripped wood of a dark oak tree.=Les planches écorchée d'un chêne noir.
The stripped wood of a jungle tree.=Les planches écorchée d'un acajou.
The stripped wood of an oak tree.=Les planches écorchée d'un chêne.
The stripped wood of a spruce tree.=Les planches écorchée d'un sapin.
This block consists of a couple of loose stones and can't support itself.=Ce bloc se compose de quelques pierres lâches et ne peut pas se soutenir.
This is a decorative block surrounded by the bark of a tree trunk.=Il s'agit d'un bloc décoratif entouré par l'écorce d'un tronc d'arbre.
This is a decorative block.=Il s'agit d'un bloc décoratif.
This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.=Ceci est un bloc de neige complet. La neige de cette épaisseur se trouve généralement dans les zones de froid extrême.
This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well.=Il s'agit d'un morceau de cactus que l'on trouve couramment dans les zones sèches, en particulier dans les déserts. Au fil du temps, les cactus pousseront jusqu'à 3 blocs de haut sur le sable ou le sable rouge. Un cactus blesse les êtres vivants qui le touchent avec des dégâts de 1 HP toutes les demi-secondes. Lorsqu'un bloc de cactus est brisé, tous les blocs de cactus connectés au-dessus se brisent également.
This stone contains pure gold, a rare metal.=Cette pierre contient de l'or pur, un métal rare.
@ -256,3 +284,7 @@ Slows down movement=Ralentit le mouvement
2×2 saplings @= large tree=2×2 pousses @= grand arbre
Grows on sand or dirt next to water=Pousse sur le sable ou la terre près de l'eau
Stackable=Empilable
Moss=Mousse
Moss Carpet=Tapis de Mousse
A moss block is a natural block that can be spread to some other blocks by using bone meal.=Un bloc de mousse est un bloc naturel qui peut se propager à d'autres blocs en utilisant de la farine d'os.
Moss Carpets are a thin decorative variant of the moss block.=Les tapis de mousse sont une fine variante décorative du bloc de mousse.

View File

@ -284,3 +284,7 @@ Slows down movement=
2×2 saplings @= large tree=
Grows on sand or dirt next to water=
Stackable=
Moss=
Moss Carpet=
A moss block is a natural block that can be spread to some other blocks by using bone meal.=
Moss Carpets are a thin decorative variant of the moss block.=

View File

@ -369,7 +369,7 @@ minetest.register_node("mcl_core:dirt_with_grass", {
color = "#8EB971",
is_ground_content = true,
stack_max = 64,
groups = {handy=1,shovely=1,dirt=2,grass_block=1, grass_block_no_snow=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1},
groups = {handy=1,shovely=1,dirt=2,grass_block=1, grass_block_no_snow=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1, compostability=30},
drop = "mcl_core:dirt",
sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.1},
@ -473,7 +473,7 @@ minetest.register_node("mcl_core:moss", {
tiles = {"mcl_core_moss_block.png"},
is_ground_content = true,
stack_max = 64,
groups = {handy=1, hoey=1},
groups = {handy=1, hoey=1, compostability=65},
--sounds = TODO: add sound
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
@ -1096,7 +1096,7 @@ minetest.register_node("mcl_core:moss", {
tiles = {"mcl_core_moss_block.png"},
is_ground_content = true,
stack_max = 64,
groups = {handy=1, hoey=1},
groups = {handy=1, hoey=1, compostability=65},
--sounds = TODO: add sound
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
@ -1153,7 +1153,7 @@ minetest.register_node("mcl_core:moss_carpet", {
{-8/16, -8/16, -8/16, 8/16, -7/16, 8/16},
},
},
groups = {handy=1, hoey=1},
groups = {handy=1, hoey=1, compostability=30},
--sounds = TODO: add sound
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,

View File

@ -12,7 +12,7 @@ minetest.register_node("mcl_core:cactus", {
tiles = {"mcl_core_cactus_top.png", "mcl_core_cactus_bottom.png", "mcl_core_cactus_side.png"},
is_ground_content = true,
stack_max = 64,
groups = {handy=1, attached_node=1, plant=1, deco_block=1, dig_by_piston=1, enderman_takable=1},
groups = {handy=1, attached_node=1, plant=1, deco_block=1, dig_by_piston=1, enderman_takable=1, compostability=50},
sounds = mcl_sounds.node_sound_wood_defaults(),
paramtype = "light",
sunlight_propagates = true,
@ -79,7 +79,7 @@ minetest.register_node("mcl_core:reeds", {
},
},
stack_max = 64,
groups = {dig_immediate=3, craftitem=1, deco_block=1, plant=1, non_mycelium_plant=1, dig_by_piston=1},
groups = {dig_immediate=3, craftitem=1, deco_block=1, plant=1, non_mycelium_plant=1, dig_by_piston=1, compostability=50},
sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "",
drop = "mcl_core:reeds", -- to prevent color inheritation

View File

@ -104,7 +104,7 @@ minetest.register_node("mcl_core:vine", {
type = "wallmounted",
},
stack_max = 64,
groups = {handy=1,axey=1,shearsy=1,swordy=1, flammable=2,deco_block=1,destroy_by_lava_flow=1,dig_by_piston=1, fire_encouragement=15, fire_flammability=100},
groups = {handy=1,axey=1,shearsy=1,swordy=1, flammable=2,deco_block=1,destroy_by_lava_flow=1,dig_by_piston=1, fire_encouragement=15, fire_flammability=100, compostability=50},
sounds = mcl_sounds.node_sound_leaves_defaults(),
drop = "",
_mcl_shears_drop = true,

View File

@ -162,7 +162,8 @@ local function register_leaves(subname, description, longdesc, tiles, sapling, d
deco_block=1,
dig_by_piston=1,
fire_encouragement=30,
fire_flammability=60
fire_flammability=60,
compostability=30
},
drop = get_drops(0),
_mcl_shears_drop = true,
@ -194,7 +195,7 @@ local function register_sapling(subname, description, longdesc, tt_help, texture
fixed = selbox
},
stack_max = 64,
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1},
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1, compostability=30},
sounds = mcl_sounds.node_sound_leaves_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
@ -275,4 +276,4 @@ register_leaves("birchleaves", S("Birch Leaves"), S("Birch leaves are grown from
-- Node aliases
minetest.register_alias("default:acacia_tree", "mcl_core:acaciatree")
minetest.register_alias("default:acacia_leaves", "mcl_core:acacialeaves")
minetest.register_alias("default:acacia_leaves", "mcl_core:acacialeaves")

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -78,7 +78,7 @@ dyelocal.dyes = {
{"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}},
{"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}},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -5,7 +5,7 @@ minetest.register_craftitem("mcl_farming:beetroot_seeds", {
_tt_help = S("Grows on farmland"),
_doc_items_longdesc = S("Grows into a beetroot plant. Chickens like beetroot seeds."),
_doc_items_usagehelp = S("Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds."),
groups = { craftitem=1 },
groups = { craftitem=1, compostability=30 },
inventory_image = "mcl_farming_beetroot_seeds.png",
wield_image = "mcl_farming_beetroot_seeds.png",
on_place = function(itemstack, placer, pointed_thing)
@ -133,7 +133,7 @@ minetest.register_craftitem("mcl_farming:beetroot_item", {
wield_image = "mcl_farming_beetroot.png",
on_place = minetest.item_eat(1),
on_secondary_use = minetest.item_eat(1),
groups = { food = 2, eatable = 1 },
groups = { food = 2, eatable = 1, compostability=65 },
_mcl_saturation = 1.2,
})

View File

@ -86,7 +86,7 @@ minetest.register_craftitem("mcl_farming:carrot_item", {
_doc_items_longdesc = S("Carrots can be eaten and planted. Pigs and rabbits like carrots."),
_doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."),
inventory_image = "farming_carrot.png",
groups = { food = 2, eatable = 3 },
groups = { food = 2, eatable = 3, compostability=65 },
_mcl_saturation = 3.6,
on_secondary_use = minetest.item_eat(3),
on_place = function(itemstack, placer, pointed_thing)

View File

@ -7,7 +7,7 @@ minetest.register_craftitem("mcl_farming:melon_seeds", {
_doc_items_longdesc = S("Grows into a melon stem which in turn grows melons. Chickens like melon seeds."),
_doc_items_usagehelp = S("Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melon stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem will attempt to grow a melon at the side. Rightclick an animal to feed it melon seeds."),
stack_max = 64,
groups = { craftitem=1 },
groups = { craftitem=1, compostability=30 },
inventory_image = "mcl_farming_melon_seeds.png",
on_place = function(itemstack, placer, pointed_thing)
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:melontige_1")
@ -21,7 +21,7 @@ local melon_base_def = {
_doc_items_longdesc = S("A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices."),
stack_max = 64,
tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png"},
groups = {handy=1,axey=1, plant=1,building_block=1,enderman_takable=1,dig_by_piston=1},
groups = {handy=1,axey=1, plant=1,building_block=1,enderman_takable=1,dig_by_piston=1, compostability=65},
drop = {
max_items = 1,
items = {
@ -134,7 +134,7 @@ minetest.register_craftitem("mcl_farming:melon_item", {
inventory_image = "farming_melon.png",
on_place = minetest.item_eat(2),
on_secondary_use = minetest.item_eat(2),
groups = { food = 2, eatable = 2 },
groups = { food = 2, eatable = 2, compostability=50 },
_mcl_saturation = 1.2,
})

View File

@ -91,7 +91,7 @@ minetest.register_craftitem("mcl_farming:potato_item", {
_doc_items_longdesc = S("Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes."),
_doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."),
inventory_image = "farming_potato.png",
groups = { food = 2, eatable = 1 },
groups = { food = 2, eatable = 1, compostability=65 },
_mcl_saturation = 0.6,
stack_max = 64,
on_secondary_use = minetest.item_eat(1),
@ -112,7 +112,7 @@ minetest.register_craftitem("mcl_farming:potato_item_baked", {
inventory_image = "farming_potato_baked.png",
on_place = minetest.item_eat(5),
on_secondary_use = minetest.item_eat(5),
groups = { food = 2, eatable = 5 },
groups = { food = 2, eatable = 5, compostability = 85 },
_mcl_saturation = 6.0,
})

View File

@ -15,7 +15,7 @@ minetest.register_craftitem("mcl_farming:pumpkin_seeds", {
_doc_items_usagehelp = S("Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkin stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem attempts to grow a pumpkin next to it. Rightclick an animal to feed it pumpkin seeds."),
stack_max = 64,
inventory_image = "mcl_farming_pumpkin_seeds.png",
groups = { craftitem=1 },
groups = { craftitem=1, compostability=30 },
on_place = function(itemstack, placer, pointed_thing)
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:pumpkin_1")
end
@ -99,7 +99,7 @@ local pumpkin_base_def = {
stack_max = 64,
paramtype2 = "facedir",
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
groups = {handy=1,axey=1, plant=1,building_block=1, dig_by_piston=1, enderman_takable=1},
groups = {handy=1,axey=1, plant=1,building_block=1, dig_by_piston=1, enderman_takable=1, compostability=65},
sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 1,
@ -192,7 +192,7 @@ minetest.register_node("mcl_farming:pumpkin_face_light", {
paramtype2 = "facedir",
light_source = minetest.LIGHT_MAX,
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_light.png"},
groups = {handy=1,axey=1, building_block=1, dig_by_piston=1 },
groups = {handy=1,axey=1, building_block=1, dig_by_piston=1, compostability=65 },
sounds = mcl_sounds.node_sound_wood_defaults(),
on_construct = function(pos)
-- Attempt to spawn iron golem or snow golem
@ -230,7 +230,7 @@ minetest.register_craftitem("mcl_farming:pumpkin_pie", {
wield_image = "mcl_farming_pumpkin_pie.png",
on_place = minetest.item_eat(8),
on_secondary_use = minetest.item_eat(8),
groups = { food = 2, eatable = 8 },
groups = { food = 2, eatable = 8, compostability=100 },
_mcl_saturation = 4.8,
})

View File

@ -31,7 +31,7 @@ minetest.register_craftitem("mcl_farming:sweet_berry", {
inventory_image = "mcl_farming_sweet_berry.png",
_mcl_saturation = 0.2,
stack_max = 64,
groups = { food = 2, eatable = 1 },
groups = { food = 2, eatable = 1, compostability=30 },
on_secondary_use = minetest.item_eat(1),
on_place = function(itemstack, placer, pointed_thing)
local new = mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_sweet_berry:sweet_berry_bush_0")

View File

@ -9,7 +9,7 @@ minetest.register_craftitem("mcl_farming:wheat_seeds", {
Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant.
They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds.
]]),
groups = { craftitem=1 },
groups = { craftitem=1, compostability=30 },
inventory_image = "mcl_farming_wheat_seeds.png",
on_place = function(itemstack, placer, pointed_thing)
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:wheat_1")
@ -104,7 +104,7 @@ minetest.register_craftitem("mcl_farming:wheat_item", {
_doc_items_longdesc = S("Wheat is used in crafting. Some animals like wheat."),
_doc_items_usagehelp = S("Use the “Place” key on an animal to try to feed it wheat."),
inventory_image = "farming_wheat_harvested.png",
groups = { craftitem = 1 },
groups = { craftitem = 1, compostability=65 },
})
minetest.register_craft({
@ -125,7 +125,7 @@ minetest.register_craftitem("mcl_farming:cookie", {
description = S("Cookie"),
_doc_items_longdesc = S("This is a food item which can be eaten."),
inventory_image = "farming_cookie.png",
groups = {food=2, eatable=2},
groups = {food=2, eatable=2, compostability=85},
_mcl_saturation = 0.4,
on_place = minetest.item_eat(2),
on_secondary_use = minetest.item_eat(2),
@ -136,7 +136,7 @@ minetest.register_craftitem("mcl_farming:bread", {
description = S("Bread"),
_doc_items_longdesc = S("This is a food item which can be eaten."),
inventory_image = "farming_bread.png",
groups = {food=2, eatable=5},
groups = {food=2, eatable=5, compostability=85},
_mcl_saturation = 6.0,
on_place = minetest.item_eat(5),
on_secondary_use = minetest.item_eat(5),
@ -156,8 +156,7 @@ minetest.register_node("mcl_farming:hay_block", {
stack_max = 64,
paramtype2 = "facedir",
on_place = mcl_util.rotate_axis,
groups = {handy=1, hoey=1, flammable=2, fire_encouragement=60,
fire_flammability=20, building_block=1, fall_damage_add_percent=-80},
groups = {handy=1, hoey=1, compostability=85, flammable=2, fire_encouragement=60, fire_flammability=20, building_block=1, fall_damage_add_percent=-80},
sounds = mcl_sounds.node_sound_leaves_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 0.5,

View File

@ -80,7 +80,7 @@ function mcl_flowers.register_simple_flower(name, def)
walkable = false,
stack_max = 64,
drop = def.drop,
groups = {dig_immediate=3,flammable=2,fire_encouragement=60,fire_flammability=100,plant=1,flower=1,place_flowerlike=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1},
groups = {dig_immediate=3,flammable=2,fire_encouragement=60,fire_flammability=100,plant=1,flower=1,place_flowerlike=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1, compostability=65},
sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "",
on_place = on_place_flower,
@ -143,7 +143,7 @@ local def_tallgrass = {
walkable = false,
buildable_to = true,
is_ground_content = true,
groups = {handy=1,shearsy=1, flammable=3,fire_encouragement=60,fire_flammability=100,attached_node=1,plant=1,place_flowerlike=2,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1},
groups = {handy=1,shearsy=1, flammable=3,fire_encouragement=60,fire_flammability=100,attached_node=1,plant=1,place_flowerlike=2,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1, compostability=30},
sounds = mcl_sounds.node_sound_leaves_defaults(),
drop = wheat_seed_drop,
_mcl_shears_drop = true,
@ -163,6 +163,7 @@ def_fern._doc_items_longdesc = S("Ferns are small plants which occur naturally i
def_fern.tiles = { "mcl_flowers_fern.png" }
def_fern.inventory_image = "mcl_flowers_fern_inv.png"
def_fern.wield_image = "mcl_flowers_fern_inv.png"
def_fern.groups.compostability=65
def_fern.selection_box = {
type = "fixed",
fixed = { -6/16, -0.5, -6/16, 6/16, 5/16, 6/16 },
@ -205,6 +206,13 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
bottom_groups.not_in_creative_inventory = 1
create_entry = false
end
-- some special cases for the composter group
if name == "double_fern" or "peony" or "rose_bush" or "lilac" or "sunflower" then
bottom_groups.compostability = 65
end
if name == "double_grass" then
bottom_groups.compostability = 50
end
-- Drop itself by default
local drop_bottom, drop_top
if not drop then
@ -410,7 +418,7 @@ minetest.register_node("mcl_flowers:waterlily", {
liquids_pointable = true,
walkable = true,
sunlight_propagates = true,
groups = {dig_immediate = 3, plant=1, dig_by_water = 1,destroy_by_lava_flow=1, dig_by_piston = 1, deco_block=1, dig_by_boat=1},
groups = {dig_immediate = 3, plant=1, dig_by_water = 1,destroy_by_lava_flow=1, dig_by_piston = 1, deco_block=1, dig_by_boat=1, compostability=65},
sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "",
node_box = {

View File

@ -7,3 +7,7 @@ Burning Furnace=Four Allumé
Recipe book=Livre de Recette
Inventory=Inventaire
Uses fuel to smelt or cook items=Utilise du carburant pour fondre ou cuire des articles
Blast Furnace=Haut Fourneau
Blast Furnaces cook or smelt several items, using a furnace fuel, into something else, but faster than a normal furnace.=Un haut fourneau peut cuire ou fondre plusieurs objets, en quelque chose d'autre, en utilisant du carburant, plus vite qu'un four normal.
Smoker=Fumoir
Smokers cook or smelt several items, using a furnace fuel, into something else, but faster than a normal furnace.=Le Fumoir peut cuire ou fondre plusieurs objets, en quelque chose d'autre, en utilisant du carburant, plus vite qu'un four normal.

View File

@ -7,3 +7,7 @@ Burning Furnace=
Recipe book=
Inventory=
Uses fuel to smelt or cook items=
Blast Furnace=
Blast Furnaces cook or smelt several items, using a furnace fuel, into something else, but faster than a normal furnace.=
Smoker=
Smokers cook or smelt several items, using a furnace fuel, into something else, but faster than a normal furnace.=

View File

@ -1,5 +1,5 @@
local S = minetest.get_translator("mcl_lanterns")
local modpath = minetest.get_modpath("mcl_lanterns")
local S = minetest.get_translator(minetest.get_current_modname())
local modpath = minetest.get_modpath(minetest.get_current_modname())
mcl_lanterns = {}

View File

@ -0,0 +1,6 @@
# textdomain: mcl_lanterns
Chain=Chaine
Chains are metallic decoration blocks.=Les chaines sont des blocs de décoration métalliques.
Lantern=Lanterne
Lanterns are light sources which can be placed on the top or the bottom of most blocks.=Les lanternes sont des sources de lumières qui peuvent être placées au sommet ou en-dessous de la plupart des blocs.
Soul Lantern=Lanterne des âmes

View File

@ -0,0 +1,6 @@
# textdomain: mcl_lanterns
Chain=
Chains are metallic decoration blocks.=
Lantern=
Lanterns are light sources which can be placed on the top or the bottom of most blocks.=
Soul Lantern=

View File

@ -1,4 +1,4 @@
local S = minetest.get_translator("mcl_lanterns")
local S = minetest.get_translator(minetest.get_current_modname())
mcl_lanterns.register_lantern("lantern", {
description = S("Lantern"),

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
local vector = vector
local template = {
groups = {handy=1,axey=1, building_block = 1, material_wood = 1, flammable = -1 },
groups = {handy=1,axey=1, building_block = 1, material_wood = 1, flammable = -1, compostability=85 },
sounds = mcl_sounds.node_sound_wood_defaults(),
is_ground_content = true,
_mcl_blast_resistance = 0.2,
@ -51,6 +51,7 @@ local function register_mushroom(color, species_id, template, d_cap, d_stem, d_s
stem_full.tiles = { "mcl_mushrooms_mushroom_block_skin_stem.png" }
stem_full.groups.huge_mushroom = species_id
stem_full.groups.huge_mushroom_stem = 2
stem_full.groups.compostability=65
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem_full", stem_full)
-- Stem
@ -60,6 +61,7 @@ local function register_mushroom(color, species_id, template, d_cap, d_stem, d_s
stem.tiles = { "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_stem.png" }
stem.groups.huge_mushroom = species_id
stem.groups.huge_mushroom_stem = 1
stem.groups.compostability=65
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem", stem)
-- Mushroom block (cap)

View File

@ -38,7 +38,7 @@ minetest.register_node("mcl_mushrooms:mushroom_brown", {
sunlight_propagates = true,
paramtype = "light",
walkable = false,
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1},
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1, compostability=65},
sounds = mcl_sounds.node_sound_leaves_defaults(),
light_source = 1,
selection_box = {
@ -62,7 +62,7 @@ minetest.register_node("mcl_mushrooms:mushroom_red", {
sunlight_propagates = true,
paramtype = "light",
walkable = false,
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1},
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1, compostability=65},
sounds = mcl_sounds.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",

View File

@ -0,0 +1,3 @@
Mod mcl_nether : basic nether blocs, forked from Mineclone 2
Texture of mcl_nether_netheritebloc.png from PixelPerfection Legacy by XSSheep edited by Nova_Wostra (CC-BY-SA 4.0)

View File

@ -77,8 +77,7 @@ minetest.register_node("mcl_nether:netheriteblock", {
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 1200,
_mcl_hardness = 50,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
_mcl_silk_touch_drop = true
})
-- For eternal fire on top of netherrack and magma blocks
@ -202,7 +201,7 @@ minetest.register_node("mcl_nether:nether_wart_block", {
stack_max = 64,
tiles = {"mcl_nether_nether_wart_block.png"},
is_ground_content = false,
groups = {handy=1, hoey=1, building_block=1},
groups = {handy=1, hoey=1, building_block=1, compostability=85},
sounds = mcl_sounds.node_sound_leaves_defaults(
{
footstep={name="default_dirt_footstep", gain=0.7},

View File

@ -150,7 +150,7 @@ minetest.register_craftitem("mcl_nether:nether_wart_item", {
end
end
end,
groups = { craftitem = 1, brewitem=1 },
groups = { craftitem = 1, brewitem=1, compostability=30 },
})
local names = {"mcl_nether:nether_wart_0", "mcl_nether:nether_wart_1", "mcl_nether:nether_wart_2"}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 425 B

After

Width:  |  Height:  |  Size: 201 B

View File

@ -741,7 +741,7 @@ minetest.register_craftitem("mcl_ocean:kelp", {
inventory_image = "mcl_ocean_kelp_item.png",
wield_image = "mcl_ocean_kelp_item.png",
on_place = kelp.kelp_on_place,
groups = { deco_block = 1 },
groups = { deco_block = 1, compostability=30 },
})
if mod_doc then
@ -756,7 +756,7 @@ minetest.register_craftitem("mcl_ocean:dried_kelp", {
_doc_items_longdesc = S("Dried kelp is a food item."),
inventory_image = "mcl_ocean_dried_kelp.png",
wield_image = "mcl_ocean_dried_kelp.png",
groups = { food = 2, eatable = 1 },
groups = { food = 2, eatable = 1, compostability=30 },
on_place = minetest.item_eat(1),
on_secondary_use = minetest.item_eat(1),
_mcl_saturation = 0.6,
@ -773,7 +773,7 @@ minetest.register_node("mcl_ocean:dried_kelp_block", {
description = S("Dried Kelp Block"),
_doc_items_longdesc = S("A decorative block that serves as a great furnace fuel."),
tiles = { "mcl_ocean_dried_kelp_top.png", "mcl_ocean_dried_kelp_bottom.png", "mcl_ocean_dried_kelp_side.png" },
groups = { handy = 1, hoey = 1, building_block = 1, flammable = 2, fire_encouragement = 30, fire_flammability = 60 },
groups = { handy = 1, hoey = 1, building_block = 1, flammable = 2, fire_encouragement = 30, fire_flammability = 60, compostability=50 },
sounds = mcl_sounds.node_sound_leaves_defaults(),
paramtype2 = "facedir",
on_place = mcl_util.rotate_axis,

View File

@ -106,7 +106,7 @@ for s=1,4 do
},
inventory_image = img,
wield_image = img,
groups = { dig_immediate = 3, deco_block = 1, sea_pickle=1, not_in_creative_inventory=nici },
groups = { dig_immediate = 3, deco_block = 1, sea_pickle=1, not_in_creative_inventory=nici, compostability=65 },
-- Light level: 6 at size 1, +3 for each additional stage
light_source = math.min(6 + (s-1)*3, minetest.LIGHT_MAX),
selection_box = {

View File

@ -85,7 +85,7 @@ minetest.register_craftitem("mcl_ocean:seagrass", {
inventory_image = "mcl_ocean_seagrass.png^[verticalframe:12:0",
wield_image = "mcl_ocean_seagrass.png^[verticalframe:12:0",
on_place = seagrass_on_place,
groups = { deco_block = 1 },
groups = { deco_block = 1, compostability=30 },
})
-- Seagrass nodes: seagrass on a surface node

View File

@ -235,6 +235,7 @@ function mcl_portals.end_portal_teleport(pos, node)
end
mcl_portals.end_teleport(obj, objpos)
awards.unlock(obj:get_player_name(), "mcl:enterEndPortal")
end
end

View File

@ -75,6 +75,7 @@ local function spawnstruct_function(name, param)
local pos = player:get_pos()
if not pos then return end
pos.y = math.floor(pos.y) + 1
local pr = PseudoRandom(math.floor(pos.x * 333 + pos.y * 19 - pos.z + 4))
pos = vector.round(pos)
local dir = minetest.yaw_to_dir(player:get_look_horizontal())

View File

@ -0,0 +1,3 @@
# textdomain: mcl_villages
Chiseled Stone Village Bricks=Pierre sculptée du village
Map chunk @1 to @2 is not suitable for placing villages.=La partie de la carte de @1 à @2 n'est pas propice au placement d'un village.

View File

@ -21,6 +21,10 @@ Ban list: @1=Liste d'interdiction: @1
Show who is logged on=Afficher qui est connecté
Displays the world seed=Affiche la graine du monde
Only peaceful mobs allowed!=Seuls les mobs pacifiques sont autorisés!
@1[<name>]=@1[<name>]
@1[<name>]=@1[<nom>]
Set game mode for player or yourself=Choisir le mode de jeu pour vous ou pour les joueurs
Error: No game mode specified.=Erreur : mode de jeu non spécifié.
<sound> <target>=<son> <cible>
Play a sound. Arguments: <sound>: name of the sound. <target>: Target.=Jouer un son. Arguments: <son>: nom d'un son. <cible>: Cible.
Sound name is invalid!=Le nom du son est invalide !
Target is invalid!!=La cible est invalide !

View File

@ -1,56 +1,57 @@
local random = math.random
local ipairs = ipairs
mcl_death_drop = {}
mcl_death_drop.registered_dropped_lists = {}
function mcl_death_drop.register_dropped_list(inv, listname, drop)
table.insert(mcl_death_drop.registered_dropped_lists, {inv = inv, listname = listname, drop = drop})
end
mcl_death_drop.register_dropped_list("PLAYER", "main", true)
mcl_death_drop.register_dropped_list("PLAYER", "craft", true)
mcl_death_drop.register_dropped_list("PLAYER", "armor", true)
minetest.register_on_dieplayer(function(player)
local keep = minetest.settings:get_bool("mcl_keepInventory", false)
if keep == false then
-- Drop inventory, crafting grid and armor
local playerinv = player:get_inventory()
local pos = player:get_pos()
-- No item drop if in deep void
local _, void_deadly = mcl_worlds.is_in_void(pos)
for l=1,#mcl_death_drop.registered_dropped_lists do
local inv = mcl_death_drop.registered_dropped_lists[l].inv
if inv == "PLAYER" then
inv = playerinv
elseif type(inv) == "function" then
inv = inv(player)
end
local listname = mcl_death_drop.registered_dropped_lists[l].listname
local drop = mcl_death_drop.registered_dropped_lists[l].drop
if inv then
for i, stack in ipairs(inv:get_list(listname)) do
local x = random(0, 9)/3
local z = random(0, 9)/3
pos.x = pos.x + x
pos.z = pos.z + z
if not void_deadly and drop and not mcl_enchanting.has_enchantment(stack, "curse_of_vanishing") then
local def = minetest.registered_items[stack:get_name()]
if def and def.on_drop then
stack = def.on_drop(stack, player, pos)
end
minetest.add_item(pos, stack)
end
pos.x = pos.x - x
pos.z = pos.z - z
end
inv:set_list(listname, {})
end
end
mcl_armor.update(player)
end
end)
local random = math.random
local ipairs = ipairs
mcl_death_drop = {}
mcl_death_drop.registered_dropped_lists = {}
function mcl_death_drop.register_dropped_list(inv, listname, drop)
table.insert(mcl_death_drop.registered_dropped_lists, {inv = inv, listname = listname, drop = drop})
end
mcl_death_drop.register_dropped_list("PLAYER", "main", true)
mcl_death_drop.register_dropped_list("PLAYER", "craft", true)
mcl_death_drop.register_dropped_list("PLAYER", "armor", true)
mcl_death_drop.register_dropped_list("PLAYER", "offhand", true)
minetest.register_on_dieplayer(function(player)
local keep = minetest.settings:get_bool("mcl_keepInventory", false)
if keep == false then
-- Drop inventory, crafting grid and armor
local playerinv = player:get_inventory()
local pos = player:get_pos()
-- No item drop if in deep void
local _, void_deadly = mcl_worlds.is_in_void(pos)
for l=1,#mcl_death_drop.registered_dropped_lists do
local inv = mcl_death_drop.registered_dropped_lists[l].inv
if inv == "PLAYER" then
inv = playerinv
elseif type(inv) == "function" then
inv = inv(player)
end
local listname = mcl_death_drop.registered_dropped_lists[l].listname
local drop = mcl_death_drop.registered_dropped_lists[l].drop
if inv then
for i, stack in ipairs(inv:get_list(listname)) do
local x = random(0, 9)/3
local z = random(0, 9)/3
pos.x = pos.x + x
pos.z = pos.z + z
if not void_deadly and drop and not mcl_enchanting.has_enchantment(stack, "curse_of_vanishing") then
local def = minetest.registered_items[stack:get_name()]
if def and def.on_drop then
stack = def.on_drop(stack, player, pos)
end
minetest.add_item(pos, stack)
end
pos.x = pos.x - x
pos.z = pos.z - z
end
inv:set_list(listname, {})
end
end
mcl_armor.update(player)
end
end)

View File

@ -109,10 +109,6 @@ function mcl_player.player_set_armor(player, texture, preview)
set_preview(player, "armor", preview)
end
function mcl_player.player_set_wielditem(player, texture)
set_texture(player, 3, texture)
end
function mcl_player.player_get_preview(player)
local preview = player:get_meta():get_string("mcl_player:skin_preview")
if preview == "" then

View File

@ -324,15 +324,17 @@ minetest.register_globalstep(function(dtime)
end
if wielded_def and wielded_def._mcl_toollike_wield then
set_bone_position_conditional(player,"Wield_Item", vector.new(0,3.9,1.3), vector.new(90,0,0))
set_bone_position_conditional(player,"Wield_Item", vector.new(0,4.7,3.1), vector.new(90,-45,90))
elseif string.find(wielded:get_name(), "mcl_bows:bow") then
set_bone_position_conditional(player,"Wield_Item", vector.new(.5,4.5,-1.6), vector.new(90,0,20))
set_bone_position_conditional(player,"Wield_Item", vector.new(1,4,0), vector.new(90,130,115))
elseif string.find(wielded:get_name(), "mcl_bows:crossbow_loaded") then
set_bone_position_conditional(player,"Wield_Item", vector.new(-1.5,5.7,1.8), vector.new(64,90,0))
set_bone_position_conditional(player,"Wield_Item", vector.new(0,5.2,1.2), vector.new(0,180,73))
elseif string.find(wielded:get_name(), "mcl_bows:crossbow") then
set_bone_position_conditional(player,"Wield_Item", vector.new(-1.5,5.7,1.8), vector.new(90,90,0))
set_bone_position_conditional(player,"Wield_Item", vector.new(0,5.2,1.2), vector.new(0,180,45))
elseif wielded_def.inventory_image == "" then
set_bone_position_conditional(player,"Wield_Item", vector.new(0,6,2), vector.new(180,-45,0))
else
set_bone_position_conditional(player,"Wield_Item", vector.new(-1.5,4.9,1.8), vector.new(135,0,90))
set_bone_position_conditional(player,"Wield_Item", vector.new(0,5.3,2), vector.new(90,0,0))
end
-- controls right and left arms pitch when shooting a bow or blocking

View File

@ -452,10 +452,60 @@ function mcl_spawn.get_player_spawn_pos(player)
if bgroup ~= 1 and bgroup ~= 2 then
-- Bed is destroyed:
if player and player:is_player() then
player:get_meta():set_string("mcl_beds:spawn", "")
local function split(s, delimiter) --this is just a common function to split strings, since it is way harder to do in lua like in python, java etc.
result = {};
for match in (s..delimiter):gmatch("(.-)"..delimiter) do
table.insert(result, match);
end
return result;
end
s = split(player:get_meta():get_string("mcl_beds:spawn"), ",")
x = nil
y = nil
z = nil
for key, value in pairs(s) do
if key == 1 then
value = value:sub(2)
x = tonumber(value)
else
if key == 2 then
y = tonumber(value)
else
if key == 3 then
value = value:sub(1, -2)
z = tonumber(value)
end
end
end
end
checkblock = {x = x, y = y, z = z}
if minetest.get_node(checkblock).name == "mcl_beds:respawn_anchor_charged_1" then
minetest.set_node(checkblock, {name="mcl_beds:respawn_anchor"})
player:set_pos(checkblock)
else
if minetest.get_node(checkblock).name == "mcl_beds:respawn_anchor_charged_2" then
minetest.set_node(checkblock, {name="mcl_beds:respawn_anchor_charged_1"})
player:set_pos(checkblock)
else
if minetest.get_node(checkblock).name == "mcl_beds:respawn_anchor_charged_3" then
minetest.set_node(checkblock, {name="mcl_beds:respawn_anchor_charged_2"})
player:set_pos(checkblock)
else
if minetest.get_node(checkblock).name == "mcl_beds:respawn_anchor_charged_4" then
minetest.set_node(checkblock, {name="mcl_beds:respawn_anchor_charged_3"})
player:set_pos(checkblock)
else
player:get_meta():set_string("mcl_beds:spawn", "")
minetest.chat_send_player(player:get_player_name(), S("Your spawn bed was missing or blocked, and you had no charged respawn anchor"))
return mcl_spawn.get_world_spawn_pos(), false
end
end
end
end
end
minetest.chat_send_player(player:get_player_name(), S("Your spawn bed was missing or blocked."))
return mcl_spawn.get_world_spawn_pos(), false
end
-- Find spawning position on/near the bed free of solid or damaging blocks iterating a square spiral 15x15:
@ -531,4 +581,4 @@ minetest.after(respawn_search_initial_delay, function()
storage:set_int("mcl_spawn_dir_step", dir_step)
storage:set_int("mcl_spawn_dir_ind", dir_ind)
end)
end)
end)

Some files were not shown because too many files have changed in this diff Show More