From 5af8d3057efbb442bdcee0c3668ed479cb003142 Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 8 Oct 2022 10:46:36 +0200 Subject: [PATCH] Mak sure double-tall plants drop (#38) --- .../bclib/blocks/BaseDoublePlantBlock.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/betterx/bclib/blocks/BaseDoublePlantBlock.java b/src/main/java/org/betterx/bclib/blocks/BaseDoublePlantBlock.java index 1646c093..b83eb0b3 100644 --- a/src/main/java/org/betterx/bclib/blocks/BaseDoublePlantBlock.java +++ b/src/main/java/org/betterx/bclib/blocks/BaseDoublePlantBlock.java @@ -46,19 +46,19 @@ public abstract class BaseDoublePlantBlock extends BaseBlockNotFull implements R public BaseDoublePlantBlock() { this( Properties.of(Material.PLANT) - .sound(SoundType.GRASS) - .noCollission() - .offsetType(BlockBehaviour.OffsetType.NONE) + .sound(SoundType.GRASS) + .noCollission() + .offsetType(BlockBehaviour.OffsetType.NONE) ); } public BaseDoublePlantBlock(int light) { this( Properties.of(Material.PLANT) - .sound(SoundType.GRASS) - .lightLevel((state) -> state.getValue(TOP) ? light : 0) - .noCollission() - .offsetType(BlockBehaviour.OffsetType.NONE) + .sound(SoundType.GRASS) + .lightLevel((state) -> state.getValue(TOP) ? light : 0) + .noCollission() + .offsetType(BlockBehaviour.OffsetType.NONE) ); } @@ -114,10 +114,6 @@ public abstract class BaseDoublePlantBlock extends BaseBlockNotFull implements R @Override public List 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,