From d1b5522db036a1584e37a74b1f959a7faf45c245 Mon Sep 17 00:00:00 2001 From: TechLord22 <37029404+TechLord22@users.noreply.github.com> Date: Thu, 10 Aug 2023 14:14:21 -0400 Subject: [PATCH] fix double slabs not dropping items (#2041) --- .../gregtech/common/blocks/wood/BlockGregWoodSlab.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/gregtech/common/blocks/wood/BlockGregWoodSlab.java b/src/main/java/gregtech/common/blocks/wood/BlockGregWoodSlab.java index 7a90380f943..4f4d3df4f5c 100644 --- a/src/main/java/gregtech/common/blocks/wood/BlockGregWoodSlab.java +++ b/src/main/java/gregtech/common/blocks/wood/BlockGregWoodSlab.java @@ -2,6 +2,7 @@ import gregtech.api.GregTechAPI; import gregtech.api.items.toolitem.ToolClasses; +import gregtech.common.blocks.MetaBlocks; import net.minecraft.block.BlockSlab; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; @@ -10,6 +11,7 @@ import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumFacing; import net.minecraft.util.NonNullList; @@ -17,6 +19,7 @@ import net.minecraft.world.IBlockAccess; import javax.annotation.Nonnull; +import java.util.Random; public abstract class BlockGregWoodSlab extends BlockSlab { @@ -44,6 +47,12 @@ public int damageDropped(IBlockState state) { return state.getValue(VARIANT).ordinal(); } + @Nonnull + @Override + public Item getItemDropped(@Nonnull IBlockState state, @Nonnull Random rand, int fortune) { + return Item.getItemFromBlock(MetaBlocks.WOOD_SLAB); + } + @Nonnull @Override public String getTranslationKey(int meta) {