Flywheel/src/main/java/com/jozufozu/flywheel/backend/ResourceUtil.java
Jozsef f615825846 Pre-port tasks I
- Rename Client to FlywheelClient
 - Remove Shadow plugin
 - Remove generated source set
 - Remove unused properties in gradle.properties
 - Organize all imports
 - Thanks for the list pepper!
2021-06-30 12:43:54 -07:00

20 lines
715 B
Java

package com.jozufozu.flywheel.backend;
import net.minecraft.util.ResourceLocation;
public class ResourceUtil {
public static ResourceLocation subPath(ResourceLocation root, String subPath) {
return new ResourceLocation(root.getNamespace(), root.getPath() + subPath);
}
public static ResourceLocation removePrefixUnchecked(ResourceLocation full, String root) {
return new ResourceLocation(full.getNamespace(), full.getPath()
.substring(root.length()));
}
public static ResourceLocation trim(ResourceLocation loc, String prefix, String suffix) {
String path = loc.getPath();
return new ResourceLocation(loc.getNamespace(), path.substring(prefix.length(), path.length() - suffix.length()));
}
}