Just Another Spawner

Just Another Spawner

665k Downloads

Crash on PostSpawn Tags (EntityHandler)

Geethebluesky opened this issue ยท 2 comments

commented

Using JAS 0.16.13 on MC 1.7.10.
Adding a PostSpawn tag in EntityHandler configurations results in a crash.

Example that causes the crash:

"MoCreatures.Bird": {
  "Type-Enabled": "OPENSKY-true",
  "Spawn Operand": "OR",
  "Spawn Tag": "!sky()",
  "Despawn Tags": "isTamed()||block({'iron_bars'},{6,6,6},{0,0,0})",
  "PostSpawn Tags": "writenbt('TypeInt/3/4')",
  "Contents": [
    "MoCreatures.Bird"
  ]
},

Unlike issue 108, adding "PostSpawn Tags" = "true" does not cause the crash.
The above without the PostSpawn tags spawns the birds normally.

Crash: http://pastebin.com/EVtcC1ZV

commented

Unfortunately now (with 0.16.14) I'm getting the exact same crash as above, except it also happens when setting PostSpawn tags in the SpawnListEntries file as well.

Setting "PostSpawn Tags": "true" in EntityHandler still works.

commented

You're calling writenbt(String) which doesn't exist.

The only acceptable argument is with a String array: writeNBT(String[])

Arrays are marked with {} in MVEL. [] denotes a list which should also work: writenbt('TypeInt/3/4') needs to be writenbt({'TypeInt/3/4'})