Null Owner crash when item state "PropertyValueProvider" requires an entity - [2026.2] [NeoForge 26.1.2]

Started by TheGameCrafter13 on

Topic category: Troubleshooting, bugs, and solutions

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Null Owner crash when item state "PropertyValueProvider" requires an entity - [2026.2] [NeoForge 26.1.2]
Sat, 07/25/2026 - 18:25 (edited)
  • MCreator Version: 2026.2.30420
  • Minecraft version (generator): NeoForge for 26.1.2 (26.1.2.71)

When giving an item an "item state" using a custom state property, if the value provider procedure requires an entity, the game will crash in common cases.

Examples such as:

  • Using the "/give" command ("Owner" doesn't exist when the item spawns)
  • Placing it in an Item Frame (The entity crashes instantly for every time it gets loaded. Making the world functionally impossible to load normally)
  • etc.

 

Basically any time where the item loads in a context that doesn't involve a "living" entity (as implied by the crash log)

java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.ItemOwner.asLivingEntity()" because "owner" is null

 

Things I've tried:

  • Rebuilding (several times)
  • Clearing entire Gradle folder
  • Adding the check to the PropertyValueProvider: "Is Entity =/= Null"
  • Replacing the above check with "Is Entity of (sub)type == Player/Server Player"
  • Testing in a brand new Workspace (neither workspace has any plugins enabled)

 

Temporary Solution Options (For getting the world to open):

  • [Complex]: Have a Global Trigger "EntityJoinsTheWorld" check for an item frame entity and have that entity run the command "/data get entity @s" as string and checking if it contains your items registry name (Eg: "mymod:custom_item") and canceling the global trigger if it returns true (This will remove that entity from the world.)
  • [Simple]: Opening every "PropertyValueProvider" procedure with an entity requirement and disconnecting the whole procedure from the "event trigger" block and placing a "return 0" in it's place (keeping the disconnected procedure blocks for when the bug is patched.)
Edited by TheGameCrafter13 on Sat, 07/25/2026 - 18:25
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah good to see someone…
Wed, 07/29/2026 - 19:09

Yeah good to see someone opened a Github issue.

Just wanted to make sure other people were having the same issue before submitting to Github.