BCLib

BCLib

31M Downloads

[Bug] Double plants don't have drop for top block

paulevsGitch opened this issue ยท 0 comments

commented

What happened?

BaseDoublePlantBlock don't have a drop list for top block:

    @Override
    public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
        if (state.getValue(TOP)) {
            return Lists.newArrayList();
        }

        ItemStack tool = builder.getParameter(LootContextParams.TOOL);
        if (tool != null && BaseShearsItem.isShear(tool) || EnchantmentHelper.getItemEnchantmentLevel(
                Enchantments.SILK_TOUCH,
                tool
        ) > 0) {
            return Lists.newArrayList(new ItemStack(this));
        } else {
            return Lists.newArrayList();
        }
    }

As a result if you break top block (even with shears) - it will not drop anything.
This condition should be removed:

if (state.getValue(TOP)) {
    return Lists.newArrayList();
}

BCLib

2.1.0

Fabric API

0.60.0

Fabric Loader

0.14.9

Minecraft

1.19.1

Relevant log output

No response

Other Mods

No response