Posted December 25, 201311 yr Hello. I am making a mod and I want to know how to make my block spawn items around it when right clicked. Can someone please help me with this? I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!
December 26, 201311 yr @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float f, float g, float t) { EntityItem ei = new EntityItem(world, x, y + 1, z, 'Your ItemStack Here'); world.spawnEntityInWorld(ei); return true; }
December 26, 201311 yr Author @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float f, float g, float t) { EntityItem ei = new EntityItem(world, x, y + 1, z, 'Your ItemStack Here'); world.spawnEntityInWorld(ei); return true; } Thank you this will really help with my mod. I'm back from being gone for... I think its been about a year. I'm pretty sure nobody remembers me, but hello anybody who does!
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.