Skip to content

Commit

Permalink
fix double slabs not dropping items (#2041)
Browse files Browse the repository at this point in the history
  • Loading branch information
TechLord22 authored Aug 10, 2023
1 parent c4dd79c commit d1b5522
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -10,13 +11,15 @@
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;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;

import javax.annotation.Nonnull;
import java.util.Random;

public abstract class BlockGregWoodSlab extends BlockSlab {

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit d1b5522

Please sign in to comment.