Issues with Spawner Minecarts (Or the usage of NBTEntity is unclear)
BenCat07 opened this issue ยท 1 comments
I'm trying to use this plugin to add NBT to a Minecart Spawner, since those don't have any exposed methods under paper/spigot/bukkit/etc.
I'm trying to run this code, and seem to get a Pig spawner minecart every single time, it works when i manually spawn a Spawner Minecart with this NBT though. I might just be misunderstanding something, but help would be much appreciated.
I saw an update function for ItemStack but i cannot find one for Entities, so i assume there is none?....
NBTEntity nbt = new NBTEntity(spawner_minecart);
// Set spawner to spawn Baby Zombies with Speed 2 that ignores light level
nbt.mergeCompound(new NBTContainer("{Delay:20,MaxNearbyEntities:20,MaxSpawnDelay:20,MinSpawnDelay:10,SpawnCount:1,SpawnData:{id:\"minecraft:zombie\",IsBaby:1b,ActiveEffects:[{Id:1b,Amplifier:1b,Duration:1000000,ShowParticles:0b}]}}"));
zombie.addPassenger(spawner_minecart);