Jump to content

Get used spawn egg itemstack


Recommended Posts

How can I get the used ItemStack from SpecialSpawn? I want to do things based on if a mob was spawned by a special spawn egg. I tried adding a CompoundNBT with this hierachy:


- ForgeData

   - MyTag

      - true

to make it merge this data into the persistentData of the entity, but it's always empty.

Link to comment
Share on other sites

  • When using the entity persistent data you must realize that it is a shared data storage. All your data should be prefixed with your ModID to avoid name collisions.
  • Other than that it looks OK. I would use the debugger to see why the data is not applied to the entity in EntityType.updateCustomEntityTag.
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.