This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
world.setBlock(i,j ,k, Block.mobSpawner.blockID,1,1);
TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner)world.getBlockTileEntity(i,j,k); tileentitymobspawner.getSpawnerLogic().setMobID("YOURMOBNAME");
EntityRegistry.registerModEntity(EntityYOURMOB.class, "YOURMOBNAME", EntityID, this, NUMBER, NUMBER, true);
EntityRegistry.registerGlobalEntityID(EntityYOURMOB.class, "YOURMOBNAME", EntityID);
In your structure generation class put this
Then Add This Peace of code afterwards
TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner)world.getBlockTileEntity(i,j,k); tileentitymobspawner.getSpawnerLogic().setMobID("YOURMOBNAME");now go to your main class
if your entity registry looks like this
then change it to this