Try to make stone chipping recipe less boring.
- Items don't down settle when rising. - Give stone chips some upward kick.
This commit is contained in:
parent
c6584d79d4
commit
23e7a789cb
@ -81,8 +81,10 @@ end
|
||||
function nodecore.entity_settle_check(on_settle)
|
||||
return function(self)
|
||||
local pos = self.object:get_pos()
|
||||
local coll = self.object:get_velocity().y == 0
|
||||
local yvel = self.object:get_velocity().y
|
||||
local coll = self.not_rising and yvel == 0
|
||||
and collides({x = pos.x, y = pos.y - 0.75, z = pos.z})
|
||||
self.not_rising = yvel <= 0
|
||||
if not coll then
|
||||
if self.setvel then
|
||||
self.object:set_velocity(self.vel)
|
||||
|
@ -13,6 +13,8 @@ minetest.register_craftitem(modname .. ":chip", {
|
||||
sounds = nodecore.sounds("nc_terrain_stony")
|
||||
})
|
||||
|
||||
local up = {x = 0, y = 5, z = 0}
|
||||
|
||||
nodecore.register_craft({
|
||||
label = "break cobble to chips",
|
||||
action = "pummel",
|
||||
@ -20,7 +22,7 @@ nodecore.register_craft({
|
||||
{match = "nc_terrain:cobble_loose", replace = "nc_terrain:gravel"}
|
||||
},
|
||||
items = {
|
||||
{name = modname .. ":chip", count = 4, scatter = 5}
|
||||
{name = modname .. ":chip", count = 4, scatter = 5, velocity = up}
|
||||
},
|
||||
toolgroups = {cracky = 2},
|
||||
itemscatter = 5
|
||||
|
Loading…
x
Reference in New Issue
Block a user