From 01fb788fa3f6a1ada1f35073881f2bc7fc0bee5a Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Fri, 7 Jan 2022 11:50:01 -0800 Subject: [PATCH] Reduce merge conflicts with shader-sanity --- .gitignore | 1 + .../com/jozufozu/flywheel/backend/source/FileResolution.java | 2 +- .../java/com/jozufozu/flywheel/backend/source/Resolver.java | 2 +- .../com/jozufozu/flywheel/backend/source/ShaderSources.java | 2 +- .../backend/source/{SourceHolder.java => SourceFinder.java} | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) rename src/main/java/com/jozufozu/flywheel/backend/source/{SourceHolder.java => SourceFinder.java} (87%) diff --git a/.gitignore b/.gitignore index 0123b6707..fe6afb8ac 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ run/ .gradle/ build/ gradle-app.setting +out/ ## IntelliJ IDEA diff --git a/src/main/java/com/jozufozu/flywheel/backend/source/FileResolution.java b/src/main/java/com/jozufozu/flywheel/backend/source/FileResolution.java index 5d2d221ef..648d9def7 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/source/FileResolution.java +++ b/src/main/java/com/jozufozu/flywheel/backend/source/FileResolution.java @@ -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. *

*/ - void resolve(SourceHolder sources) { + void resolve(SourceFinder sources) { try { file = sources.findSource(fileLoc); diff --git a/src/main/java/com/jozufozu/flywheel/backend/source/Resolver.java b/src/main/java/com/jozufozu/flywheel/backend/source/Resolver.java index 4377d8496..202b7a94d 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/source/Resolver.java +++ b/src/main/java/com/jozufozu/flywheel/backend/source/Resolver.java @@ -28,7 +28,7 @@ public class Resolver { /** * 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()) { resolution.resolve(sources); } diff --git a/src/main/java/com/jozufozu/flywheel/backend/source/ShaderSources.java b/src/main/java/com/jozufozu/flywheel/backend/source/ShaderSources.java index be9ab9dfb..03a2b8401 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/source/ShaderSources.java +++ b/src/main/java/com/jozufozu/flywheel/backend/source/ShaderSources.java @@ -17,7 +17,7 @@ import net.minecraft.server.packs.resources.ResourceManager; /** * 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 ArrayList EXTENSIONS = Lists.newArrayList(".vert", ".vsh", ".frag", ".fsh", ".glsl"); diff --git a/src/main/java/com/jozufozu/flywheel/backend/source/SourceHolder.java b/src/main/java/com/jozufozu/flywheel/backend/source/SourceFinder.java similarity index 87% rename from src/main/java/com/jozufozu/flywheel/backend/source/SourceHolder.java rename to src/main/java/com/jozufozu/flywheel/backend/source/SourceFinder.java index 9d25cbaea..7dfa41ac3 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/source/SourceHolder.java +++ b/src/main/java/com/jozufozu/flywheel/backend/source/SourceFinder.java @@ -6,7 +6,7 @@ import net.minecraft.resources.ResourceLocation; * A minimal source file lookup function. */ @FunctionalInterface -public interface SourceHolder { +public interface SourceFinder { SourceFile findSource(ResourceLocation name); }