[Request] Add ZenSetter for IEntityXp
lucidobservor opened this issue ยท 0 comments
Issue Description:
The IEntityXp class currently hs a ZenGetter for the xp
field, but no corresponding ZenSetter. I believe that a ZenSetter is required for my use case.
In the script below, I am attempting to cause an experience orb to spawn when an entity dies. Without the problematic line, the script causes an experience orb to spawn, but said orb cannot interact with a player (presumably because its experience value is zero).
What happens:
After adding the problematic line orb.xp = 1.0;
the script throws an error (see below). This error is presumably related to the fact the xp doesn't have a ZenSetter.
What you expected to happen:
The desired behavior would be the script not throwing errors, and for the result to be that when an entity dies not at the hand of a player (e.g. falling from a height), it spawns an experience orb which can be collected by the player for one experience point.
Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):
https://gist.github.com/lucidobservor/b5bb10ca57ef67a0903cf0d19123245a
crafttweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):
Affected Versions (Do not use "latest"):
- Minecraft: 1.12.2
- Forge: 14.23.4.2756
- Crafttweaker: 4.1.9
- Using a server: No