@Override
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {
ItemStack[] items = new ItemStack[9];
ItemStack item = craft(items, world, CraftingManager.getInstance(), 3, 3, true);
if (item != null) {
world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, item));
}
}
Umm, Idk... Ask @ljfaAnyone know how to get an ItemStack/EntityItem from a positionCode:@Override public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) { ItemStack[] items = new ItemStack[9]; ItemStack item = craft(items, world, CraftingManager.getInstance(), 3, 3, true); if (item != null) { world.spawnEntityInWorld(new EntityItem(world, player.posX, player.posY, player.posZ, item));} }
World.getEntitiesWithinAABB() gives you all entities within a bounding boxAnyone know how to get an ItemStack/EntityItem from a position
Thanks for the help...now to make a bounding box around the crafting grid of this blockWorld.getEntitiesWithinAABB() gives you all entities within a bounding box
as the position will likely not be exact