1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 14:16:06 +02:00

Update Farming, Mobs, 3d_armor

Farming : minors fixe, add the straw block
Mobs : better api, swimming parameter for mobs, add eggs, code
optimisation
3d_armor : change the model, many new textures, new shield, and new
enchanted shield (which gain compared to normal shield +1 armor and x2
durability)
This commit is contained in:
Ombridride
2015-02-25 01:57:21 +01:00
parent 12e83d24a8
commit 5d4f93aece
280 changed files with 643 additions and 10160 deletions

View File

@ -1,28 +1,41 @@
Minetest Farming Redo Mod
Farming Redo Mod
by TenPlus1
based on
https://forum.minetest.net/viewtopic.php?id=9019
Minetest 0.4 mod: farming
=========================
Farming Redo is a simplified version of the built-in farming mod in minetest and comes with wheat, cotton, carrot, cucumber, potato and tomato to start out with which spawn throughout the map... new foods need only be planted on tilled soil so no seeds are required, original wheat and cotton will require seeds which are found inside normal and jungle grass...
License of source code:
-----------------------
Copyright (C) 2012-2013 PilzAdam
This mod works by adding your new plant to the {growing=1} group and numbering the stages from _1 to as many stages as you like, but the underscore MUST be used only once in the node name to separate plant from stage number e.g.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
"farming:cotton_1" through to "farming:cotton_8"
"farming:wheat_1" through to "farming:wheat_8"
"farming:cucumber_4" through to "farming:cucumber_4"
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Changelog:
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
1.11 - Added Straw Bale, streamlined growing abm a little, fixed melon rotation bug with screwdriver
1.10 - Added Blueberry Bush and Blueberry Muffins, also Pumpkin/Melon easier to pick up, added check for unloaded map
1.09 - Corn now uses single nodes instead of 1 ontop of the other, Ethanol recipe is more expensive (requires 5 corn) and some code cleanup.
1.08 - Added Farming Plus compatibility, plus can be removed and no more missing nodes
1.07 - Added Rhubarb and Rhubarb Pie
1.06 - register_hoe and register_plant added for compatibility with default farming mod, although any plants registered will use farming redo to grow
1.05 - Added Raspberry Bushels and Raspberry Smoothie
1.04 - Added Donuts... normal, chocolate and apple... and a few code cleanups and now compatible with jungletree's from MoreTrees mod
1.03 - Bug fixes and more compatibility as drop-in replacement for built-in farming mod
1.02 - Added farming.mod string to help other mods identify which farming mod is running, if it returns "redo" then you're using this one, "" empty is built-in mod
1.01 - Crafting coffee or ethanol returns empty bucket/bottle, also Cocoa spawns a little rarer
1.0 - Added Cocoa which randomly grows on jungle tree's, pods give cocoa beans which can be used to farm more pods on a jungle trunk or make Cookies which have been added (or other treats)
0.9 - Added Pumpkin, Jack 'O Lantern, Pumpkin Slice and Sugar
(a huge thanks to painterly.net for allowing me to use their textures)
0.8 - Added Watermelon and Melon Slice
0.7 - Added Coffee, Coffee Beans, Drinking Cup, Cold and Hot Cup of Coffee
0.6 - Added Corn, Corn on the Cob... Also reworked Abm
0.5 - Added Carrot, Cucumber, Potato (and Baked Potato), Tomato
0.4 - Checks for Protection, also performance changes
0.3 - Added Diamond and Mese hoe
0.2 - Fixed check for wet soil
0.1 - Fixed growing bug
0.0 - Initial release
License of media (textures):
----------------------------

View File

