local drop = ItemStack({name=nodename}):get_definition().drop
if drop == nil then
-- default drop
- print("default drop: " .. nodename)
return {ItemStack({name=nodename})}
elseif type(drop) == "string" then
-- itemstring drop
setPitch(args.getFloat("pitch"));
setYaw(args.getFloat("yaw"));
setPosition(args.getV3F("position"));
- bool craftresult_is_preview = true;
- try{
- craftresult_is_preview = args.getBool("craftresult_is_preview");
- }catch(SettingNotFoundException &e){}
try{
hp = args.getS32("hp");
}catch(SettingNotFoundException &e){
// Convert players without craftpreview
inventory.addList("craftpreview", 1);
+ bool craftresult_is_preview = true;
+ if(args.exists("craftresult_is_preview"))
+ craftresult_is_preview = args.getBool("craftresult_is_preview");
if(craftresult_is_preview)
{
// Clear craftresult