1
0
Fork 0

Minecraft-style snow stuff

objects
Wuzzy 2017-01-04 11:26:35 +01:00
parent 3a8898634a
commit 0045d00a82
3 changed files with 21 additions and 16 deletions

View File

@ -594,16 +594,15 @@ minetest.register_craft({
minetest.register_craft({
output = 'default:snowblock',
recipe = {
{'default:snow', 'default:snow', 'default:snow'},
{'default:snow', 'default:snow', 'default:snow'},
{'default:snow', 'default:snow', 'default:snow'},
{'default:snowball', 'default:snowball'},
{'default:snowball', 'default:snowball'},
}
})
minetest.register_craft({
output = 'default:snow 9',
output = 'default:snow 6',
recipe = {
{'default:snowblock'},
{'default:snowblock', 'default:snowblock', 'default:snowblock'},
}
})

View File

@ -1868,10 +1868,8 @@ minetest.register_node("default:packedice", {
})
minetest.register_node("default:snow", {
description = "Snow Layer",
description = "Top Snow",
tiles = {"default_snow.png"},
inventory_image = "default_snowball.png",
wield_image = "default_snowball.png",
is_ground_content = true,
paramtype = "light",
buildable_to = true,
@ -1887,13 +1885,7 @@ minetest.register_node("default:snow", {
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
on_use = snow_shoot_snowball,
on_construct = function(pos)
pos.y = pos.y - 1
if minetest.env:get_node(pos).name == "default:dirt_with_grass" then
minetest.env:set_node(pos, {name="default:dirt_with_snow"})
end
end,
drop = "default:snowball 2",
})
minetest.register_node("default:snowblock", {
@ -1905,7 +1897,7 @@ minetest.register_node("default:snowblock", {
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
drop = "default:snow 4",
drop = "default:snowball 4",
})
minetest.register_node("default:cobweb", {

View File

@ -339,3 +339,17 @@ minetest.register_tool("default:shears", {
}
}
})
-- Snowball
minetest.register_craftitem("default:snowball", {
description = "Snowball",
inventory_image = "default_snowball.png",
stack_max = 64,
on_use = snow_shoot_snowball,
on_construct = function(pos)
pos.y = pos.y - 1
if minetest.env:get_node(pos).name == "default:dirt_with_grass" then
minetest.env:set_node(pos, {name="default:dirt_with_snow"})
end
end,
})