mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-26 18:09:33 +01:00
Fix possible crash when spawning piglin
This commit is contained in:
parent
d13d50333f
commit
88de3656b1
1 changed files with 1 additions and 2 deletions
|
@ -119,8 +119,7 @@ local piglin = {
|
|||
on_pick_up = function(self, itementity)
|
||||
local item = itementity.itemstring:split(" ")[1]
|
||||
local it = ItemStack(itementity.itemstring)
|
||||
--return true --do not pick up
|
||||
if item == "mcl_core:gold_ingot" and self.state ~= "attack" and self.gold_items < 3 then
|
||||
if item == "mcl_core:gold_ingot" and self.state ~= "attack" and self.gold_items and self.gold_items < 3 then
|
||||
it:take_item(1)
|
||||
self.state = "stand"
|
||||
self.object:set_animation({x=0,y=79})
|
||||
|
|
Loading…
Reference in a new issue