Package org.terasology.asset

Examples of org.terasology.asset.AssetType


        if (relativePath.getNameCount() > 1) {
            Path assetPath = relativePath.subpath(0, 1);
            Path filename = relativePath.getFileName();
            String extension = Files.getFileExtension(filename.toString());
            String nameOnly = filename.toString().substring(0, filename.toString().length() - extension.length() - 1);
            AssetType assetType = AssetType.getTypeFor(assetPath.toString(), extension);
            if (assetType != null) {
                return assetType.getUri(moduleId, nameOnly);
            }
        }
        return null;
    }
View Full Code Here


            }
            int extensionSeparator = parts[1].lastIndexOf(".");
            if (extensionSeparator != -1) {
                String name = parts[1].substring(0, extensionSeparator);
                String extension = parts[1].substring(extensionSeparator + 1);
                AssetType assetType = AssetType.getTypeFor(parts[0], extension);
                if (assetType != null) {
                    return assetType.getUri(moduleId, name);
                }
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.terasology.asset.AssetType

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.