Organize mods into modpacks for better overview
3
mods/ITEMS/mcl_nether/depends.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
mcl_sounds
|
||||
mcl_util
|
||||
walkover
|
242
mods/ITEMS/mcl_nether/init.lua
Normal file
|
@ -0,0 +1,242 @@
|
|||
minetest.register_node("mcl_nether:glowstone", {
|
||||
description = "Glowstone",
|
||||
tiles = {"mcl_nether_glowstone.png"},
|
||||
is_ground_content = true,
|
||||
stack_max = 64,
|
||||
groups = {oddly_breakable_by_hand=3,building_block=1},
|
||||
drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {'mcl_nether:glowstone_dust 4'},rarity = 3},
|
||||
{items = {'mcl_nether:glowstone_dust 3'},rarity = 3},
|
||||
{items = {'mcl_nether:glowstone_dust 2'}},
|
||||
}
|
||||
},
|
||||
-- Real light level: 15 (but Minetest caps at 14)
|
||||
light_source = 14,
|
||||
sounds = mcl_sounds.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:quartz_ore", {
|
||||
description = "Nether Quartz Ore",
|
||||
stack_max = 64,
|
||||
tiles = {"mcl_nether_quartz_ore.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=2,building_block=1},
|
||||
drop = 'mcl_nether:quartz',
|
||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:netherrack", {
|
||||
description = "Netherrack",
|
||||
stack_max = 64,
|
||||
tiles = {"mcl_nether_netherrack.png"},
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3,building_block=1},
|
||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:magma", {
|
||||
description = "Magma Block",
|
||||
stack_max = 64,
|
||||
tiles = {{name="mcl_nether_magma.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=1.5}}},
|
||||
is_ground_content = true,
|
||||
light_source = 3,
|
||||
sunlight_propagates = false,
|
||||
groups = {cracky=3,building_block=1},
|
||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||
-- From walkover mod
|
||||
on_walk_over = function(loc, nodeiamon, player)
|
||||
-- Hurt players standing on top of this block
|
||||
player:set_hp(player:get_hp() - 1)
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:soul_sand", {
|
||||
description = "Soul Sand",
|
||||
stack_max = 64,
|
||||
tiles = {"mcl_nether_soul_sand.png"},
|
||||
is_ground_content = true,
|
||||
groups = {crumbly=3,building_block=1,soil_nether_wart=1},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5 - 2/16, 0.5 },
|
||||
},
|
||||
sounds = mcl_sounds.node_sound_sand_defaults(),
|
||||
-- Movement handling is done in playerplus mod
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:nether_brick", {
|
||||
-- Original name: Nether Brick
|
||||
description = "Nether Brick Block",
|
||||
stack_max = 64,
|
||||
tiles = {"mcl_nether_nether_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky=2,building_block=1},
|
||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:red_nether_brick", {
|
||||
-- Original name: Red Nether Brick
|
||||
description = "Red Nether Brick Block",
|
||||
stack_max = 64,
|
||||
tiles = {"mcl_nether_red_nether_brick.png"},
|
||||
is_ground_content = false,
|
||||
groups = {cracky=2,building_block=1},
|
||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_node("mcl_nether:nether_wart_block", {
|
||||
description = "Nether Wart Block",
|
||||
stack_max = 64,
|
||||
tiles = {"mcl_nether_nether_wart_block.png"},
|
||||
is_ground_content = false,
|
||||
groups = {oddly_breakable_by_hand=3,building_block=1},
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(
|
||||
{
|
||||
footstep={name="default_dirt_footstep", gain=0.7},
|
||||
dug={name="default_dirt_footstep", gain=1.5},
|
||||
}
|
||||
),
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:quartz_block", {
|
||||
description = "Block of Quartz",
|
||||
stack_max = 64,
|
||||
is_ground_content = false,
|
||||
tiles = {"mcl_nether_quartz_block_top.png", "mcl_nether_quartz_block_bottom.png", "mcl_nether_quartz_block_side.png"},
|
||||
groups = {cracky=3,quartz_block=1,building_block=1},
|
||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:quartz_chiseled", {
|
||||
description = "Chiseled Quartz Block",
|
||||
stack_max = 64,
|
||||
is_ground_content = false,
|
||||
tiles = {"mcl_nether_quartz_chiseled_top.png", "mcl_nether_quartz_chiseled_top.png", "mcl_nether_quartz_chiseled_side.png"},
|
||||
groups = {cracky=3,quartz_block=1,building_block=1},
|
||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:quartz_pillar", {
|
||||
description = "Pillar Quartz Block",
|
||||
stack_max = 64,
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
on_place = mcl_util.rotate_axis,
|
||||
tiles = {"mcl_nether_quartz_pillar_top.png", "mcl_nether_quartz_pillar_top.png", "mcl_nether_quartz_pillar_side.png"},
|
||||
groups = {cracky=3,quartz_block=1,building_block=1},
|
||||
sounds = mcl_sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
|
||||
|
||||
minetest.register_craftitem("mcl_nether:glowstone_dust", {
|
||||
description = "Glowstone Dust",
|
||||
inventory_image = "mcl_nether_glowstone_dust.png",
|
||||
stack_max = 64,
|
||||
groups = { craftitem=1 },
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mcl_nether:quartz", {
|
||||
description = "Nether Quartz",
|
||||
inventory_image = "mcl_nether_quartz.png",
|
||||
stack_max = 64,
|
||||
groups = { craftitem = 1 },
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mcl_nether:netherbrick", {
|
||||
description = "Nether Brick",
|
||||
inventory_image = "mcl_nether_netherbrick.png",
|
||||
stack_max = 64,
|
||||
groups = { craftitem = 1 },
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "mcl_nether:quartz",
|
||||
recipe = "mcl_nether:quartz_ore",
|
||||
cooktime = 10,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'mcl_nether:quartz_block',
|
||||
recipe = {
|
||||
{'mcl_nether:quartz', 'mcl_nether:quartz'},
|
||||
{'mcl_nether:quartz', 'mcl_nether:quartz'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'mcl_nether:quartz_chiseled 2',
|
||||
recipe = {
|
||||
{'stairs:slab_quartzblock'},
|
||||
{'stairs:slab_quartzblock'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'mcl_nether:quartz_pillar 2',
|
||||
recipe = {
|
||||
{'mcl_nether:quartz_block'},
|
||||
{'mcl_nether:quartz_block'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_nether:glowstone",
|
||||
recipe = {
|
||||
{'mcl_nether:glowstone_dust', 'mcl_nether:glowstone_dust'},
|
||||
{'mcl_nether:glowstone_dust', 'mcl_nether:glowstone_dust'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_nether:magma",
|
||||
recipe = {
|
||||
{'mcl_mobitems:magma_cream', 'mcl_mobitems:magma_cream'},
|
||||
{'mcl_mobitems:magma_cream', 'mcl_mobitems:magma_cream'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "mcl_nether:netherbrick",
|
||||
recipe = "mcl_nether:netherrack",
|
||||
cooktime = 10,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_nether:nether_brick",
|
||||
recipe = {
|
||||
{'mcl_nether:netherbrick', 'mcl_nether:netherbrick'},
|
||||
{'mcl_nether:netherbrick', 'mcl_nether:netherbrick'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_nether:red_nether_brick",
|
||||
recipe = {
|
||||
{'mcl_nether:nether_wart_item', 'mcl_nether:netherbrick'},
|
||||
{'mcl_nether:netherbrick', 'mcl_nether:nether_wart_item'},
|
||||
}
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = "mcl_nether:red_nether_brick",
|
||||
recipe = {
|
||||
{'mcl_nether:netherbrick', 'mcl_nether:nether_wart_item'},
|
||||
{'mcl_nether:nether_wart_item', 'mcl_nether:netherbrick'},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "mcl_nether:nether_wart_block",
|
||||
recipe = {
|
||||
{'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item'},
|
||||
{'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item'},
|
||||
{'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item', 'mcl_nether:nether_wart_item'},
|
||||
}
|
||||
})
|
||||
|
||||
dofile(minetest.get_modpath(minetest.get_current_modname()).."/nether_wart.lua")
|
1
mods/ITEMS/mcl_nether/mod.conf
Normal file
|
@ -0,0 +1 @@
|
|||
name = mcl_nether
|
137
mods/ITEMS/mcl_nether/nether_wart.lua
Normal file
|
@ -0,0 +1,137 @@
|
|||
minetest.register_node("mcl_nether:nether_wart_0", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drawtype = "plantlike",
|
||||
drop = "mcl_nether:nether_wart_item",
|
||||
tiles = {"mcl_nether_nether_wart_stage_0.png"},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}
|
||||
},
|
||||
},
|
||||
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1},
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:nether_wart_1", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drawtype = "plantlike",
|
||||
drop = "mcl_nether:nether_wart_item",
|
||||
tiles = {"mcl_nether_nether_wart_stage_1.png"},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.15, 0.5}
|
||||
},
|
||||
},
|
||||
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1},
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:nether_wart_2", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drawtype = "plantlike",
|
||||
drop = "mcl_nether:nether_wart_item",
|
||||
tiles = {"mcl_nether_nether_wart_stage_1.png"},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.15, 0.5}
|
||||
},
|
||||
},
|
||||
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1},
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("mcl_nether:nether_wart", {
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
drawtype = "plantlike",
|
||||
drop = {
|
||||
max_items = 2,
|
||||
items = {
|
||||
{ items = {"mcl_nether:nether_wart_item 2"}, rarity = 1 },
|
||||
{ items = {"mcl_nether:nether_wart_item 2"}, rarity = 3 },
|
||||
{ items = {"mcl_nether:nether_wart_item 1"}, rarity = 3 },
|
||||
},
|
||||
},
|
||||
tiles = {"mcl_nether_nether_wart_stage_2.png"},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, 0.45, 0.5}
|
||||
},
|
||||
},
|
||||
groups = {dig_immediate=3, not_in_creative_inventory=1,attached_node=1,dig_by_water=1},
|
||||
sounds = mcl_sounds.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mcl_nether:nether_wart_item", {
|
||||
description = "Nether Wart",
|
||||
inventory_image = "mcl_nether_nether_wart.png",
|
||||
wield_image = "mcl_nether_nether_wart.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.type ~= "node" then
|
||||
return itemstack
|
||||
end
|
||||
local placepos = pointed_thing.above
|
||||
local soilpos = table.copy(placepos)
|
||||
soilpos.y = soilpos.y - 1
|
||||
|
||||
-- Check for correct soil type
|
||||
local chk = minetest.get_item_group(minetest.get_node(soilpos).name, "soil_nether_wart")
|
||||
if chk ~= 0 and chk ~= nil then
|
||||
-- Check if node above soil node allows placement
|
||||
if minetest.registered_items[minetest.get_node(placepos).name].buildable_to then
|
||||
-- Place nether wart
|
||||
minetest.sound_play({name="default_place_node", gain=1.0}, {pos=placepos})
|
||||
minetest.set_node(placepos, {name="mcl_nether:nether_wart_0"})
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
end,
|
||||
groups = { craftitem = 1 },
|
||||
})
|
||||
|
||||
local names = {"mcl_nether:nether_wart_0", "mcl_nether:nether_wart_1", "mcl_nether:nether_wart_2"}
|
||||
|
||||
minetest.register_abm({
|
||||
nodenames = {"mcl_nether:nether_wart_0", "mcl_nether:nether_wart_1", "mcl_nether:nether_wart_2"},
|
||||
neighbors = {"group:soil_nether_wart"},
|
||||
interval = 35,
|
||||
chance = 11,
|
||||
action = function(pos, node)
|
||||
pos.y = pos.y-1
|
||||
if minetest.get_item_group(minetest.get_node(pos).name, "soil_nether_wart") == 0 then
|
||||
return
|
||||
end
|
||||
pos.y = pos.y+1
|
||||
local step = nil
|
||||
for i,name in ipairs(names) do
|
||||
if name == node.name then
|
||||
step = i
|
||||
break
|
||||
end
|
||||
end
|
||||
if step == nil then
|
||||
return
|
||||
end
|
||||
local new_node = {name=names[step+1]}
|
||||
if new_node.name == nil then
|
||||
new_node.name = "mcl_nether:nether_wart"
|
||||
end
|
||||
minetest.swap_node(pos, new_node)
|
||||
end
|
||||
})
|
||||
|
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_glowstone.png
Normal file
After Width: | Height: | Size: 475 B |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_glowstone_dust.png
Normal file
After Width: | Height: | Size: 237 B |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_magma.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_nether_brick.png
Normal file
After Width: | Height: | Size: 612 B |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_nether_wart.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_nether_wart_block.png
Normal file
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 254 B |
After Width: | Height: | Size: 554 B |
After Width: | Height: | Size: 971 B |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_netherbrick.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_netherrack.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_quartz.png
Normal file
After Width: | Height: | Size: 473 B |
After Width: | Height: | Size: 1.3 KiB |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_quartz_block_side.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_quartz_block_top.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 923 B |
After Width: | Height: | Size: 948 B |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_quartz_ore.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_quartz_pillar_side.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_quartz_pillar_top.png
Normal file
After Width: | Height: | Size: 797 B |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_red_nether_brick.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
mods/ITEMS/mcl_nether/textures/mcl_nether_soul_sand.png
Normal file
After Width: | Height: | Size: 1.1 KiB |