Skip to content

Commit

Permalink
fix ccl ref + clean up + fix pattern widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Yefancy committed May 17, 2022
1 parent 8387d21 commit 27ff0cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/cleanroommc/multiblocked/util/JsonUtil.java
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit 27ff0cf

Please sign in to comment.