Posted March 26, 201510 yr I'd like to know how to drop an item into the world at a certain spot that has a damage value The item i am trying to drop is a spawn egg the code is being fired in the EntityInteractEvent handler I have figured out how to make an item drop, and I know how to make an itemstack that has a damage value but I don't know of any way to drop an itemstack into the world at a desired location ok got it working with the following, but if someone knows of a better way please do post public static void DropItem(ItemStack i, double posX, double posY, double posZ, World w){ if(i.stackSize>0 && i.getItem() != null){ EntityItem ei = new EntityItem(w,posX,posY,posZ,i); ei.delayBeforeCanPickup=10; w.spawnEntityInWorld(ei); }
March 26, 201510 yr If you need items drop from an entity: Entity e = ...; e.entityDropItem(new ItemStack(...)); Author of Tao Land Mod. http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img] Also, author of RenderTo ---- I'm not an English native speaker. I just try my best.
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.