Package com.khorn.terraincontrol.util.minecraftTypes

Examples of com.khorn.terraincontrol.util.minecraftTypes.DefaultMaterial


        Block block = Block.b(blockName);
        if (block != null)
        {
            return BukkitMaterialData.ofMinecraftBlock(block, blockData);
        }
        DefaultMaterial defaultMaterial = DefaultMaterial.getMaterial(blockName);
        if (defaultMaterial != DefaultMaterial.UNKNOWN_BLOCK)
        {
            return BukkitMaterialData.ofDefaultMaterial(defaultMaterial, blockData);
        }
View Full Code Here


        net.minecraft.block.Block block = net.minecraft.block.Block.getBlockFromName(blockName);
        if (block != null)
        {
            return ForgeMaterialData.ofMinecraftBlock(block, blockData);
        }
        DefaultMaterial defaultMaterial = DefaultMaterial.getMaterial(blockName);
        if (defaultMaterial != DefaultMaterial.UNKNOWN_BLOCK)
        {
            return ForgeMaterialData.ofDefaultMaterial(defaultMaterial, blockData);
        }
View Full Code Here

    }

    @Override
    public String getName()
    {
        DefaultMaterial defaultMaterial = toDefaultMaterial();
        if (defaultMaterial == DefaultMaterial.UNKNOWN_BLOCK)
        {
            // Use Minecraft's name
            if (data != 0)
            {
                return Block.REGISTRY.c(block) + ":" + data;
            }
            return Block.REGISTRY.c(block);
        } else
        {
            // Use our name
            if (data != 0)
            {
                return defaultMaterial.name() + ":" + data;
            }
            return defaultMaterial.name();
        }
    }
View Full Code Here

    @Override
    public boolean isSolid()
    {
        // Let us override whether materials are solid
        DefaultMaterial defaultMaterial = toDefaultMaterial();
        if (defaultMaterial != DefaultMaterial.UNKNOWN_BLOCK)
        {
            return defaultMaterial.isSolid();
        }

        return block.getMaterial().isSolid();
    }
View Full Code Here

    @Override
    public LocalMaterialData rotate()
    {
        // Try to rotate
        DefaultMaterial defaultMaterial = toDefaultMaterial();
        if (defaultMaterial != DefaultMaterial.UNKNOWN_BLOCK)
        {
            // We only know how to rotate vanilla blocks
            int newData = BlockHelper.rotateData(defaultMaterial, data);
            if (newData != data)
View Full Code Here

    }

    @Override
    public String getName()
    {
        DefaultMaterial defaultMaterial = toDefaultMaterial();
        if (defaultMaterial == DefaultMaterial.UNKNOWN_BLOCK)
        {
            // Use Minecraft's name
            if (data != 0)
            {
                return Block.blockRegistry.getNameForObject(block) + ":" + data;
            }
            return Block.blockRegistry.getNameForObject(block);
        } else
        {
            // Use our name
            if (data != 0)
            {
                return defaultMaterial.name() + ":" + data;
            }
            return defaultMaterial.name();
        }
    }
View Full Code Here

    @Override
    public boolean isSolid()
    {
        // Let us override whether materials are solid
        DefaultMaterial defaultMaterial = toDefaultMaterial();
        if (defaultMaterial != DefaultMaterial.UNKNOWN_BLOCK)
        {
            return defaultMaterial.isSolid();
        }

        return block.getMaterial().isSolid();
    }
View Full Code Here

    @Override
    public LocalMaterialData rotate()
    {
        // Try to rotate
        DefaultMaterial defaultMaterial = toDefaultMaterial();
        if (defaultMaterial != DefaultMaterial.UNKNOWN_BLOCK)
        {
            // We only know how to rotate vanilla blocks
            int newData = BlockHelper.rotateData(defaultMaterial, data);
            if (newData != data)
View Full Code Here

TOP

Related Classes of com.khorn.terraincontrol.util.minecraftTypes.DefaultMaterial

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.