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;
import javax.annotation.Nonnull;
import com.jozufozu.flywheel.core.compile.ShaderConstants;
import com.jozufozu.flywheel.core.shader.GameStateProvider;
import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.KineticDebugger;
import net.minecraft.resources.ResourceLocation;
public class RainbowDebugStateProvider implements GameStateProvider {
public static final RainbowDebugStateProvider INSTANCE = new RainbowDebugStateProvider();
public enum RainbowDebugStateProvider implements GameStateProvider {
INSTANCE;
public static final ResourceLocation NAME = Create.asResource("rainbow_debug");
protected RainbowDebugStateProvider() {
}
@Override
public boolean isTrue() {
return KineticDebugger.isActive();
}
@Nonnull
@Override
public ResourceLocation getID() {
return NAME;
}
@Override
public void alterConstants(@Nonnull ShaderConstants constants) {
constants.define("DEBUG_RAINBOW");
}
}

View file

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

View file

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

View file

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

View file

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