mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 11:19:28 +00:00
Fix #1213 decorative leaf hardness and shear drop issues
This commit is contained in:
1 parent
238d33d37a
commit
3f2afa7bcb
1 file changed
+4
-16
@@ -2,7 +2,6 @@ package forestry.arboriculture.blocks;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -24,7 +23,6 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.common.IShearable;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -39,7 +37,7 @@ import forestry.arboriculture.genetics.TreeDefinition;
|
||||
import forestry.core.blocks.IColoredBlock;
|
||||
import forestry.core.proxy.Proxies;
|
||||
|
||||
public abstract class BlockDecorativeLeaves extends Block implements IShearable, IItemModelRegister, IColoredBlock {
|
||||
public abstract class BlockDecorativeLeaves extends Block implements IItemModelRegister, IColoredBlock {
|
||||
private static final int VARIANTS_PER_BLOCK = 16;
|
||||
private static final int VARIANTS_META_MASK = VARIANTS_PER_BLOCK - 1;
|
||||
|
||||
@@ -66,7 +64,9 @@ public abstract class BlockDecorativeLeaves extends Block implements IShearable,
|
||||
super(Material.LEAVES);
|
||||
this.blockNumber = blockNumber;
|
||||
this.setCreativeTab(Tabs.tabArboriculture);
|
||||
setSoundType(SoundType.PLANT);
|
||||
this.setHardness(0.2F);
|
||||
this.setLightOpacity(1);
|
||||
this.setSoundType(SoundType.PLANT);
|
||||
}
|
||||
|
||||
public int getBlockNumber() {
|
||||
@@ -91,18 +91,6 @@ public abstract class BlockDecorativeLeaves extends Block implements IShearable,
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> onSheared(ItemStack item, IBlockAccess world, BlockPos pos, int fortune) {
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
int meta = getMetaFromState(state);
|
||||
return Collections.singletonList(new ItemStack(this, 1, meta));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos) {
|
||||
TreeDefinition treeDefinition = blockState.getValue(getVariant());
|
||||
|
||||
Reference in new issue
Block a user