From fd68dc1c1e601d5821d2c92fedea12122f8c8f28 Mon Sep 17 00:00:00 2001 From: +merlan #flirora Date: Sat, 11 Nov 2023 15:05:05 -0500 Subject: [PATCH] Rename some classes --- .../{FabricShaderProgram.java => FabricShader.java} | 4 ++-- .../client/rendering/shader/GameRendererMixin.java | 4 ++-- ...essorMixin.java => ShaderImportProcessorMixin.java} | 6 +++--- .../{ShaderProgramMixin.java => ShaderMixin.java} | 10 +++++----- .../client/resources/fabric-rendering-v1.mixins.json | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) rename fabric-rendering-v1/src/client/java/net/fabricmc/fabric/impl/client/rendering/{FabricShaderProgram.java => FabricShader.java} (90%) rename fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/{ShaderProgramImportProcessorMixin.java => ShaderImportProcessorMixin.java} (91%) rename fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/{ShaderProgramMixin.java => ShaderMixin.java} (87%) diff --git a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/impl/client/rendering/FabricShaderProgram.java b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/impl/client/rendering/FabricShader.java similarity index 90% rename from fabric-rendering-v1/src/client/java/net/fabricmc/fabric/impl/client/rendering/FabricShaderProgram.java rename to fabric-rendering-v1/src/client/java/net/fabricmc/fabric/impl/client/rendering/FabricShader.java index dab5a09de7..0758190116 100644 --- a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/impl/client/rendering/FabricShaderProgram.java +++ b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/impl/client/rendering/FabricShader.java @@ -23,8 +23,8 @@ import net.minecraft.resource.ResourceFactory; import net.minecraft.util.Identifier; -public final class FabricShaderProgram extends Shader { - public FabricShaderProgram(ResourceFactory factory, Identifier name, VertexFormat format) throws IOException { +public final class FabricShader extends Shader { + public FabricShader(ResourceFactory factory, Identifier name, VertexFormat format) throws IOException { super(factory, name.toString(), format); } diff --git a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/GameRendererMixin.java b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/GameRendererMixin.java index 79c44f6265..dc48bf171f 100644 --- a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/GameRendererMixin.java +++ b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/GameRendererMixin.java @@ -33,7 +33,7 @@ import net.minecraft.resource.ResourceManager; import net.fabricmc.fabric.api.client.rendering.v1.CoreShaderRegistrationCallback; -import net.fabricmc.fabric.impl.client.rendering.FabricShaderProgram; +import net.fabricmc.fabric.impl.client.rendering.FabricShader; /** * Implements custom core shader registration (CoreShaderRegistrationCallback). @@ -48,7 +48,7 @@ abstract class GameRendererMixin { ) private void registerShaders(ResourceManager factory, CallbackInfo info, List shaderStages, List>> programs) throws IOException { CoreShaderRegistrationCallback.RegistrationContext context = (id, vertexFormat, loadCallback) -> { - Shader program = new FabricShaderProgram(factory, id, vertexFormat); + Shader program = new FabricShader(factory, id, vertexFormat); programs.add(Pair.of(program, loadCallback)); }; CoreShaderRegistrationCallback.EVENT.invoker().registerShaders(context); diff --git a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/ShaderProgramImportProcessorMixin.java b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/ShaderImportProcessorMixin.java similarity index 91% rename from fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/ShaderProgramImportProcessorMixin.java rename to fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/ShaderImportProcessorMixin.java index a252f3b8dd..f1f3ba542f 100644 --- a/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/ShaderProgramImportProcessorMixin.java +++ b/fabric-rendering-v1/src/client/java/net/fabricmc/fabric/mixin/client/rendering/shader/ShaderImportProcessorMixin.java @@ -25,14 +25,14 @@ import net.minecraft.util.Identifier; -import net.fabricmc.fabric.impl.client.rendering.FabricShaderProgram; +import net.fabricmc.fabric.impl.client.rendering.FabricShader; /** * Lets modded shaders {@code #moj_import} shaders from any namespace with the * {@code <>} syntax. */ @Mixin(targets = "net.minecraft.client.render.Shader$1") -abstract class ShaderProgramImportProcessorMixin { +abstract class ShaderImportProcessorMixin { @Unique private String capturedImport; @@ -44,7 +44,7 @@ private void captureImport(boolean inline, String name, CallbackInfoReturnable