forked from MineClone5/MineClone5
Eliminate crumbly, cracky, snappy and choppy fully
This commit is contained in:
parent
4ec6f5a3ec
commit
6b3db0ae72
|
@ -11,13 +11,11 @@ Example Usage
|
|||
-------------
|
||||
|
||||
minetest.register_node("somemod:someblock", {
|
||||
description = key,
|
||||
description = "Talking Block",
|
||||
tiles = {"somemod_someblock.png"},
|
||||
groups = {cracky=1},
|
||||
on_walk_over = function(pos, node, player)
|
||||
|
||||
minetest.chat_send_player(player, "Hey! Watch it!")
|
||||
end
|
||||
on_walk_over = function(pos, node, player)
|
||||
minetest.chat_send_player(player, "Hey! Watch it!")
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ minetest.register_entity("drippingwater:drop_lava", {
|
|||
--Create drop
|
||||
|
||||
minetest.register_abm(
|
||||
{nodenames = {"group:crumbly", "group:cracky"},
|
||||
{nodenames = {"group:solid"},
|
||||
neighbors = {"group:water"},
|
||||
interval = 2,
|
||||
chance = 22,
|
||||
|
@ -100,7 +100,7 @@ minetest.register_abm(
|
|||
--Create lava drop
|
||||
|
||||
minetest.register_abm(
|
||||
{nodenames = {"group:crumbly", "group:cracky"},
|
||||
{nodenames = {"group:solid"},
|
||||
neighbors = {"group:lava"},
|
||||
interval = 2,
|
||||
chance = 22,
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
Dripping Water Mod
|
||||
by kddekadenz
|
||||
|
||||
modified for MineClone 2 by Wuzzy
|
||||
|
||||
|
||||
Installing instructions:
|
||||
|
||||
|
@ -11,8 +13,7 @@ Installing instructions:
|
|||
|
||||
Manual:
|
||||
|
||||
-> drops are generated rarely under crumbly nodes (dirt,grass,sandstone)
|
||||
-> waterdrops are generated under cloudstone massively
|
||||
-> drops are generated rarely under solid nodes
|
||||
-> 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
|
||||
|
||||
|
|
|
@ -13,12 +13,7 @@
|
|||
--Tweaked by: maikerumine
|
||||
local function is_ground(pos)
|
||||
local nn = minetest.get_node(pos).name
|
||||
return minetest.get_item_group(nn, "crumbly") ~= 0 or
|
||||
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
|
||||
return minetest.get_item_group(nn, "solid") ~= 0
|
||||
end
|
||||
|
||||
local function get_sign(i)
|
||||
|
|
|
@ -136,7 +136,7 @@ mobs:register_mob("mobs_mc:skeleton2", {
|
|||
dogshoot_switch = 1,
|
||||
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 = {
|
||||
|
|
|
@ -58,7 +58,7 @@ mobs:register_mob("mobs_mc:spider", {
|
|||
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
|
||||
|
|
|
@ -117,16 +117,36 @@ minetest.register_tool("mcl_tools:pick_diamond", {
|
|||
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)
|
||||
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)
|
||||
above.y = above.y + 1
|
||||
if minetest.get_node(above).name == "air" then
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
-- Add wear, as if digging a level 0 crumbly node
|
||||
local def = minetest.registered_items[itemstack:get_name()]
|
||||
local base_uses = def.tool_capabilities.groupcaps.crumbly.uses
|
||||
local maxlevel = def.tool_capabilities.groupcaps.crumbly.maxlevel
|
||||
-- Add wear, as if digging a level 0 shovely node
|
||||
local toolname = itemstack:get_name()
|
||||
local def = minetest.registered_items[toolname]
|
||||
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 wear = math.ceil(65535 / uses)
|
||||
itemstack:add_wear(wear)
|
||||
|
|
Loading…
Reference in New Issue