This commit is contained in:
Maksim 2019-05-10 22:08:06 +02:00
parent 30d2e9e59a
commit 2cee766ff6
8 changed files with 15 additions and 7 deletions

View File

@ -212,13 +212,16 @@ core.register_entity(":__builtin:item", {
end end
end end
local node = minetest.get_node_or_nil(self.object:get_pos())
if not node then
return
end
if minetest.get_item_group(node.name, "lava") > 0 then if minetest.get_item_group(node.name, "lava") > 0 then
minetest.sound_play("default_cool_lava", { minetest.sound_play("default_cool_lava", {
pos = self.object:get_pos(), pos = self.object:get_pos(),
max_hear_distance = 8, max_hear_distance = 8,
}) })
self.object:remove() self.object:remove()
return
minetest.add_particlespawner({ minetest.add_particlespawner({
amount = 3, amount = 3,
time = 0.1, time = 0.1,
@ -235,6 +238,7 @@ core.register_entity(":__builtin:item", {
collisiondetection = true, collisiondetection = true,
texture = "item_smoke.png" texture = "item_smoke.png"
}) })
return
end end
end, end,

View File

@ -752,3 +752,8 @@ minetest.register_craft({
{"farming:string", "farming:string", "farming:string"}, {"farming:string", "farming:string", "farming:string"},
} }
}) })
minetest.register_craftitem("default:flint", {
description = "Flint",
inventory_image = "default_flint.png"
})

View File

@ -555,7 +555,7 @@ minetest.register_abm({
-- --
-- Snowballs -- Snowballs
-- --
--[[
-- Shoot snowball -- Shoot snowball
snow_shoot_snowball = function (item, player, pointed_thing) snow_shoot_snowball = function (item, player, pointed_thing)
local playerpos = player:get_pos() local playerpos = player:get_pos()
@ -576,8 +576,7 @@ snowball_ENTITY = {
} }
-- Called when snowball is moving. -- Called when snowball is moving.
snowball_ENTITY.on_step = function(self, dtime) snowball_ENTITY.on_step = function(self)
self.timer = self.timer+dtime
local pos = self.object:getpos() local pos = self.object:getpos()
local node = minetest.get_node(pos) local node = minetest.get_node(pos)
@ -592,4 +591,4 @@ snowball_ENTITY.on_step = function(self, dtime)
self.lastpos = {x = pos.x, y = pos.y, z = pos.z} self.lastpos = {x = pos.x, y = pos.y, z = pos.z}
end end
minetest.register_entity("default:snowball_entity", snowball_ENTITY) minetest.register_entity("default:snowball_entity", snowball_entity)]]--

Binary file not shown.

Before

Width:  |  Height:  |  Size: 519 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 B

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

View File

Before

Width:  |  Height:  |  Size: 563 B

After

Width:  |  Height:  |  Size: 563 B