Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void calcSapling(final World world)
- {
- for(final BlockPos pos : leaves)
- {
- final Block block = world.getBlockState(pos).getBlock();
- if(block instanceof BlockLeaves)
- {
- final NonNullList<ItemStack> list = NonNullList.create();
- block.getDrops(list, world, pos, world.getBlockState(pos), 100);
- for(final ItemStack stack: list)
- {
- final int[] oreIds = OreDictionary.getOreIDs(stack);
- for(final int oreId: oreIds)
- {
- if(OreDictionary.getOreName(oreId).equals(SAPLINGS))
- {
- saplingToUse = stack;
- return;
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement