Calculator

Calculator

6M Downloads

Advanced greenhouse can't harvester seeds from mystical agriculture and agricraft.

Armagedon13 opened this issue ยท 2 comments

commented

Forge Version: 1.12.2 14.23.4.2738
Calculator Version: 1.12.2 5.0.8-4
SonarCore Version: 1.12.2 5.0.15-13
Mode: Singleplayer 1.12.2
Description: Advanced Greenhouse destroy the seeds from mystical agriculture and with agricraft not harvest it.

commented

Fixed in dev, Agricraft support added, and switched to new drops method for vanilla crops.

commented

Any Greenhouse doesn't work with Mystical Agriculture seeds, because it using an old getDrops method.
https://github.com/SonarSonic/Sonar-Core/blob/1.12.2/src/main/java/sonar/core/integration/planting/vanilla/Harvester.java
Mystical Agriculture using new one, that is void method, so that no return statements.
That is why your seeds are vanished.

@Deprecated
    public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
    {
        NonNullList<ItemStack> ret = NonNullList.create();
        getDrops(ret, world, pos, state, fortune);
        return ret;
    }

public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
    {
        Random rand = world instanceof World ? ((World)world).rand : RANDOM;

        int count = quantityDropped(state, fortune, rand);
        for (int i = 0; i < count; i++)
        {
            Item item = this.getItemDropped(state, rand, fortune);
            if (item != Items.AIR)
            {
                drops.add(new ItemStack(item, 1, this.damageDropped(state)));
            }
        }
    }