@ -148,7 +148,7 @@ minetest.register_abm({
else return
end
if minetest.get_node(pos).name == "air" and minetest.get_node_light(pos) > 11 then
if minetest.get_node(pos).name == "air" and minetest.get_node_light(pos) > 12 then
-- print ("COCOA", pos.x, pos.y, pos.z)
minetest.set_node(pos,{name="farming:cocoa_"..tostring(math.random(1,3))})
end

View File

@ -44,7 +44,7 @@ minetest.register_craft( {
minetest.register_craft({
type = "fuel",
recipe = "farming:bottle_ethanol",
burntime = 60,
burntime = 240,
replacements = {{ "farming:bottle_ethanol", "vessels:glass_bottle"}}
})

View File

@ -1,5 +1,5 @@
--[[
Minetest Farming Redo Mod 1.10 (4th November 2014)
Minetest Farming Redo Mod 1.11 (20th Jan 2015)
by TenPlus1
]]
@ -72,24 +72,24 @@ end
minetest.register_abm({
nodenames = {"group:growing"},
neighbors = {"farming:soil_wet", "default:jungletree"},
interval = 60,
interval = 80,
chance = 2,
action = function(pos, node)
-- get node type (e.g. farming:wheat_1)
local data = nil
data = string.split(node.name, '_', 2)
local plant = data[1].."_"
local numb = data[2]
local plant = node.name:split("_")[1].."_"
local numb = node.name:split("_")[2]
-- check if fully grown
if not minetest.registered_nodes[plant..(numb + 1)] then return end
-- Check for Cocoa Pod
if plant == "farming:cocoa_" and minetest.find_node_near(pos, 1, {"default:jungletree"}) then
if plant == "farming:cocoa_"
and minetest.find_node_near(pos, 1, {"default:jungletree", "moretrees:jungletree_leaves_green"}) then
if minetest.get_node_light(pos) < 13 then return end
else
-- check if on wet soil

View File

@ -125,7 +125,7 @@ minetest.register_node("farming:melon_7", {
-- Last stage of Melon growth doesnnot have growing=1 so abm never has to check these
minetest.register_node("farming:melon_8", {
drawtype = "nodebox",
--drawtype = "nodebox",
description = "Melon",
tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png"},
paramtype = "light",
@ -136,6 +136,6 @@ minetest.register_node("farming:melon_8", {
{items = {'farming:melon_slice 9'},rarity=1},
}
},
groups = {snappy=3,flammable=2,plant=1},
groups = {snappy=1,oddly_breakable_by_hand=1,flammable=2,plant=1},
sounds = default.node_sound_wood_defaults(),
})

View File

@ -4,7 +4,7 @@
minetest.register_node("farming:pumpkin", {
description = "Pumpkin",
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
groups = {snappy=3,flammable=2,plant=1},
groups = {choppy=1,oddly_breakable_by_hand=1,flammable=2,plant=1},
drop = {
items = {
{items = {'farming:pumpkin_slice 9'},rarity=1},
@ -43,7 +43,7 @@ minetest.register_node("farming:jackolantern", {
description = "Jack 'O Lantern",
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_off.png"},
paramtype2 = "facedir",
groups = {snappy=3,flammable=2},
groups = {choppy=1,oddly_breakable_by_hand=1,flammable=2},
sounds = default.node_sound_wood_defaults(),
on_punch = function(pos, node, puncher)
node.name = "farming:jackolantern_on"
@ -56,7 +56,7 @@ minetest.register_node("farming:jackolantern_on", {
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_on.png"},
light_source = 14,
paramtype2 = "facedir",
groups = {snappy=3,flammable=2},
groups = {choppy=1,oddly_breakable_by_hand=1,flammable=2},
sounds = default.node_sound_wood_defaults(),
drop = "farming:jackolantern",
on_punch = function(pos, node, puncher)

View File

@ -5,7 +5,7 @@
minetest.register_node("farming:soil", {
description = "Soil",
tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"},
tiles = {"farming_soil.png", "default_dirt.png"},
drop = "default:dirt",
is_ground_content = true,
groups = {crumbly=3, not_in_creative_inventory=1, soil=2},
@ -17,7 +17,7 @@ minetest.register_alias("farming:desert_sand_soil", "farming:soil")
minetest.register_node("farming:soil_wet", {
description = "Wet Soil",
tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"},
tiles = {"farming_soil_wet.png", "farming_soil_wet_side.png"},
drop = "default:dirt",
is_ground_content = true,
groups = {crumbly=3, not_in_creative_inventory=1, soil=3},
@ -44,20 +44,20 @@ minetest.register_abm({
minetest.set_node(pos, {name="default:dirt"})
end
-- if map around soil not loaded then skip until loaded
if minetest.find_node_near(pos, 3, {"ignore"}) then
return
end
-- check if there is water nearby and change soil accordingly
if minetest.find_node_near(pos, 3, {"group:water"}) then
if node.name == "farming:soil" then
minetest.set_node(pos, {name="farming:soil_wet"})
end
else
-- Don't turn wet soil into dry soil or dry soil into dirt
-- if there are unloaded blocks nearby because they could be water.
if minetest.find_node_near(pos, 3, {"ignore"}) then return end
if node.name == "farming:soil_wet" then
minetest.set_node(pos, {name="farming:soil"})
else -- [obviously] node.name == "farming:soil"
minetest.set_node(pos, {name="default:dirt"})
end
elseif node.name == "farming:soil_wet" then
minetest.set_node(pos, {name="farming:soil"})
elseif node.name == "farming:soil" then
minetest.set_node(pos, {name="default:dirt"})
end
end,
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 835 B

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 831 B

After

Width:  |  Height:  |  Size: 659 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 B

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

View File

@ -35,6 +35,32 @@ minetest.register_craftitem("farming:wheat", {
inventory_image = "farming_wheat.png",
})
-- Straw
minetest.register_node("farming:straw", {
description = "Straw",
tiles = {"farming_straw.png"},
is_ground_content = false,
groups = {snappy=3, flammable=4},
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_craft({
output = "farming:straw 3",
recipe = {
{"farming:wheat", "farming:wheat", "farming:wheat"},
{"farming:wheat", "farming:wheat", "farming:wheat"},
{"farming:wheat", "farming:wheat", "farming:wheat"},
}
})
minetest.register_craft({
output = "farming:wheat 3",
recipe = {
{"farming:straw"},
}
})
-- flour
minetest.register_craftitem("farming:flour", {