Eliminate crumbly, cracky, snappy and choppy fully
This commit is contained in:
parent
4ec6f5a3ec
commit
6b3db0ae72
7 changed files with 37 additions and 23 deletions
mods
CORE/walkover
ENTITIES
ITEMS/mcl_tools
|
@ -11,11 +11,9 @@ Example Usage
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
minetest.register_node("somemod:someblock", {
|
minetest.register_node("somemod:someblock", {
|
||||||
description = key,
|
description = "Talking Block",
|
||||||
tiles = {"somemod_someblock.png"},
|
tiles = {"somemod_someblock.png"},
|
||||||
groups = {cracky=1},
|
|
||||||
on_walk_over = function(pos, node, player)
|
on_walk_over = function(pos, node, player)
|
||||||
|
|
||||||
minetest.chat_send_player(player, "Hey! Watch it!")
|
minetest.chat_send_player(player, "Hey! Watch it!")
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
|
@ -84,7 +84,7 @@ minetest.register_entity("drippingwater:drop_lava", {
|
||||||
--Create drop
|
--Create drop
|
||||||
|
|
||||||
minetest.register_abm(
|
minetest.register_abm(
|
||||||
{nodenames = {"group:crumbly", "group:cracky"},
|
{nodenames = {"group:solid"},
|
||||||
neighbors = {"group:water"},
|
neighbors = {"group:water"},
|
||||||
interval = 2,
|
interval = 2,
|
||||||
chance = 22,
|
chance = 22,
|
||||||
|
@ -100,7 +100,7 @@ minetest.register_abm(
|
||||||
--Create lava drop
|
--Create lava drop
|
||||||
|
|
||||||
minetest.register_abm(
|
minetest.register_abm(
|
||||||
{nodenames = {"group:crumbly", "group:cracky"},
|
{nodenames = {"group:solid"},
|
||||||
neighbors = {"group:lava"},
|
neighbors = {"group:lava"},
|
||||||
interval = 2,
|
interval = 2,
|
||||||
chance = 22,
|
chance = 22,
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
Dripping Water Mod
|
Dripping Water Mod
|
||||||
by kddekadenz
|
by kddekadenz
|
||||||
|
|
||||||
|
modified for MineClone 2 by Wuzzy
|
||||||
|
|
||||||
|
|
||||||
Installing instructions:
|
Installing instructions:
|
||||||
|
|
||||||
|
@ -11,8 +13,7 @@ Installing instructions:
|
||||||
|
|
||||||
Manual:
|
Manual:
|
||||||
|
|
||||||
-> drops are generated rarely under crumbly nodes (dirt,grass,sandstone)
|
-> drops are generated rarely under solid nodes
|
||||||
-> waterdrops are generated under cloudstone massively
|
|
||||||
-> they will stay some time at the generated block and than they fall down
|
-> they will stay some time at the generated block and than they fall down
|
||||||
-> when they collide with the ground, a sound is played and they are destroyed
|
-> when they collide with the ground, a sound is played and they are destroyed
|
||||||
|
|
||||||
|
|
|
@ -13,12 +13,7 @@
|
||||||
--Tweaked by: maikerumine
|
--Tweaked by: maikerumine
|
||||||
local function is_ground(pos)
|
local function is_ground(pos)
|
||||||
local nn = minetest.get_node(pos).name
|
local nn = minetest.get_node(pos).name
|
||||||
return minetest.get_item_group(nn, "crumbly") ~= 0 or
|
return minetest.get_item_group(nn, "solid") ~= 0
|
||||||
minetest.get_item_group(nn, "choppy") ~= 0 or
|
|
||||||
minetest.get_item_group(nn, "cracky") ~= 0 or
|
|
||||||
minetest.get_item_group(nn, "snappy") ~= 0 or
|
|
||||||
minetest.get_item_group(nn, "unbreakable") ~= 0 or
|
|
||||||
minetest.get_item_group(nn, "immortal") ~= 0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function get_sign(i)
|
local function get_sign(i)
|
||||||
|
|
|
@ -136,7 +136,7 @@ mobs:register_mob("mobs_mc:skeleton2", {
|
||||||
dogshoot_switch = 1,
|
dogshoot_switch = 1,
|
||||||
dogshoot_count_max =6,
|
dogshoot_count_max =6,
|
||||||
})
|
})
|
||||||
mobs:register_spawn("mobs_mc:skeleton2", {"group:crumbly", "group:cracky", "group:choppy", "group:snappy"}, 7, -1, 5000, 4, -3000)
|
mobs:register_spawn("mobs_mc:skeleton2", {"group:solid"}, 7, -1, 5000, 4, -3000)
|
||||||
|
|
||||||
|
|
||||||
local arrows = {
|
local arrows = {
|
||||||
|
|
|
@ -58,7 +58,7 @@ mobs:register_mob("mobs_mc:spider", {
|
||||||
punch_start = 50, punch_end = 90,
|
punch_start = 50, punch_end = 90,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
mobs:register_spawn("mobs_mc:spider", {"mcl_core:stone" ,"mcl_core:gravel","mcl_core:cobble","group:crumbly", "group:cracky", "group:choppy", "group:snappy"}, 4, -1, 17000, 2, 3000)
|
mobs:register_spawn("mobs_mc:spider", {"group:solid"}, 4, -1, 17000, 2, 3000)
|
||||||
|
|
||||||
|
|
||||||
-- compatibility
|
-- compatibility
|
||||||
|
|
|
@ -117,16 +117,36 @@ minetest.register_tool("mcl_tools:pick_diamond", {
|
||||||
sound = { breaks = "default_tool_breaks" },
|
sound = { breaks = "default_tool_breaks" },
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local get_shovel_dig_group = function(itemstring)
|
||||||
|
local def = minetest.registered_items[itemstring]
|
||||||
|
if itemstring == "mcl_core:shovel_wood" then
|
||||||
|
return "shovely_dig_wood"
|
||||||
|
elseif itemstring == "mcl_core:shovel_stone" then
|
||||||
|
return "shovely_dig_stone"
|
||||||
|
elseif itemstring == "mcl_core:shovel_iron" then
|
||||||
|
return "shovely_dig_iron"
|
||||||
|
elseif itemstring == "mcl_core:shovel_gold" then
|
||||||
|
return "shovely_dig_gold"
|
||||||
|
elseif itemstring == "mcl_core:shovel_diamond" then
|
||||||
|
return "shovely_dig_diamond"
|
||||||
|
else
|
||||||
|
-- Fallback
|
||||||
|
return "shovely_dig_wood"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local make_grass_path = function(itemstack, placer, pointed_thing)
|
local make_grass_path = function(itemstack, placer, pointed_thing)
|
||||||
if minetest.get_node(pointed_thing.under).name == "mcl_tools:dirt_with_grass" and pointed_thing.above.y == pointed_thing.under.y then
|
if minetest.get_node(pointed_thing.under).name == "mcl_tools:dirt_with_grass" and pointed_thing.above.y == pointed_thing.under.y then
|
||||||
local above = table.copy(pointed_thing.under)
|
local above = table.copy(pointed_thing.under)
|
||||||
above.y = above.y + 1
|
above.y = above.y + 1
|
||||||
if minetest.get_node(above).name == "air" then
|
if minetest.get_node(above).name == "air" then
|
||||||
if not minetest.setting_getbool("creative_mode") then
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
-- Add wear, as if digging a level 0 crumbly node
|
-- Add wear, as if digging a level 0 shovely node
|
||||||
local def = minetest.registered_items[itemstack:get_name()]
|
local toolname = itemstack:get_name()
|
||||||
local base_uses = def.tool_capabilities.groupcaps.crumbly.uses
|
local def = minetest.registered_items[toolname]
|
||||||
local maxlevel = def.tool_capabilities.groupcaps.crumbly.maxlevel
|
local group = get_shovel_dig_group
|
||||||
|
local base_uses = def.tool_capabilities.groupcaps[group].uses
|
||||||
|
local maxlevel = def.tool_capabilities.groupcaps[group].maxlevel
|
||||||
local uses = base_uses * math.pow(3, maxlevel)
|
local uses = base_uses * math.pow(3, maxlevel)
|
||||||
local wear = math.ceil(65535 / uses)
|
local wear = math.ceil(65535 / uses)
|
||||||
itemstack:add_wear(wear)
|
itemstack:add_wear(wear)
|
||||||
|
|
Reference in a new issue