mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-12 03:47:33 +00:00
20 lines
636 B
Java
20 lines
636 B
Java
package customskinloader.fake.itf;
|
|||
|
|
|
||
|
|
import java.io.IOException;
|
||
|
|
import java.util.Optional;
|
||
|
|
|
||
|
|
import net.minecraft.client.resources.IResourceManager;
|
||
|
|
import net.minecraft.resources.IResource;
|
||
|
|
import net.minecraft.util.ResourceLocation;
|
||
|
|
|
||
|
|
public interface IFakeIResourceManager {
|
||
|
|
// 1.13.2 ~ 22w13a
|
||
|
|
default IResource func_199002_a(ResourceLocation location) throws IOException {
|
||
|
|
return (IResource) ((IResourceManager) this).getResource(location);
|
||
|
|
}
|
||
|
|
|
||
|
|
// 22w14a+
|
||
|
|
default Optional getResource(ResourceLocation location) throws IOException {
|
||
|
|
return Optional.ofNullable(this.func_199002_a(location));
|
||
|
|
}
|
||
|
|
}
|