prevent NPE on entity item state check
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2024-09-03 22:37:34 -04:00
parent ebcf0865ee
commit 4007bc764d
2 changed files with 2 additions and 1 deletions

View File

@ -677,6 +677,7 @@ Better jenkins documentation
Include jenkins dockerfile in repo Include jenkins dockerfile in repo
Better model for gameobjects Better model for gameobjects
Server synchronization of sprint tree Server synchronization of sprint tree
Fix potential bad path for item state lookup
# TODO # TODO

View File

@ -355,7 +355,7 @@ public class ItemUtils {
* @return true if the item IS in an inventory container, otherwise false * @return true if the item IS in an inventory container, otherwise false
*/ */
public static boolean itemIsInInventory(Entity item){ public static boolean itemIsInInventory(Entity item){
return (boolean)item.getData(EntityDataStrings.ITEM_IS_IN_INVENTORY); return item.containsKey(EntityDataStrings.ITEM_IS_IN_INVENTORY);
} }
/** /**