Search in sources :

Example 1 with BlockNewLog

use of net.minecraft.block.BlockNewLog in project SpongeCommon by SpongePowered.

the class MixinBlockLog method getTreeData.

protected ImmutableTreeData getTreeData(IBlockState blockState) {
    BlockPlanks.EnumType type;
    if (blockState.getBlock() instanceof BlockOldLog) {
        type = blockState.getValue(BlockOldLog.VARIANT);
    } else if (blockState.getBlock() instanceof BlockNewLog) {
        type = blockState.getValue(BlockNewLog.VARIANT);
    } else {
        type = BlockPlanks.EnumType.OAK;
    }
    final TreeType treeType = TreeTypeResolver.getFor(type);
    return ImmutableDataCachingUtil.getManipulator(ImmutableSpongeTreeData.class, treeType);
}
Also used : TreeType(org.spongepowered.api.data.type.TreeType) BlockOldLog(net.minecraft.block.BlockOldLog) BlockNewLog(net.minecraft.block.BlockNewLog) BlockPlanks(net.minecraft.block.BlockPlanks)

Aggregations

BlockNewLog (net.minecraft.block.BlockNewLog)1 BlockOldLog (net.minecraft.block.BlockOldLog)1 BlockPlanks (net.minecraft.block.BlockPlanks)1 TreeType (org.spongepowered.api.data.type.TreeType)1