diff --git a/src/main/java/com/cleanroommc/multiblocked/api/pattern/JsonBlockPattern.java b/src/main/java/com/cleanroommc/multiblocked/api/pattern/JsonBlockPattern.java index 7f4131bf..cd37595a 100644 --- a/src/main/java/com/cleanroommc/multiblocked/api/pattern/JsonBlockPattern.java +++ b/src/main/java/com/cleanroommc/multiblocked/api/pattern/JsonBlockPattern.java @@ -31,6 +31,9 @@ public JsonBlockPattern() { structureDir = new RelativeDirection[] {RelativeDirection.LEFT, RelativeDirection.UP, RelativeDirection.FRONT}; predicates.put("any", SimplePredicate.ANY); predicates.put("air", SimplePredicate.AIR); + symbolMap.computeIfAbsent(' ', key -> new HashSet<>()).add("any"); // any + symbolMap.computeIfAbsent('-', key -> new HashSet<>()).add("air"); // air + symbolMap.computeIfAbsent('@', key -> new HashSet<>()).add("controller"); // controller } public JsonBlockPattern(World world, ResourceLocation location, BlockPos controllerPos, EnumFacing facing, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) { @@ -50,9 +53,6 @@ public JsonBlockPattern(World world, ResourceLocation location, BlockPos control aisleRepetition[0] = 1; aisleRepetition[1] = 1; } - symbolMap.computeIfAbsent(' ', key -> new HashSet<>()).add("any"); // any - symbolMap.computeIfAbsent('-', key -> new HashSet<>()).add("air"); // air - symbolMap.computeIfAbsent('@', key -> new HashSet<>()).add("controller"); // controller predicates.put("controller", new PredicateComponent(location)); // controller diff --git a/src/main/java/com/cleanroommc/multiblocked/client/shader/management/ShaderProgram.java b/src/main/java/com/cleanroommc/multiblocked/client/shader/management/ShaderProgram.java index c254e3e9..3257454e 100644 --- a/src/main/java/com/cleanroommc/multiblocked/client/shader/management/ShaderProgram.java +++ b/src/main/java/com/cleanroommc/multiblocked/client/shader/management/ShaderProgram.java @@ -1,6 +1,5 @@ package com.cleanroommc.multiblocked.client.shader.management; -import codechicken.lib.render.OpenGLUtils; import com.cleanroommc.multiblocked.client.shader.uniform.IUniformCallback; import com.cleanroommc.multiblocked.client.shader.uniform.UniformCache; import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet; @@ -48,7 +47,7 @@ public void use() { this.uniformCache.invalidate(); GL20.glLinkProgram(programId); if (GL20.glGetProgrami(programId, GL20.GL_LINK_STATUS) == 0) { - throw new RuntimeException(String.format("ShaderProgram validation has failed!\n%s", OpenGLUtils.glGetProgramInfoLog(programId))); + throw new RuntimeException(String.format("ShaderProgram validation has failed!\n%s", GL20.glGetProgramInfoLog(programId, GL20.glGetProgrami(programId, 35716)))); } this.unLinked = false; } diff --git a/src/main/java/com/cleanroommc/multiblocked/util/JsonUtil.java b/src/main/java/com/cleanroommc/multiblocked/util/JsonUtil.java index 07300376..5a0245f9 100644 --- a/src/main/java/com/cleanroommc/multiblocked/util/JsonUtil.java +++ b/src/main/java/com/cleanroommc/multiblocked/util/JsonUtil.java @@ -1,14 +1,11 @@ package com.cleanroommc.multiblocked.util; -import com.cleanroommc.multiblocked.api.capability.IO; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import java.lang.reflect.Array; -import java.util.Arrays; -import java.util.stream.Collectors; public class JsonUtil { public static int[] getIntArray(JsonElement array) {