
either writenbt() or PostSpawn Tags not fully functional.
AnvilPuncher opened this issue ยท 2 comments
The function, writenbt(), and PostSpawn Tags were tested using JAS v. 0.16.14 in order to have NBT data written to spawned creatures on a per biome basis. The creatures tested upon were the pig, sheep and ProjectZulu|Core.Frog. The NBT data manipulated were the Saddle for the pig, the Color for the sheep and the CustomName for the frog.
I'll spare the gory details but in all cases, the following format did not cause the entity to have the corresponding NBT data written to it, as evidenced by looking at the creatures and using NBTedit.
In the spawn list entries,
"PostSpawn Tags":"writenbt({'NBTtag/datatype/value'})"
did not cause the entity to have the desired NBT tag written, but did not cause a crash and the desired creature spawned as it have would without the entry.
Further testing using the following entry in the entity handler:
"Spawn Operand":"OR",
"Spawn Tag":"writenbt({'NBTtag/datatype/value'})"
caused the entity not to spawn. This was expected if the writenbt() function were to have "succeeded" in writing the NBT data (or at least played nicely with the minecraft classes involved in writing NBT data). Conversely, using !writenbt() caused the entity to spawn as usual but without the desired NBT write (also expected).
It is assumed that using the spawn tag to write nbt data is not a good way to alter this since it is written early in the spawning and could be changed by the game later. This makes the problem hard to test and resolve, in game, since the use of PostSpawn Tags is necessary but makes it hard to defray whether the problem is with writenbt() or PostSpawn Tags.
Should be fixed in version 0.16.15
Changed color of sheep with
"Sheep": {
"Type-Enabled": "MONSTER-true",
"PostSpawn Tags": "writenbt({'Color/1/5'})",
"Contents": [
"Sheep"
]
},