Switch core to 1.14 (generated via ./gradlew :1.14:setCoreVersion)

This commit is contained in:
Jonas Herzig
2019-05-10 14:09:22 +02:00
parent 7f7d33def8
commit 7cbf7f7c94
183 changed files with 3250 additions and 3250 deletions

View File

@@ -1,7 +1,7 @@
package com.replaymod.render.shader;
import com.replaymod.core.versions.MCVer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Identifier;
import org.apache.commons.io.IOUtils;
import org.lwjgl.opengl.ARBFragmentShader;
import org.lwjgl.opengl.ARBShaderObjects;
@@ -9,7 +9,7 @@ import org.lwjgl.opengl.ARBVertexShader;
import org.lwjgl.opengl.GL11;
//#if MC>=11300
import net.minecraft.resources.IResource;
import net.minecraft.resource.Resource;
//#else
//$$ import net.minecraft.client.resources.IResource;
//#endif
@@ -21,7 +21,7 @@ import static org.lwjgl.opengl.ARBShaderObjects.*;
public class Program {
private final int program;
public Program(ResourceLocation vertexShader, ResourceLocation fragmentShader) throws Exception {
public Program(Identifier vertexShader, Identifier fragmentShader) throws Exception {
int vertShader = createShader(vertexShader, ARBVertexShader.GL_VERTEX_SHADER_ARB);
int fragShader = createShader(fragmentShader, ARBFragmentShader.GL_FRAGMENT_SHADER_ARB);
@@ -44,7 +44,7 @@ public class Program {
}
}
private int createShader(ResourceLocation resourceLocation, int shaderType) throws Exception {
private int createShader(Identifier resourceLocation, int shaderType) throws Exception {
int shader = 0;
try {
shader = glCreateShaderObjectARB(shaderType);
@@ -52,7 +52,7 @@ public class Program {
if(shader == 0)
throw new Exception("glCreateShaderObjectARB failed");
IResource resource = MCVer.getMinecraft().getResourceManager().getResource(resourceLocation);
Resource resource = MCVer.getMinecraft().getResourceManager().getResource(resourceLocation);
try (InputStream is = resource.getInputStream()) {
glShaderSourceARB(shader, IOUtils.toString(is));
}