Posted June 26, 201312 yr How do I edit the NBT code of a mob spawner so it spawns mobs with specific properties. I.E. charged creepers Code: world.setBlock(x, y - 1, z, Block.mobSpawner.blockID); TileEntityMobSpawner zombies = (TileEntityMobSpawner)world.getBlockTileEntity(x, y - 1, z); zombies.func_98049_a().setMobID("Villager");
June 26, 201312 yr How do I edit the NBT code of a mob spawner so it spawns mobs with specific properties. I.E. charged creepers Code: world.setBlock(x, y - 1, z, Block.mobSpawner.blockID); TileEntityMobSpawner zombies = (TileEntityMobSpawner)world.getBlockTileEntity(x, y - 1, z); zombies.func_98049_a().setMobID("Villager"); It cannot be done without modifying the MobSpawnerBaseLogic code (or creating your own spawner.) The entity that is spawned is a local variable. BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
June 27, 201312 yr Someone should put in a suggestion to beagle to edit NBT data of a block with the cords.
June 27, 201312 yr Someone should put in a suggestion to beagle to edit NBT data of a block with the cords. It's not the NBT of the block, it's the NBT of the entity. Which is never modified. BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.