mirror of
https://github.com/theFox6/microexpansion.git
synced 2024-11-22 07:03:45 +01:00
Made microexpansion blocks mineable in mineclone2
This commit is contained in:
parent
afcff0b516
commit
438fc25281
8
api.lua
8
api.lua
@ -27,6 +27,7 @@ function microexpansion.register_oredef(ore, defs)
|
||||
|
||||
for _,d in ipairs(defs) do
|
||||
d.ore = ore
|
||||
minetest.log("action", minetest.serialize(d))
|
||||
minetest.register_ore(d)
|
||||
end
|
||||
end
|
||||
@ -72,6 +73,13 @@ end
|
||||
|
||||
-- [function] Register Node
|
||||
function microexpansion.register_node(itemstring, def)
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
def._mcl_hardness = def._mcl_hardness or 3
|
||||
def._mcl_blast_resistance = def._mcl_blast_resistance or 3
|
||||
def._mcl_hardness = def._mcl_hardness or 3
|
||||
def._mcl_silk_touch_drop = def._mcl_silk_touch_drop or true
|
||||
def.groups.pickaxey = def.groups.pickaxey or 3
|
||||
end
|
||||
-- Check if disabled
|
||||
if def.disabled == true then
|
||||
return
|
||||
|
@ -11,19 +11,41 @@ local incranium_y_max = -90
|
||||
local quartz_y_min = -31000
|
||||
local quartz_y_max = -5
|
||||
|
||||
local incranium_cracky = 3
|
||||
local quartz_cracky = 3
|
||||
|
||||
if mcl_core_modpath then
|
||||
incranium_y_min = -55
|
||||
incranium_y_max = -20
|
||||
quartz_y_min = -50
|
||||
quartz_y_max = 0
|
||||
incranium_cracky = 3
|
||||
quartz_cracky = 3
|
||||
end
|
||||
|
||||
-- [register] Incranium Ore
|
||||
me.register_node("incranium", {
|
||||
local quartz_nodedef = {
|
||||
description = "Quartz Ore",
|
||||
tiles = { "default_stone.png^microexpansion_ore_quartz.png" },
|
||||
is_ground_content = true,
|
||||
type = "ore",
|
||||
groups = {cracky=quartz_cracky,material_stone=1, stone=1, pickaxey=3},
|
||||
drop = "microexpansion:quartz_crystal",
|
||||
oredef = {{
|
||||
ore_type = "scatter",
|
||||
wherein = stone_ingrediant,
|
||||
clust_scarcity = 10*10*10,
|
||||
clust_num_ores = 6,
|
||||
clust_size = 5,
|
||||
y_min = quartz_y_min,
|
||||
y_max = quartz_y_max,
|
||||
}},
|
||||
}
|
||||
|
||||
incranium_nodedef = {
|
||||
description = "Incranium Ore",
|
||||
tiles = { "incranium" },
|
||||
is_ground_content = true,
|
||||
groups = { cracky=3, stone=1 },
|
||||
groups = {cracky=incranium_cracky, material_stone=1, stone=1,pickaxey=3 },
|
||||
type = "ore",
|
||||
oredef = {
|
||||
{
|
||||
@ -37,27 +59,28 @@ me.register_node("incranium", {
|
||||
},
|
||||
},
|
||||
disabled = true,
|
||||
})
|
||||
}
|
||||
|
||||
if mcl_core_modpath then
|
||||
quartz_nodedef._mcl_hardness = 3
|
||||
quartz_nodedef._mcl_blast_resistance = 3
|
||||
quartz_nodedef._mcl_hardness = 3
|
||||
quartz_nodedef._mcl_silk_touch_drop = true
|
||||
quartz_nodedef._mcl_fortune_drop = mcl_core.fortune_drop_ore
|
||||
|
||||
incranium_nodedef._mcl_hardness = 3
|
||||
incranium_nodedef._mcl_blast_resistance = 3
|
||||
incranium_nodedef._mcl_hardness = 3
|
||||
incranium_nodedef._mcl_silk_touch_drop = true
|
||||
incranium_nodedef._mcl_fortune_drop = mcl_core.fortune_drop_ore
|
||||
end
|
||||
|
||||
-- [register] Incranium Ore
|
||||
me.register_node("incranium", incranium_nodedef)
|
||||
|
||||
me.register_item("quartz_crystal", {
|
||||
description = "Quartz Crystal",
|
||||
})
|
||||
|
||||
|
||||
me.register_node("quartz", {
|
||||
description = "Quartz Ore",
|
||||
tiles = { "default_stone.png^microexpansion_ore_quartz.png" },
|
||||
is_ground_content = true,
|
||||
type = "ore",
|
||||
groups = { cracky=3, stone=1 },
|
||||
drop = "microexpansion:quartz_crystal",
|
||||
oredef = {{
|
||||
ore_type = "scatter",
|
||||
wherein = stone_ingrediant,
|
||||
clust_scarcity = 10*10*10,
|
||||
clust_num_ores = 6,
|
||||
clust_size = 5,
|
||||
y_min = quartz_y_min,
|
||||
y_max = quartz_y_max,
|
||||
}}
|
||||
})
|
||||
me.register_node("quartz", quartz_nodedef)
|
||||
|
Loading…
Reference in New Issue
Block a user