Unable to .setBlock MobSpawnerBlock with SpawnData or SpawnPotentials nbt tags
LadyCailinBot opened this issue ยท 1 comments
WORLDEDIT-3109 - Reported by Mysteryem..
I've been trying to use WorldEdit to place spawners with custom nbtdata, but I can't seem to get the SpawnData or SpawnPotentials tags to work. Simpler things such as making a Zombie spawner that spawns only villager zombies refused to work too.
The code for the listener that I wrote for placing them can be found at http://pastebin.com/Pnxp3Yvh and the .toString() debug output of it at http://pastebin.com/YE2XU9q2
Basically, when the player places a mob spawner with the correct damage value, I'm constructing a new MobSpawnerBlock, setting its nbtdata and then placing it in the world. (the listener needs cleaning up, but it seems to work as expected aside from SpawnData and SpawnPotentials)
Not sure if there's a bug here or if I'm doing something wrong.
Edit: I should add,
I am using WorldEdit 5.6.2 and CraftBukkit version git-Bukkit-1.7.2-R0.3-66-g43d8943-b3078jnks (MC: 1.7.9) (Implementing API version 1.7.9-R0.1-SNAPSHOT)
Comment by sk89q
I have rewritten the NBT setting code and made the NBT library bundled in WorldEdit much less obtuse. This should be fixed now.
I would not recommend using MobSpawnerBlock or any of those blocks anymore as constructing the blocks manually is better ({{new BaseBlock(52)}} or {{worldEditWorld.getWorldData().getBlockRegistry().createFromId("minecraft:mob_spawner")}}).
This applies to WorldEdit 6+ only, which is currently only in Git and available as dev builds. We plan to make a release when we are ready.