mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-01-13 07:46:07 +01:00
Reduce merge conflicts with shader-sanity
This commit is contained in:
parent
e4182a7f1e
commit
01fb788fa3
5 changed files with 5 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,6 +4,7 @@ run/
|
||||||
.gradle/
|
.gradle/
|
||||||
build/
|
build/
|
||||||
gradle-app.setting
|
gradle-app.setting
|
||||||
|
out/
|
||||||
|
|
||||||
## IntelliJ IDEA
|
## IntelliJ IDEA
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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");
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
Loading…
Reference in a new issue