Fixed crash when apple saplings are destroyed

This commit is contained in:
Sollace 2019-02-05 11:32:17 +02:00
parent cfc78f2f32
commit 765d647018

View file

@ -8,6 +8,7 @@ import javax.annotation.Nullable;
import com.google.common.collect.ImmutableMap;
import net.minecraft.block.Block;
import net.minecraft.block.BlockPlanks;
import net.minecraft.block.BlockSapling;
import net.minecraft.block.SoundType;
import net.minecraft.block.properties.IProperty;
@ -132,6 +133,17 @@ public class USapling extends BlockSapling implements ITreeGen {
return other.getBlock() == this;
}
@Deprecated
@Override
public boolean isTypeAt(World world, BlockPos pos, BlockPlanks.EnumType type) {
return world.getBlockState(pos).getBlock() == this;
}
@Override
public int damageDropped(IBlockState state) {
return 0;
}
@Override
public IBlockState getStateFromMeta(int meta) {
return getDefaultState().withProperty(STAGE, (meta & 8) >> 3);