Posted October 30, 201410 yr I am trying to make an item spawn my mob, but I don't understand how to do it. I thought this method would do it but for some reason this doesn't work, nothing spawns: @Override public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { if(!world.isRemote) world.spawnEntityInWorld(new EntityBlockling(world, level, xp, upgrade, special)); return itemStack; } I looked in the normal spawn egg code but couldn't figure it out.
October 30, 201410 yr Author How do I do that though, as the parameters don't contain an x, y, or z coordinate.
October 30, 201410 yr You are spawning your mob on a really strange place, your x coord = special your y coord = xp your z coord = upgrade, Use things like player.posX instead of random numbers like xp.
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.