Reduce merge conflicts with shader-sanity

This commit is contained in:
Jozufozu 2022-01-07 11:50:01 -08:00
parent e4182a7f1e
commit 01fb788fa3
5 changed files with 5 additions and 4 deletions

1
.gitignore vendored
View file

@ -4,6 +4,7 @@ run/
.gradle/ .gradle/
build/ build/
gradle-app.setting gradle-app.setting
out/
## IntelliJ IDEA ## IntelliJ IDEA

View file

@ -62,7 +62,7 @@ public class FileResolution {
* Called after all files are loaded. If we can't find the file here, it doesn't exist. * Called after all files are loaded. If we can't find the file here, it doesn't exist.
* </p> * </p>
*/ */
void resolve(SourceHolder sources) { void resolve(SourceFinder sources) {
try { try {
file = sources.findSource(fileLoc); file = sources.findSource(fileLoc);

View file

@ -28,7 +28,7 @@ public class Resolver {
/** /**
* Try and resolve all referenced source files, printing errors if any aren't found. * Try and resolve all referenced source files, printing errors if any aren't found.
*/ */
public void resolve(SourceHolder sources) { public void resolve(SourceFinder sources) {
for (FileResolution resolution : resolutions.values()) { for (FileResolution resolution : resolutions.values()) {
resolution.resolve(sources); resolution.resolve(sources);
} }

View file

@ -17,7 +17,7 @@ import net.minecraft.server.packs.resources.ResourceManager;
/** /**
* The main object for loading and parsing source files. * The main object for loading and parsing source files.
*/ */
public class ShaderSources implements SourceHolder { public class ShaderSources implements SourceFinder {
public static final String SHADER_DIR = "flywheel/shaders/"; public static final String SHADER_DIR = "flywheel/shaders/";
public static final ArrayList<String> EXTENSIONS = Lists.newArrayList(".vert", ".vsh", ".frag", ".fsh", ".glsl"); public static final ArrayList<String> EXTENSIONS = Lists.newArrayList(".vert", ".vsh", ".frag", ".fsh", ".glsl");

View file

@ -6,7 +6,7 @@ import net.minecraft.resources.ResourceLocation;
* A minimal source file lookup function. * A minimal source file lookup function.
*/ */
@FunctionalInterface @FunctionalInterface
public interface SourceHolder { public interface SourceFinder {
SourceFile findSource(ResourceLocation name); SourceFile findSource(ResourceLocation name);
} }