Prevent from unknown textures
This commit is contained in:
parent
157022ff25
commit
e15dab2bf8
12
init.lua
12
init.lua
@ -61,7 +61,17 @@ minetest.register_entity("stapled_bread:bread_slice", {
|
||||
visual_size = {x = 0.2, y = 0.2},
|
||||
physical = false,
|
||||
collisionbox = box,
|
||||
selectionbox = box
|
||||
selectionbox = box,
|
||||
get_staticdata = function(self)
|
||||
return self.object:get_properties().textures[1]
|
||||
end,
|
||||
on_activate = function(self, staticdata, dtime_s)
|
||||
if staticdata and staticdata ~= "" then
|
||||
self.object:set_properties({
|
||||
textures = { staticdata }
|
||||
})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- REGISTER BREAD STUFF
|
||||
|
Loading…
x
Reference in New Issue
Block a user