Remove "states" field from program jsons

This commit is contained in:
Jozufozu 2022-01-12 00:20:45 -08:00
parent 88d8d24663
commit 74a147db30
5 changed files with 15 additions and 43 deletions

View file

@ -1,27 +1,31 @@
package com.simibubi.create.foundation.render; package com.simibubi.create.foundation.render;
import javax.annotation.Nonnull;
import com.jozufozu.flywheel.core.compile.ShaderConstants;
import com.jozufozu.flywheel.core.shader.GameStateProvider; import com.jozufozu.flywheel.core.shader.GameStateProvider;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.content.contraptions.KineticDebugger;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
public class RainbowDebugStateProvider implements GameStateProvider { public enum RainbowDebugStateProvider implements GameStateProvider {
INSTANCE;
public static final RainbowDebugStateProvider INSTANCE = new RainbowDebugStateProvider();
public static final ResourceLocation NAME = Create.asResource("rainbow_debug"); public static final ResourceLocation NAME = Create.asResource("rainbow_debug");
protected RainbowDebugStateProvider() {
}
@Override @Override
public boolean isTrue() { public boolean isTrue() {
return KineticDebugger.isActive(); return KineticDebugger.isActive();
} }
@Nonnull
@Override @Override
public ResourceLocation getID() { public ResourceLocation getID() {
return NAME; return NAME;
} }
@Override
public void alterConstants(@Nonnull ShaderConstants constants) {
constants.define("DEBUG_RAINBOW");
}
} }

View file

@ -1,14 +1,4 @@
{ {
"vertex": "create:belt.vert", "vertex": "create:belt.vert",
"fragment": "flywheel:block.frag", "fragment": "flywheel:block.frag"
"states": [
{
"when": "create:rainbow_debug",
"define": "DEBUG_RAINBOW"
},
{
"when": "flywheel:normal_debug",
"define": "DEBUG_NORMAL"
}
]
} }

View file

@ -1,10 +1,4 @@
{ {
"vertex": "create:contraption_actor.vert", "vertex": "create:contraption_actor.vert",
"fragment": "flywheel:block.frag", "fragment": "flywheel:block.frag"
"states": [
{
"when": "flywheel:normal_debug",
"define": "DEBUG_NORMAL"
}
]
} }

View file

@ -1,10 +1,4 @@
{ {
"vertex": "create:flap.vert", "vertex": "create:flap.vert",
"fragment": "flywheel:block.frag", "fragment": "flywheel:block.frag"
"states": [
{
"when": "flywheel:normal_debug",
"define": "DEBUG_NORMAL"
}
]
} }

View file

@ -1,14 +1,4 @@
{ {
"vertex": "create:rotating.vert", "vertex": "create:rotating.vert",
"fragment": "flywheel:block.frag", "fragment": "flywheel:block.frag"
"states": [
{
"when": "create:rainbow_debug",
"define": "DEBUG_RAINBOW"
},
{
"when": "flywheel:normal_debug",
"define": "DEBUG_NORMAL"
}
]
} }