Started by
cyanog3n
on
Topic category: Troubleshooting, bugs, and solutions
Hi, I'm trying to add a block to my mod that passively absorbs XP orbs from the surroundings and stores their xp in an internal buffer.
The procedure I've been using to detect nearby experience orbs is shown here. The Value tag is stored as a signed 16-bit int so I've used the codeblock to get a number NBT tag and send it in chat for debug purposes:
Sample xp orb nbt data for reference:
However, the block seems unable to get the correct experience value for any size of experience orb and instead outputs nothing but zeroes.
Is there an issue with my method here? Or if it is a limitation of MCreator, are any workarounds possible?
Thanks for your help.
Fixed. Casted entity to ExperienceOrbEntity and used the method getXpValue() instead: