Posted May 28, 201510 yr Hi, How do I have it so when a block is broken, it doesn't drop itself (but, for example, a diamond)? Thanks! Sup bruh.
May 28, 201510 yr @Override public Item getItemDropped(int meta, Random random, int fortune) { return <the drop>; }
May 28, 201510 yr Or if you want multiple: @Override public ArrayList<ItemStack> getDrops(int x, int y, int z, int metadata, int fortune){ ArrayList<ItemStack> drops = new ArrayList<ItemStack>(); drops.add(new ItemStack(<Item>)); return drops; } Use drops.add multiple times however many times you want for each drop. Hope this helps.
May 28, 201510 yr Subscribe to BlockEvent#HarvestDropsEvent, and change the ArrayList<ItemStack> named 'drops' To change drops of a block. (It can be any block; But you should check if the block is 'the block' that you want.) I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
May 29, 201510 yr Because if you didn't, EVERY block would drop that item, right? Of course. (Or it would not, in case other mods override the drops, but anyway.) I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
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.