Java Code Examples for net.minecraft.util.Identifier#getPath()

The following examples show how to use net.minecraft.util.Identifier#getPath() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NBTSerializableValue.java    From fabric-carpet with MIT License 5 votes vote down vote up
public static String nameFromRegistryId(Identifier id)
{
    if (id == null) // should be Value.NULL
        return "";
    if (id.getNamespace().equals("minecraft"))
        return id.getPath();
    return id.toString();
}
 
Example 2
Source File: ExistingFileHelper.java    From patchwork-api with GNU Lesser General Public License v2.1 4 votes vote down vote up
private Identifier getLocation(Identifier base, String suffix, String prefix) {
	return new Identifier(base.getNamespace(), prefix + "/" + base.getPath() + suffix);
}
 
Example 3
Source File: NpcClothingFeature.java    From MineLittlePony with MIT License 4 votes vote down vote up
public Identifier findTexture(String category, Identifier identifier) {
    return new Identifier("minelittlepony", "textures/entity/" + entityType + "/" + category + "/" + identifier.getPath() + ".png");
}