// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.builtin.portals.utils;

import com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType;

public final class BlockTypeUtils
{
    private BlockTypeUtils() {
    }
    
    public static BlockType getBlockForState(final BlockType blockType, final String state) {
        final String baseKey = blockType.getDefaultStateKey();
        final BlockType baseBlock = (baseKey == null) ? blockType : BlockType.getAssetMap().getAsset(baseKey);
        if ("default".equals(state)) {
            return baseBlock;
        }
        return baseBlock.getBlockForState(state);
    }
}
