diff --git a/src/main/java/com/jozufozu/flywheel/backend/Backend.java b/src/main/java/com/jozufozu/flywheel/backend/Backend.java
index 73fb81cad..5e577a590 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/Backend.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/Backend.java
@@ -20,16 +20,15 @@ import org.apache.logging.log4j.Logger;
import org.lwjgl.opengl.GL;
import org.lwjgl.opengl.GLCapabilities;
-import com.jozufozu.flywheel.backend.core.CrumblingRenderer;
-import com.jozufozu.flywheel.backend.core.WorldTileRenderer;
-import com.jozufozu.flywheel.backend.core.context.WorldContext;
-import com.jozufozu.flywheel.backend.core.shader.WorldProgram;
-import com.jozufozu.flywheel.backend.core.shader.spec.ProgramSpec;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.gl.versioned.GlCompat;
-import com.jozufozu.flywheel.backend.instancing.IFlywheelWorld;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
import com.jozufozu.flywheel.backend.instancing.MaterialSpec;
+import com.jozufozu.flywheel.core.CrumblingRenderer;
+import com.jozufozu.flywheel.core.WorldContext;
+import com.jozufozu.flywheel.core.WorldTileRenderer;
+import com.jozufozu.flywheel.core.shader.WorldProgram;
+import com.jozufozu.flywheel.core.shader.spec.ProgramSpec;
import com.jozufozu.flywheel.util.WorldAttached;
import com.simibubi.create.foundation.config.AllConfigs;
@@ -141,8 +140,11 @@ public class Backend {
return programSpecRegistry.get(name);
}
+ /**
+ * Used to avoid calling Flywheel functions on (fake) worlds that don't specifically support it.
+ */
public static boolean isFlywheelWorld(World world) {
- return world == Minecraft.getInstance().world || (world instanceof IFlywheelWorld && ((IFlywheelWorld) world).supportsFlywheel());
+ return (world instanceof IFlywheelWorld && ((IFlywheelWorld) world).supportsFlywheel()) || world == Minecraft.getInstance().world;
}
public static boolean available() {
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/IFlywheelWorld.java b/src/main/java/com/jozufozu/flywheel/backend/IFlywheelWorld.java
similarity index 61%
rename from src/main/java/com/jozufozu/flywheel/backend/instancing/IFlywheelWorld.java
rename to src/main/java/com/jozufozu/flywheel/backend/IFlywheelWorld.java
index 5a138fefc..52f1712ed 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/IFlywheelWorld.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/IFlywheelWorld.java
@@ -1,10 +1,10 @@
-package com.jozufozu.flywheel.backend.instancing;
+package com.jozufozu.flywheel.backend;
/**
* A marker interface custom worlds can override to indicate
* that tiles inside the world should render with Flywheel.
*
- * Minecraft.getInstance().world
will always support Flywheel.
+ * Minecraft.getInstance().world
is special cased and will support Flywheel by default.
*/
public interface IFlywheelWorld {
default boolean supportsFlywheel() {
diff --git a/src/main/java/com/jozufozu/flywheel/backend/ShaderContext.java b/src/main/java/com/jozufozu/flywheel/backend/ShaderContext.java
index 0a86e017a..e93aeae41 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/ShaderContext.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/ShaderContext.java
@@ -4,13 +4,13 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import com.jozufozu.flywheel.backend.core.shader.IMultiProgram;
-import com.jozufozu.flywheel.backend.core.shader.spec.ProgramSpec;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.gl.shader.ShaderType;
import com.jozufozu.flywheel.backend.loading.Program;
import com.jozufozu.flywheel.backend.loading.Shader;
import com.jozufozu.flywheel.backend.loading.ShaderTransformer;
+import com.jozufozu.flywheel.core.shader.IMultiProgram;
+import com.jozufozu.flywheel.core.shader.spec.ProgramSpec;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/ShaderLoader.java b/src/main/java/com/jozufozu/flywheel/backend/ShaderLoader.java
index 848b5943c..068c8ecb1 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/ShaderLoader.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/ShaderLoader.java
@@ -30,14 +30,14 @@ import com.google.common.collect.Lists;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
-import com.jozufozu.flywheel.backend.core.shader.spec.ProgramSpec;
-import com.jozufozu.flywheel.backend.core.shader.spec.SpecMetaRegistry;
import com.jozufozu.flywheel.backend.gl.GlObject;
import com.jozufozu.flywheel.backend.gl.shader.GlShader;
import com.jozufozu.flywheel.backend.gl.shader.ShaderType;
import com.jozufozu.flywheel.backend.loading.Program;
import com.jozufozu.flywheel.backend.loading.Shader;
import com.jozufozu.flywheel.backend.loading.ShaderLoadingException;
+import com.jozufozu.flywheel.core.shader.spec.ProgramSpec;
+import com.jozufozu.flywheel.core.shader.spec.SpecMetaRegistry;
import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.datafixers.util.Pair;
import com.mojang.serialization.DataResult;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/FirstNonnullMultiProgram.java b/src/main/java/com/jozufozu/flywheel/backend/core/FirstNonnullMultiProgram.java
deleted file mode 100644
index 1e7b441dd..000000000
--- a/src/main/java/com/jozufozu/flywheel/backend/core/FirstNonnullMultiProgram.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.jozufozu.flywheel.backend.core;
-
-import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
-
-public class FirstNonnullMultiProgram
{
-}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/IndexedModel.java b/src/main/java/com/jozufozu/flywheel/backend/core/IndexedModel.java
deleted file mode 100644
index cb76197d7..000000000
--- a/src/main/java/com/jozufozu/flywheel/backend/core/IndexedModel.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package com.jozufozu.flywheel.backend.core;
-
-import java.nio.ByteBuffer;
-
-import org.lwjgl.opengl.GL20;
-
-import com.jozufozu.flywheel.backend.gl.GlPrimitiveType;
-import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
-import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
-import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType;
-import com.jozufozu.flywheel.util.AttribUtil;
-
-public class IndexedModel extends BufferedModel {
-
- protected GlPrimitiveType eboIndexType;
- protected GlBuffer ebo;
-
- public IndexedModel(VertexFormat modelFormat, ByteBuffer buf, int vertices, ByteBuffer indices, GlPrimitiveType indexType) {
- super(modelFormat, buf, vertices);
-
- ebo = new GlBuffer(GlBufferType.ELEMENT_ARRAY_BUFFER);
- this.eboIndexType = indexType;
-
- int indicesSize = vertexCount * indexType.getSize();
-
- ebo.bind();
-
- ebo.alloc(indicesSize);
- ebo.getBuffer(0, indicesSize)
- .put(indices)
- .flush();
-
- ebo.unbind();
- }
-
- public void render() {
- vbo.bind();
- ebo.bind();
-
- AttribUtil.enableArrays(getAttributeCount());
- format.vertexAttribPointers(0);
-
- GL20.glDrawElements(GL20.GL_QUADS, vertexCount, eboIndexType.getGlConstant(), 0);
-
- AttribUtil.disableArrays(getAttributeCount());
-
- ebo.unbind();
- vbo.unbind();
- }
-
- @Override
- public void delete() {
- super.delete();
- ebo.delete();
- }
-}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/ShaderCallback.java b/src/main/java/com/jozufozu/flywheel/backend/core/shader/ShaderCallback.java
deleted file mode 100644
index 2bf2f5440..000000000
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/ShaderCallback.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package com.jozufozu.flywheel.backend.core.shader;
-
-import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
-
-/**
- * A Callback for when a shader is called. Used to define shader uniforms.
- */
-@FunctionalInterface
-public interface ShaderCallback
{
-
- void call(P program);
-
- default ShaderCallback
andThen(ShaderCallback
other) {
- return program -> {
- call(program);
- other.call(program);
- };
- }
-}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/GlPrimitiveType.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GlNumericType.java
similarity index 63%
rename from src/main/java/com/jozufozu/flywheel/backend/gl/GlPrimitiveType.java
rename to src/main/java/com/jozufozu/flywheel/backend/gl/GlNumericType.java
index 1737c6bd4..7a39b34b6 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/gl/GlPrimitiveType.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GlNumericType.java
@@ -13,27 +13,28 @@ import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
-public enum GlPrimitiveType {
+public enum GlNumericType {
FLOAT(4, "float", GL11.GL_FLOAT),
UBYTE(1, "ubyte", GL11.GL_UNSIGNED_BYTE),
BYTE(1, "byte", GL11.GL_BYTE),
USHORT(2, "ushort", GL11.GL_UNSIGNED_SHORT),
SHORT(2, "short", GL11.GL_SHORT),
UINT(4, "uint", GL11.GL_UNSIGNED_INT),
- INT(4, "int", GL11.GL_INT);
+ INT(4, "int", GL11.GL_INT),
+ ;
- private static final GlPrimitiveType[] VALUES = values();
- private static final Map NAME_LOOKUP = Arrays.stream(VALUES)
- .collect(Collectors.toMap(GlPrimitiveType::getDisplayName, type -> type));
+ private static final GlNumericType[] VALUES = values();
+ private static final Map NAME_LOOKUP = Arrays.stream(VALUES)
+ .collect(Collectors.toMap(GlNumericType::getDisplayName, type -> type));
private final int size;
private final String displayName;
- private final int glConstant;
+ private final int glEnum;
- GlPrimitiveType(int bytes, String name, int glEnum) {
+ GlNumericType(int bytes, String name, int glEnum) {
this.size = bytes;
this.displayName = name;
- this.glConstant = glEnum;
+ this.glEnum = glEnum;
}
public int getSize() {
@@ -44,12 +45,12 @@ public enum GlPrimitiveType {
return this.displayName;
}
- public int getGlConstant() {
- return this.glConstant;
+ public int getGlEnum() {
+ return this.glEnum;
}
@Nullable
- public static GlPrimitiveType byName(String name) {
+ public static GlNumericType byName(String name) {
return name == null ? null : NAME_LOOKUP.get(name.toLowerCase(Locale.ROOT));
}
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/GlPrimitive.java b/src/main/java/com/jozufozu/flywheel/backend/gl/GlPrimitive.java
new file mode 100644
index 000000000..71a8d5353
--- /dev/null
+++ b/src/main/java/com/jozufozu/flywheel/backend/gl/GlPrimitive.java
@@ -0,0 +1,23 @@
+package com.jozufozu.flywheel.backend.gl;
+
+import org.lwjgl.opengl.GL11;
+
+public enum GlPrimitive {
+ POINTS(GL11.GL_POINTS),
+ LINES(GL11.GL_LINES),
+ LINE_LOOP(GL11.GL_LINE_LOOP),
+ LINE_STRIP(GL11.GL_LINE_STRIP),
+ TRIANGLES(GL11.GL_TRIANGLES),
+ TRIANGLE_STRIP(GL11.GL_TRIANGLE_STRIP),
+ TRIANGLE_FAN(GL11.GL_TRIANGLE_FAN),
+ QUADS(GL11.GL_QUADS),
+ QUAD_STRIP(GL11.GL_QUAD_STRIP),
+ POLYGON(GL11.GL_POLYGON),
+ ;
+
+ public final int glEnum;
+
+ GlPrimitive(int glEnum) {
+ this.glEnum = glEnum;
+ }
+}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/CommonAttributes.java b/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/CommonAttributes.java
index 99f754efe..a1726fae0 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/CommonAttributes.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/CommonAttributes.java
@@ -1,21 +1,21 @@
package com.jozufozu.flywheel.backend.gl.attrib;
-import com.jozufozu.flywheel.backend.gl.GlPrimitiveType;
+import com.jozufozu.flywheel.backend.gl.GlNumericType;
public class CommonAttributes {
- public static final VertexAttribSpec VEC4 = new VertexAttribSpec(GlPrimitiveType.FLOAT, 4);
- public static final VertexAttribSpec VEC3 = new VertexAttribSpec(GlPrimitiveType.FLOAT, 3);
- public static final VertexAttribSpec VEC2 = new VertexAttribSpec(GlPrimitiveType.FLOAT, 2);
- public static final VertexAttribSpec FLOAT = new VertexAttribSpec(GlPrimitiveType.FLOAT, 1);
+ public static final VertexAttribSpec VEC4 = new VertexAttribSpec(GlNumericType.FLOAT, 4);
+ public static final VertexAttribSpec VEC3 = new VertexAttribSpec(GlNumericType.FLOAT, 3);
+ public static final VertexAttribSpec VEC2 = new VertexAttribSpec(GlNumericType.FLOAT, 2);
+ public static final VertexAttribSpec FLOAT = new VertexAttribSpec(GlNumericType.FLOAT, 1);
- public static final VertexAttribSpec QUATERNION = new VertexAttribSpec(GlPrimitiveType.FLOAT, 4);
- public static final VertexAttribSpec NORMAL = new VertexAttribSpec(GlPrimitiveType.BYTE, 3, true);
- public static final VertexAttribSpec UV = new VertexAttribSpec(GlPrimitiveType.FLOAT, 2);
+ public static final VertexAttribSpec QUATERNION = new VertexAttribSpec(GlNumericType.FLOAT, 4);
+ public static final VertexAttribSpec NORMAL = new VertexAttribSpec(GlNumericType.BYTE, 3, true);
+ public static final VertexAttribSpec UV = new VertexAttribSpec(GlNumericType.FLOAT, 2);
- public static final VertexAttribSpec RGBA = new VertexAttribSpec(GlPrimitiveType.UBYTE, 4, true);
- public static final VertexAttribSpec RGB = new VertexAttribSpec(GlPrimitiveType.UBYTE, 3, true);
- public static final VertexAttribSpec LIGHT = new VertexAttribSpec(GlPrimitiveType.UBYTE, 2, true);
+ public static final VertexAttribSpec RGBA = new VertexAttribSpec(GlNumericType.UBYTE, 4, true);
+ public static final VertexAttribSpec RGB = new VertexAttribSpec(GlNumericType.UBYTE, 3, true);
+ public static final VertexAttribSpec LIGHT = new VertexAttribSpec(GlNumericType.UBYTE, 2, true);
- public static final VertexAttribSpec NORMALIZED_BYTE = new VertexAttribSpec(GlPrimitiveType.BYTE, 1, true);
+ public static final VertexAttribSpec NORMALIZED_BYTE = new VertexAttribSpec(GlNumericType.BYTE, 1, true);
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/MatrixAttributes.java b/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/MatrixAttributes.java
index 86cf089aa..49b6731fe 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/MatrixAttributes.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/MatrixAttributes.java
@@ -2,7 +2,7 @@ package com.jozufozu.flywheel.backend.gl.attrib;
import org.lwjgl.opengl.GL20;
-import com.jozufozu.flywheel.backend.gl.GlPrimitiveType;
+import com.jozufozu.flywheel.backend.gl.GlNumericType;
public enum MatrixAttributes implements IAttribSpec {
MAT3(3, 3),
@@ -20,14 +20,14 @@ public enum MatrixAttributes implements IAttribSpec {
@Override
public void vertexAttribPointer(int stride, int index, int pointer) {
for (int i = 0; i < rows; i++) {
- long attribPointer = pointer + (long) i * cols * GlPrimitiveType.FLOAT.getSize();
- GL20.glVertexAttribPointer(index + i, cols, GlPrimitiveType.FLOAT.getGlConstant(), false, stride, attribPointer);
+ long attribPointer = pointer + (long) i * cols * GlNumericType.FLOAT.getSize();
+ GL20.glVertexAttribPointer(index + i, cols, GlNumericType.FLOAT.getGlEnum(), false, stride, attribPointer);
}
}
@Override
public int getSize() {
- return GlPrimitiveType.FLOAT.getSize() * rows * cols;
+ return GlNumericType.FLOAT.getSize() * rows * cols;
}
@Override
diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/VertexAttribSpec.java b/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/VertexAttribSpec.java
index 7717114ab..663ad8342 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/VertexAttribSpec.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/gl/attrib/VertexAttribSpec.java
@@ -2,21 +2,21 @@ package com.jozufozu.flywheel.backend.gl.attrib;
import org.lwjgl.opengl.GL20;
-import com.jozufozu.flywheel.backend.gl.GlPrimitiveType;
+import com.jozufozu.flywheel.backend.gl.GlNumericType;
public class VertexAttribSpec implements IAttribSpec {
- private final GlPrimitiveType type;
+ private final GlNumericType type;
private final int count;
private final int size;
private final int attributeCount;
private final boolean normalized;
- public VertexAttribSpec(GlPrimitiveType type, int count) {
+ public VertexAttribSpec(GlNumericType type, int count) {
this(type, count, false);
}
- public VertexAttribSpec(GlPrimitiveType type, int count, boolean normalized) {
+ public VertexAttribSpec(GlNumericType type, int count, boolean normalized) {
this.type = type;
this.count = count;
this.size = type.getSize() * count;
@@ -26,7 +26,7 @@ public class VertexAttribSpec implements IAttribSpec {
@Override
public void vertexAttribPointer(int stride, int index, int pointer) {
- GL20.glVertexAttribPointer(index, count, type.getGlConstant(), normalized, stride, pointer);
+ GL20.glVertexAttribPointer(index, count, type.getGlEnum(), normalized, stride, pointer);
}
@Override
diff --git a/src/main/java/com/jozufozu/flywheel/backend/gl/versioned/instancing/DrawInstanced.java b/src/main/java/com/jozufozu/flywheel/backend/gl/versioned/instancing/DrawInstanced.java
index e30ba9bfc..c2d73e0c4 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/gl/versioned/instancing/DrawInstanced.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/gl/versioned/instancing/DrawInstanced.java
@@ -5,6 +5,8 @@ import org.lwjgl.opengl.EXTDrawInstanced;
import org.lwjgl.opengl.GL31;
import org.lwjgl.opengl.GLCapabilities;
+import com.jozufozu.flywheel.backend.gl.GlNumericType;
+import com.jozufozu.flywheel.backend.gl.GlPrimitive;
import com.jozufozu.flywheel.backend.gl.versioned.GlVersioned;
public enum DrawInstanced implements GlVersioned {
@@ -15,8 +17,13 @@ public enum DrawInstanced implements GlVersioned {
}
@Override
- public void drawArraysInstanced(int mode, int first, int count, int primcount) {
- GL31.glDrawArraysInstanced(mode, first, count, primcount);
+ public void drawArraysInstanced(GlPrimitive mode, int first, int count, int primcount) {
+ GL31.glDrawArraysInstanced(mode.glEnum, first, count, primcount);
+ }
+
+ @Override
+ public void drawElementsInstanced(GlPrimitive mode, int elementCount, GlNumericType type, long indices, int primcount) {
+ GL31.glDrawElementsInstanced(mode.glEnum, elementCount, type.getGlEnum(), indices, primcount);
}
},
ARB_DRAW_INSTANCED {
@@ -26,8 +33,13 @@ public enum DrawInstanced implements GlVersioned {
}
@Override
- public void drawArraysInstanced(int mode, int first, int count, int primcount) {
- ARBDrawInstanced.glDrawArraysInstancedARB(mode, first, count, primcount);
+ public void drawArraysInstanced(GlPrimitive mode, int first, int count, int primcount) {
+ ARBDrawInstanced.glDrawArraysInstancedARB(mode.glEnum, first, count, primcount);
+ }
+
+ @Override
+ public void drawElementsInstanced(GlPrimitive mode, int elementCount, GlNumericType type, long indices, int primcount) {
+ ARBDrawInstanced.glDrawElementsInstancedARB(mode.glEnum, elementCount, type.getGlEnum(), indices, primcount);
}
},
EXT_DRAW_INSTANCED {
@@ -37,8 +49,13 @@ public enum DrawInstanced implements GlVersioned {
}
@Override
- public void drawArraysInstanced(int mode, int first, int count, int primcount) {
- EXTDrawInstanced.glDrawArraysInstancedEXT(mode, first, count, primcount);
+ public void drawArraysInstanced(GlPrimitive mode, int first, int count, int primcount) {
+ EXTDrawInstanced.glDrawArraysInstancedEXT(mode.glEnum, first, count, primcount);
+ }
+
+ @Override
+ public void drawElementsInstanced(GlPrimitive mode, int elementCount, GlNumericType type, long indices, int primcount) {
+ EXTDrawInstanced.glDrawElementsInstancedEXT(mode.glEnum, elementCount, type.getGlEnum(), indices, primcount);
}
},
UNSUPPORTED {
@@ -46,12 +63,14 @@ public enum DrawInstanced implements GlVersioned {
public boolean supported(GLCapabilities caps) {
return true;
}
-
- @Override
- public void drawArraysInstanced(int mode, int first, int count, int primcount) {
- throw new UnsupportedOperationException();
- }
};
- public abstract void drawArraysInstanced(int mode, int first, int count, int primcount);
+
+ public void drawArraysInstanced(GlPrimitive mode, int first, int count, int primcount) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void drawElementsInstanced(GlPrimitive mode, int elementCount, GlNumericType type, long indices, int primcount) {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/IInstance.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/IInstance.java
index 32bab42ab..8030ef77d 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/IInstance.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/IInstance.java
@@ -3,9 +3,8 @@ package com.jozufozu.flywheel.backend.instancing;
import net.minecraft.util.math.BlockPos;
/**
- * A general interface providing information about any type of thing that could use
- * Flywheel's instanced rendering. Right now, that's only {@link InstancedTileRenderer},
- * but there could be an entity equivalent in the future.
+ * A general interface providing information about any type of thing that could use Flywheel's instanced rendering.
+ * Right now, that's only {@link InstancedTileRenderer}, but there could be an entity equivalent in the future.
*/
public interface IInstance {
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/IInstanceFactory.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/IInstanceFactory.java
new file mode 100644
index 000000000..f2364392c
--- /dev/null
+++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/IInstanceFactory.java
@@ -0,0 +1,5 @@
+package com.jozufozu.flywheel.backend.instancing;
+
+public interface IInstanceFactory {
+ D create(Instancer super D> owner);
+}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/IInstanceRendered.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/IInstanceRendered.java
index b9494058c..bf5382e34 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/IInstanceRendered.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/IInstanceRendered.java
@@ -1,7 +1,14 @@
package com.jozufozu.flywheel.backend.instancing;
+/**
+ * Something (a TileEntity or Entity) that can be rendered using the instancing API.
+ */
public interface IInstanceRendered {
- default boolean shouldRenderAsTE() {
+
+ /**
+ * @return true if there are parts of the renderer that cannot be implemented with Flywheel.
+ */
+ default boolean shouldRenderNormally() {
return false;
}
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/ITickableInstance.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/ITickableInstance.java
index e660195c1..846ad7d8e 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/ITickableInstance.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/ITickableInstance.java
@@ -8,7 +8,7 @@ package com.jozufozu.flywheel.backend.instancing;
*
*
* You'd like to change something about the instance every now and then.
- * eg. adding or removing parts, snapping to a different rotation.
+ * eg. adding or removing parts, snapping to a different rotation, etc.
*
*
* Your TileEntity does animate, but the animation doesn't have
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceData.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceData.java
index 6776c6f56..cfd7b5c8f 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceData.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceData.java
@@ -4,12 +4,12 @@ import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
public abstract class InstanceData {
- protected final InstancedModel> owner;
+ protected final Instancer> owner;
boolean dirty;
boolean removed;
- protected InstanceData(InstancedModel> owner) {
+ protected InstanceData(Instancer> owner) {
this.owner = owner;
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceFactory.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceFactory.java
deleted file mode 100644
index 533b63af9..000000000
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstanceFactory.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package com.jozufozu.flywheel.backend.instancing;
-
-public interface InstanceFactory {
- D create(InstancedModel super D> owner);
-}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedTileRenderRegistry.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedTileRenderRegistry.java
index ff8a320fb..937315a89 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedTileRenderRegistry.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedTileRenderRegistry.java
@@ -10,7 +10,11 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
public class InstancedTileRenderRegistry {
- public static final InstancedTileRenderRegistry instance = new InstancedTileRenderRegistry();
+ private static final InstancedTileRenderRegistry INSTANCE = new InstancedTileRenderRegistry();
+
+ public static InstancedTileRenderRegistry getInstance() {
+ return INSTANCE;
+ }
private final Map, IRendererFactory>> renderers = Maps.newHashMap();
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedTileRenderer.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedTileRenderer.java
index 8101d291a..2bc74fbdc 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedTileRenderer.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedTileRenderer.java
@@ -8,14 +8,13 @@ import java.util.concurrent.ConcurrentHashMap;
import javax.annotation.Nullable;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.context.WorldContext;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
-import com.jozufozu.flywheel.backend.core.materials.OrientedData;
-import com.jozufozu.flywheel.backend.core.shader.ShaderCallback;
-import com.jozufozu.flywheel.backend.core.shader.WorldProgram;
+import com.jozufozu.flywheel.core.WorldContext;
+import com.jozufozu.flywheel.core.materials.ModelData;
+import com.jozufozu.flywheel.core.materials.OrientedData;
+import com.jozufozu.flywheel.core.shader.IProgramCallback;
+import com.jozufozu.flywheel.core.shader.WorldProgram;
import com.simibubi.create.foundation.render.AllMaterialSpecs;
-import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.tileentity.TileEntity;
@@ -130,7 +129,7 @@ public abstract class InstancedTileRenderer {
* @param viewProjection How do we get from camera space to clip space?
* @param callback Provide additional uniforms or state here.
*/
- public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ, ShaderCallback
callback) {
+ public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ, IProgramCallback
callback) {
for (RenderMaterial
material : materials.values()) {
material.render(layer, viewProjection, camX, camY, camZ, callback);
}
@@ -268,7 +267,7 @@ public abstract class InstancedTileRenderer
{
}
private TileEntityInstance super T> createInternal(T tile) {
- TileEntityInstance super T> renderer = InstancedTileRenderRegistry.instance.create(this, tile);
+ TileEntityInstance super T> renderer = InstancedTileRenderRegistry.getInstance().create(this, tile);
if (renderer != null) {
renderer.updateLight();
@@ -302,7 +301,7 @@ public abstract class InstancedTileRenderer {
if (world.isAirBlock(tile.getPos())) return false;
- if (world == Minecraft.getInstance().world) {
+ if (Backend.isFlywheelWorld(world)) {
BlockPos pos = tile.getPos();
IBlockReader existingChunk = world.getExistingChunk(pos.getX() >> 4, pos.getZ() >> 4);
@@ -310,6 +309,6 @@ public abstract class InstancedTileRenderer
{
return existingChunk != null;
}
- return world instanceof IFlywheelWorld && ((IFlywheelWorld) world).supportsFlywheel();
+ return false;
}
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedModel.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/Instancer.java
similarity index 92%
rename from src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedModel.java
rename to src/main/java/com/jozufozu/flywheel/backend/instancing/Instancer.java
index 69a46bfac..a7da0f4ef 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedModel.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/Instancer.java
@@ -4,25 +4,23 @@ package com.jozufozu.flywheel.backend.instancing;
import java.util.ArrayList;
import java.util.BitSet;
-import org.lwjgl.opengl.GL11;
-
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.BufferedModel;
import com.jozufozu.flywheel.backend.gl.GlVertexArray;
import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
+import com.jozufozu.flywheel.core.BufferedModel;
import com.jozufozu.flywheel.util.AttribUtil;
-public class InstancedModel {
+public class Instancer {
public final InstancedTileRenderer> renderer;
protected final BufferedModel model;
protected final VertexFormat instanceFormat;
- protected final InstanceFactory factory;
+ protected final IInstanceFactory factory;
protected GlVertexArray vao;
protected GlBuffer instanceVBO;
protected int glBufferSize = -1;
@@ -34,7 +32,7 @@ public class InstancedModel {
boolean anyToRemove;
boolean anyToUpdate;
- public InstancedModel(BufferedModel model, InstancedTileRenderer> renderer, VertexFormat instanceFormat, InstanceFactory factory) {
+ public Instancer(BufferedModel model, InstancedTileRenderer> renderer, VertexFormat instanceFormat, IInstanceFactory factory) {
this.model = model;
this.factory = factory;
this.instanceFormat = instanceFormat;
@@ -65,7 +63,7 @@ public class InstancedModel {
renderSetup();
if (glInstanceCount > 0)
- Backend.compat.drawInstanced.drawArraysInstanced(GL11.GL_QUADS, 0, model.getVertexCount(), glInstanceCount);
+ model.drawInstances(glInstanceCount);
vao.unbind();
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/MaterialSpec.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/MaterialSpec.java
index 7ff1dbcd4..c9b56277b 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/MaterialSpec.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/MaterialSpec.java
@@ -11,9 +11,9 @@ public class MaterialSpec {
private final ResourceLocation programSpec;
private final VertexFormat modelFormat;
private final VertexFormat instanceFormat;
- private final InstanceFactory instanceFactory;
+ private final IInstanceFactory instanceFactory;
- public MaterialSpec(ResourceLocation name, ResourceLocation programSpec, VertexFormat modelFormat, VertexFormat instanceFormat, InstanceFactory instanceFactory) {
+ public MaterialSpec(ResourceLocation name, ResourceLocation programSpec, VertexFormat modelFormat, VertexFormat instanceFormat, IInstanceFactory instanceFactory) {
this.name = name;
this.programSpec = programSpec;
this.modelFormat = modelFormat;
@@ -33,7 +33,7 @@ public class MaterialSpec {
return instanceFormat;
}
- public InstanceFactory getInstanceFactory() {
+ public IInstanceFactory getInstanceFactory() {
return instanceFactory;
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/RenderMaterial.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/RenderMaterial.java
index 0729eb6da..398e9491d 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/RenderMaterial.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/RenderMaterial.java
@@ -13,11 +13,12 @@ import org.lwjgl.opengl.GL11;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.jozufozu.flywheel.backend.RenderWork;
-import com.jozufozu.flywheel.backend.core.BufferedModel;
-import com.jozufozu.flywheel.backend.core.PartialModel;
-import com.jozufozu.flywheel.backend.core.shader.ShaderCallback;
-import com.jozufozu.flywheel.backend.core.shader.WorldProgram;
+import com.jozufozu.flywheel.backend.gl.GlPrimitive;
import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
+import com.jozufozu.flywheel.core.BufferedModel;
+import com.jozufozu.flywheel.core.PartialModel;
+import com.jozufozu.flywheel.core.shader.IProgramCallback;
+import com.jozufozu.flywheel.core.shader.WorldProgram;
import com.jozufozu.flywheel.util.BufferBuilderReader;
import com.jozufozu.flywheel.util.RenderUtil;
import com.jozufozu.flywheel.util.VirtualEmptyModelData;
@@ -39,7 +40,7 @@ import net.minecraft.util.math.vector.Matrix4f;
public class RenderMaterial {
protected final InstancedTileRenderer
renderer;
- protected final Cache> models;
+ protected final Cache> models;
protected final MaterialSpec spec;
public RenderMaterial(InstancedTileRenderer renderer, MaterialSpec spec) {
@@ -48,7 +49,7 @@ public class RenderMaterial {
this.models = CacheBuilder.newBuilder()
.removalListener(notification -> {
- InstancedModel> model = (InstancedModel>) notification.getValue();
+ Instancer> model = (Instancer>) notification.getValue();
RenderWork.enqueue(model::delete);
})
.build();
@@ -58,7 +59,7 @@ public class RenderMaterial
{
render(layer, projection, camX, camY, camZ, null);
}
- public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ, ShaderCallback
setup) {
+ public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ, IProgramCallback
setup) {
if (!(layer == RenderType.getCutoutMipped())) return;
P program = renderer.context.getProgram(this.spec.getProgramSpec());
@@ -77,33 +78,33 @@ public class RenderMaterial
{
}
protected void makeRenderCalls() {
- runOnAll(InstancedModel::render);
+ runOnAll(Instancer::render);
}
- public void runOnAll(Consumer> f) {
- for (InstancedModel model : models.asMap().values()) {
+ public void runOnAll(Consumer> f) {
+ for (Instancer model : models.asMap().values()) {
f.accept(model);
}
}
- public InstancedModel getModel(PartialModel partial, BlockState referenceState) {
+ public Instancer getModel(PartialModel partial, BlockState referenceState) {
return get(partial, () -> buildModel(partial.get(), referenceState));
}
- public InstancedModel getModel(PartialModel partial, BlockState referenceState, Direction dir) {
+ public Instancer getModel(PartialModel partial, BlockState referenceState, Direction dir) {
return getModel(partial, referenceState, dir, RenderUtil.rotateToFace(dir));
}
- public InstancedModel getModel(PartialModel partial, BlockState referenceState, Direction dir, Supplier modelTransform) {
+ public Instancer getModel(PartialModel partial, BlockState referenceState, Direction dir, Supplier modelTransform) {
return get(Pair.of(dir, partial),
() -> buildModel(partial.get(), referenceState, modelTransform.get()));
}
- public InstancedModel getModel(BlockState toRender) {
+ public Instancer getModel(BlockState toRender) {
return get(toRender, () -> buildModel(toRender));
}
- public InstancedModel get(Object key, Supplier> supplier) {
+ public Instancer get(Object key, Supplier> supplier) {
try {
return models.get(key, supplier::get);
} catch (ExecutionException e) {
@@ -112,16 +113,16 @@ public class RenderMaterial {
}
}
- private InstancedModel buildModel(BlockState renderedState) {
+ private Instancer buildModel(BlockState renderedState) {
BlockRendererDispatcher dispatcher = Minecraft.getInstance().getBlockRendererDispatcher();
return buildModel(dispatcher.getModelForState(renderedState), renderedState);
}
- private InstancedModel buildModel(IBakedModel model, BlockState renderedState) {
+ private Instancer buildModel(IBakedModel model, BlockState renderedState) {
return buildModel(model, renderedState, new MatrixStack());
}
- private InstancedModel buildModel(IBakedModel model, BlockState referenceState, MatrixStack ms) {
+ private Instancer buildModel(IBakedModel model, BlockState referenceState, MatrixStack ms) {
BufferBuilderReader reader = new BufferBuilderReader(getBufferBuilder(model, referenceState, ms));
VertexFormat format = spec.getModelFormat();
@@ -145,9 +146,9 @@ public class RenderMaterial {
to.rewind();
- BufferedModel bufferedModel = new BufferedModel(format, to, vertexCount);
+ BufferedModel bufferedModel = new BufferedModel(GlPrimitive.QUADS, format, to, vertexCount);
- return new InstancedModel<>(bufferedModel, renderer, spec.getInstanceFormat(), spec.getInstanceFactory());
+ return new Instancer<>(bufferedModel, renderer, spec.getInstanceFormat(), spec.getInstanceFactory());
}
private static final Direction[] dirs;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/TileEntityInstance.java b/src/main/java/com/jozufozu/flywheel/backend/instancing/TileEntityInstance.java
index bc7e8f4d2..713f909bb 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/TileEntityInstance.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/instancing/TileEntityInstance.java
@@ -3,9 +3,9 @@ package com.jozufozu.flywheel.backend.instancing;
import java.util.Arrays;
import java.util.stream.Stream;
-import com.jozufozu.flywheel.backend.core.materials.IFlatLight;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
-import com.jozufozu.flywheel.backend.core.materials.OrientedData;
+import com.jozufozu.flywheel.core.materials.IFlatLight;
+import com.jozufozu.flywheel.core.materials.ModelData;
+import com.jozufozu.flywheel.core.materials.OrientedData;
import net.minecraft.block.BlockState;
import net.minecraft.tileentity.TileEntity;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/light/CoordinateConsumer.java b/src/main/java/com/jozufozu/flywheel/backend/light/CoordinateConsumer.java
deleted file mode 100644
index f4fed3d9f..000000000
--- a/src/main/java/com/jozufozu/flywheel/backend/light/CoordinateConsumer.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.jozufozu.flywheel.backend.light;
-
-@FunctionalInterface
-public interface CoordinateConsumer {
- void consume(int x, int y, int z);
-}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/loading/ProcessingStage.java b/src/main/java/com/jozufozu/flywheel/backend/loading/IProcessingStage.java
similarity index 73%
rename from src/main/java/com/jozufozu/flywheel/backend/loading/ProcessingStage.java
rename to src/main/java/com/jozufozu/flywheel/backend/loading/IProcessingStage.java
index df4d44ba6..2a60aa8c2 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/loading/ProcessingStage.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/loading/IProcessingStage.java
@@ -1,7 +1,7 @@
package com.jozufozu.flywheel.backend.loading;
@FunctionalInterface
-public interface ProcessingStage {
+public interface IProcessingStage {
void process(Shader shader);
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/loading/LayoutTag.java b/src/main/java/com/jozufozu/flywheel/backend/loading/LayoutTag.java
index ca6ab3445..c7646e658 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/loading/LayoutTag.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/loading/LayoutTag.java
@@ -3,17 +3,17 @@ package com.jozufozu.flywheel.backend.loading;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import com.jozufozu.flywheel.backend.gl.GlPrimitiveType;
+import com.jozufozu.flywheel.backend.gl.GlNumericType;
public class LayoutTag {
public static final Pattern pattern = Pattern.compile("Layout\\((\\w+)(?:\\s*,\\s*(\\w*))?\\)");
- final GlPrimitiveType type;
+ final GlNumericType type;
final boolean normalized;
public LayoutTag(Matcher matcher) {
- type = GlPrimitiveType.byName(matcher.group(1));
+ type = GlNumericType.byName(matcher.group(1));
normalized = Boolean.parseBoolean(matcher.group(2));
}
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/loading/ProgramTemplate.java b/src/main/java/com/jozufozu/flywheel/backend/loading/ProgramTemplate.java
index df2859cd5..70c93ece9 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/loading/ProgramTemplate.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/loading/ProgramTemplate.java
@@ -6,7 +6,7 @@ import java.util.Map;
import com.jozufozu.flywheel.backend.ShaderLoader;
import com.jozufozu.flywheel.backend.gl.shader.ShaderType;
-public abstract class ProgramTemplate implements ProcessingStage {
+public abstract class ProgramTemplate implements IProcessingStage {
protected final ShaderLoader loader;
protected Map templates = new EnumMap<>(ShaderType.class);
diff --git a/src/main/java/com/jozufozu/flywheel/backend/loading/ShaderTransformer.java b/src/main/java/com/jozufozu/flywheel/backend/loading/ShaderTransformer.java
index 1eca0c1b3..4d156f8a7 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/loading/ShaderTransformer.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/loading/ShaderTransformer.java
@@ -4,12 +4,12 @@ import java.util.LinkedList;
public class ShaderTransformer {
- private final LinkedList stages = new LinkedList<>();
+ private final LinkedList stages = new LinkedList<>();
public ShaderTransformer() {
}
- public ShaderTransformer pushStage(ProcessingStage stage) {
+ public ShaderTransformer pushStage(IProcessingStage stage) {
if (stage != null) {
stages.addLast(stage);
}
@@ -21,7 +21,7 @@ public class ShaderTransformer {
return this;
}
- public ShaderTransformer prependStage(ProcessingStage stage) {
+ public ShaderTransformer prependStage(IProcessingStage stage) {
if (stage != null) {
stages.addFirst(stage);
}
@@ -30,7 +30,7 @@ public class ShaderTransformer {
public void transformSource(Shader shader) {
- for (ProcessingStage stage : this.stages) {
+ for (IProcessingStage stage : this.stages) {
stage.process(shader);
}
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/BufferedArrayModel.java b/src/main/java/com/jozufozu/flywheel/core/BufferedArrayModel.java
similarity index 76%
rename from src/main/java/com/jozufozu/flywheel/backend/core/BufferedArrayModel.java
rename to src/main/java/com/jozufozu/flywheel/core/BufferedArrayModel.java
index ef8fddee2..fcfff623a 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/BufferedArrayModel.java
+++ b/src/main/java/com/jozufozu/flywheel/core/BufferedArrayModel.java
@@ -1,10 +1,11 @@
-package com.jozufozu.flywheel.backend.core;
+package com.jozufozu.flywheel.core;
import java.nio.ByteBuffer;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL20;
+import com.jozufozu.flywheel.backend.gl.GlPrimitive;
import com.jozufozu.flywheel.backend.gl.GlVertexArray;
import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
import com.jozufozu.flywheel.util.AttribUtil;
@@ -13,8 +14,8 @@ public class BufferedArrayModel extends BufferedModel {
protected GlVertexArray vao;
- public BufferedArrayModel(VertexFormat format, ByteBuffer data, int vertices) {
- super(format, data, vertices);
+ public BufferedArrayModel(GlPrimitive primitiveMode, VertexFormat format, ByteBuffer data, int vertices) {
+ super(primitiveMode, format, data, vertices);
vao = new GlVertexArray();
@@ -23,14 +24,14 @@ public class BufferedArrayModel extends BufferedModel {
// bind the model's vbo to our vao
vbo.bind();
getFormat().vertexAttribPointers(0);
- vbo.unbind();
// enable all the attribute arrays in our vao. we only need to do this once
AttribUtil.enableArrays(getAttributeCount());
+ vbo.unbind();
vao.unbind();
}
- public void render() {
+ public void draw() {
if (vertexCount <= 0 || deleted) return;
vao.bind();
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/BufferedModel.java b/src/main/java/com/jozufozu/flywheel/core/BufferedModel.java
similarity index 64%
rename from src/main/java/com/jozufozu/flywheel/backend/core/BufferedModel.java
rename to src/main/java/com/jozufozu/flywheel/core/BufferedModel.java
index ab79726f8..bccd14cec 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/BufferedModel.java
+++ b/src/main/java/com/jozufozu/flywheel/core/BufferedModel.java
@@ -1,16 +1,11 @@
-package com.jozufozu.flywheel.backend.core;
+package com.jozufozu.flywheel.core;
-import static org.lwjgl.opengl.GL20.GL_COLOR_ARRAY;
-import static org.lwjgl.opengl.GL20.GL_INDEX_ARRAY;
-import static org.lwjgl.opengl.GL20.GL_NORMAL_ARRAY;
-import static org.lwjgl.opengl.GL20.GL_QUADS;
-import static org.lwjgl.opengl.GL20.GL_TEXTURE_COORD_ARRAY;
-import static org.lwjgl.opengl.GL20.GL_VERTEX_ARRAY;
-import static org.lwjgl.opengl.GL20.glDisableClientState;
import static org.lwjgl.opengl.GL20.glDrawArrays;
import java.nio.ByteBuffer;
+import com.jozufozu.flywheel.backend.Backend;
+import com.jozufozu.flywheel.backend.gl.GlPrimitive;
import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType;
@@ -18,13 +13,15 @@ import com.jozufozu.flywheel.util.AttribUtil;
public class BufferedModel {
+ protected final GlPrimitive primitiveMode;
protected final ByteBuffer data;
protected final VertexFormat format;
protected final int vertexCount;
protected GlBuffer vbo;
protected boolean deleted;
- public BufferedModel(VertexFormat format, ByteBuffer data, int vertices) {
+ public BufferedModel(GlPrimitive primitiveMode, VertexFormat format, ByteBuffer data, int vertices) {
+ this.primitiveMode = primitiveMode;
this.data = data;
this.format = format;
this.vertexCount = vertices;
@@ -61,28 +58,30 @@ public class BufferedModel {
/**
* Renders this model, checking first if there is anything to render.
*/
- public void render() {
+ public void draw() {
if (vertexCount <= 0 || deleted) return;
- // TODO: minecraft sometimes leaves its state dirty on launch. this is a hack
- glDisableClientState(GL_VERTEX_ARRAY);
- glDisableClientState(GL_NORMAL_ARRAY);
- glDisableClientState(GL_COLOR_ARRAY);
- glDisableClientState(GL_INDEX_ARRAY);
- glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-
vbo.bind();
AttribUtil.enableArrays(getAttributeCount());
format.vertexAttribPointers(0);
- glDrawArrays(GL_QUADS, 0, vertexCount);
+ glDrawArrays(primitiveMode.glEnum, 0, vertexCount);
AttribUtil.disableArrays(getAttributeCount());
vbo.unbind();
}
+ /**
+ * Draws many instances of this model, assuming the appropriate state is already bound.
+ */
+ public void drawInstances(int instanceCount) {
+ if (vertexCount <= 0 || deleted) return;
+
+ Backend.compat.drawInstanced.drawArraysInstanced(primitiveMode, 0, vertexCount, instanceCount);
+ }
+
public void delete() {
if (deleted) return;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/CrumblingProgram.java b/src/main/java/com/jozufozu/flywheel/core/CrumblingProgram.java
similarity index 77%
rename from src/main/java/com/jozufozu/flywheel/backend/core/CrumblingProgram.java
rename to src/main/java/com/jozufozu/flywheel/core/CrumblingProgram.java
index 1bdf177e9..dff507f42 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/CrumblingProgram.java
+++ b/src/main/java/com/jozufozu/flywheel/core/CrumblingProgram.java
@@ -1,12 +1,12 @@
-package com.jozufozu.flywheel.backend.core;
+package com.jozufozu.flywheel.core;
import static org.lwjgl.opengl.GL20.glUniform2f;
import java.util.List;
-import com.jozufozu.flywheel.backend.core.shader.WorldProgram;
-import com.jozufozu.flywheel.backend.core.shader.extension.IProgramExtension;
import com.jozufozu.flywheel.backend.loading.Program;
+import com.jozufozu.flywheel.core.shader.WorldProgram;
+import com.jozufozu.flywheel.core.shader.extension.IProgramExtension;
public class CrumblingProgram extends WorldProgram {
protected final int uTextureScale;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/CrumblingRenderer.java b/src/main/java/com/jozufozu/flywheel/core/CrumblingRenderer.java
similarity index 75%
rename from src/main/java/com/jozufozu/flywheel/backend/core/CrumblingRenderer.java
rename to src/main/java/com/jozufozu/flywheel/core/CrumblingRenderer.java
index 002540e27..3e88d32c7 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/CrumblingRenderer.java
+++ b/src/main/java/com/jozufozu/flywheel/core/CrumblingRenderer.java
@@ -1,6 +1,4 @@
-package com.jozufozu.flywheel.backend.core;
-
-import com.jozufozu.flywheel.backend.core.context.WorldContext;
+package com.jozufozu.flywheel.core;
import net.minecraft.util.math.BlockPos;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/FullscreenQuad.java b/src/main/java/com/jozufozu/flywheel/core/FullscreenQuad.java
similarity index 86%
rename from src/main/java/com/jozufozu/flywheel/backend/core/FullscreenQuad.java
rename to src/main/java/com/jozufozu/flywheel/core/FullscreenQuad.java
index d290e7e58..c22cae5b1 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/FullscreenQuad.java
+++ b/src/main/java/com/jozufozu/flywheel/core/FullscreenQuad.java
@@ -1,8 +1,8 @@
-package com.jozufozu.flywheel.backend.core;
+package com.jozufozu.flywheel.core;
import org.lwjgl.opengl.GL20;
-import com.jozufozu.flywheel.backend.gl.GlPrimitiveType;
+import com.jozufozu.flywheel.backend.gl.GlNumericType;
import com.jozufozu.flywheel.backend.gl.GlVertexArray;
import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType;
@@ -42,7 +42,7 @@ public class FullscreenQuad {
GL20.glEnableVertexAttribArray(0);
- GL20.glVertexAttribPointer(0, 4, GlPrimitiveType.FLOAT.getGlConstant(), false, 4 * 4, 0);
+ GL20.glVertexAttribPointer(0, 4, GlNumericType.FLOAT.getGlEnum(), false, 4 * 4, 0);
vao.unbind();
vbo.unbind();
diff --git a/src/main/java/com/jozufozu/flywheel/core/IndexedModel.java b/src/main/java/com/jozufozu/flywheel/core/IndexedModel.java
new file mode 100644
index 000000000..b909b4c30
--- /dev/null
+++ b/src/main/java/com/jozufozu/flywheel/core/IndexedModel.java
@@ -0,0 +1,69 @@
+package com.jozufozu.flywheel.core;
+
+import java.nio.ByteBuffer;
+
+import org.lwjgl.opengl.GL20;
+
+import com.jozufozu.flywheel.backend.Backend;
+import com.jozufozu.flywheel.backend.gl.GlNumericType;
+import com.jozufozu.flywheel.backend.gl.GlPrimitive;
+import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
+import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
+import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType;
+import com.jozufozu.flywheel.util.AttribUtil;
+
+public class IndexedModel extends BufferedModel {
+
+ protected int elementCount;
+ protected GlNumericType eboIndexType;
+ protected GlBuffer ebo;
+
+ public IndexedModel(GlPrimitive primitiveMode, VertexFormat modelFormat, ByteBuffer buf, int vertices, ByteBuffer indices, int elementCount, GlNumericType indexType) {
+ super(primitiveMode, modelFormat, buf, vertices);
+
+ this.ebo = new GlBuffer(GlBufferType.ELEMENT_ARRAY_BUFFER);
+ this.eboIndexType = indexType;
+ this.elementCount = elementCount;
+
+ int indicesSize = elementCount * indexType.getSize();
+
+ ebo.bind();
+
+ ebo.alloc(indicesSize);
+ ebo.getBuffer(0, indicesSize)
+ .put(indices)
+ .flush();
+
+ ebo.unbind();
+ }
+
+ public void draw() {
+ vbo.bind();
+ ebo.bind();
+
+ AttribUtil.enableArrays(getAttributeCount());
+ format.vertexAttribPointers(0);
+
+ GL20.glDrawElements(primitiveMode.glEnum, vertexCount, eboIndexType.getGlEnum(), 0);
+
+ AttribUtil.disableArrays(getAttributeCount());
+
+ ebo.unbind();
+ vbo.unbind();
+ }
+
+ @Override
+ public void drawInstances(int instanceCount) {
+ if (vertexCount <= 0 || deleted) return;
+
+ ebo.bind();
+ Backend.compat.drawInstanced.drawElementsInstanced(primitiveMode, 0, eboIndexType, 0, instanceCount);
+ ebo.unbind();
+ }
+
+ @Override
+ public void delete() {
+ super.delete();
+ ebo.delete();
+ }
+}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/PartialModel.java b/src/main/java/com/jozufozu/flywheel/core/PartialModel.java
similarity index 97%
rename from src/main/java/com/jozufozu/flywheel/backend/core/PartialModel.java
rename to src/main/java/com/jozufozu/flywheel/core/PartialModel.java
index da0ebc65e..f769f542b 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/PartialModel.java
+++ b/src/main/java/com/jozufozu/flywheel/core/PartialModel.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.core;
+package com.jozufozu.flywheel.core;
import java.util.ArrayList;
import java.util.List;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/context/WorldContext.java b/src/main/java/com/jozufozu/flywheel/core/WorldContext.java
similarity index 90%
rename from src/main/java/com/jozufozu/flywheel/backend/core/context/WorldContext.java
rename to src/main/java/com/jozufozu/flywheel/core/WorldContext.java
index c3197dbd5..b77b4e56e 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/context/WorldContext.java
+++ b/src/main/java/com/jozufozu/flywheel/core/WorldContext.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.core.context;
+package com.jozufozu.flywheel.core;
import java.util.EnumMap;
import java.util.Map;
@@ -12,12 +12,6 @@ import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.backend.ResourceUtil;
import com.jozufozu.flywheel.backend.ShaderContext;
import com.jozufozu.flywheel.backend.ShaderLoader;
-import com.jozufozu.flywheel.backend.core.CrumblingProgram;
-import com.jozufozu.flywheel.backend.core.shader.ExtensibleGlProgram;
-import com.jozufozu.flywheel.backend.core.shader.IMultiProgram;
-import com.jozufozu.flywheel.backend.core.shader.StateSensitiveMultiProgram;
-import com.jozufozu.flywheel.backend.core.shader.WorldProgram;
-import com.jozufozu.flywheel.backend.core.shader.spec.ProgramSpec;
import com.jozufozu.flywheel.backend.gl.shader.ShaderType;
import com.jozufozu.flywheel.backend.instancing.MaterialSpec;
import com.jozufozu.flywheel.backend.loading.InstancedArraysTemplate;
@@ -26,6 +20,11 @@ import com.jozufozu.flywheel.backend.loading.ProgramTemplate;
import com.jozufozu.flywheel.backend.loading.Shader;
import com.jozufozu.flywheel.backend.loading.ShaderLoadingException;
import com.jozufozu.flywheel.backend.loading.ShaderTransformer;
+import com.jozufozu.flywheel.core.shader.ExtensibleGlProgram;
+import com.jozufozu.flywheel.core.shader.IMultiProgram;
+import com.jozufozu.flywheel.core.shader.StateSensitiveMultiProgram;
+import com.jozufozu.flywheel.core.shader.WorldProgram;
+import com.jozufozu.flywheel.core.shader.spec.ProgramSpec;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/WorldTileRenderer.java b/src/main/java/com/jozufozu/flywheel/core/WorldTileRenderer.java
similarity index 87%
rename from src/main/java/com/jozufozu/flywheel/backend/core/WorldTileRenderer.java
rename to src/main/java/com/jozufozu/flywheel/core/WorldTileRenderer.java
index c473905db..b0fe400e3 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/WorldTileRenderer.java
+++ b/src/main/java/com/jozufozu/flywheel/core/WorldTileRenderer.java
@@ -1,11 +1,10 @@
-package com.jozufozu.flywheel.backend.core;
+package com.jozufozu.flywheel.core;
import java.util.ArrayList;
-import com.jozufozu.flywheel.backend.core.context.WorldContext;
-import com.jozufozu.flywheel.backend.core.shader.ShaderCallback;
-import com.jozufozu.flywheel.backend.core.shader.WorldProgram;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.core.shader.IProgramCallback;
+import com.jozufozu.flywheel.core.shader.WorldProgram;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.RenderType;
@@ -52,7 +51,7 @@ public class WorldTileRenderer extends InstancedTileRend
@Override
public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ,
- ShaderCallback
callback) {
+ IProgramCallback
callback) {
BlockPos originCoordinate = getOriginCoordinate();
camX -= originCoordinate.getX();
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/util/ConditionalInstance.java b/src/main/java/com/jozufozu/flywheel/core/instancing/ConditionalInstance.java
similarity index 80%
rename from src/main/java/com/jozufozu/flywheel/backend/instancing/util/ConditionalInstance.java
rename to src/main/java/com/jozufozu/flywheel/core/instancing/ConditionalInstance.java
index f47c21269..326a3c98c 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/util/ConditionalInstance.java
+++ b/src/main/java/com/jozufozu/flywheel/core/instancing/ConditionalInstance.java
@@ -1,21 +1,21 @@
-package com.jozufozu.flywheel.backend.instancing.util;
+package com.jozufozu.flywheel.core.instancing;
import java.util.Optional;
import javax.annotation.Nullable;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
public class ConditionalInstance {
- final InstancedModel model;
+ final Instancer model;
Condition condition;
@Nullable
private D instance;
- public ConditionalInstance(InstancedModel model, Condition condition) {
+ public ConditionalInstance(Instancer model, Condition condition) {
this.model = model;
this.condition = condition;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/util/InstanceGroup.java b/src/main/java/com/jozufozu/flywheel/core/instancing/GroupInstance.java
similarity index 80%
rename from src/main/java/com/jozufozu/flywheel/backend/instancing/util/InstanceGroup.java
rename to src/main/java/com/jozufozu/flywheel/core/instancing/GroupInstance.java
index 6ea964ea9..c9084b6c0 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/util/InstanceGroup.java
+++ b/src/main/java/com/jozufozu/flywheel/core/instancing/GroupInstance.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.instancing.util;
+package com.jozufozu.flywheel.core.instancing;
import java.util.AbstractCollection;
import java.util.ArrayList;
@@ -6,20 +6,20 @@ import java.util.Iterator;
import java.util.List;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
-public class InstanceGroup extends AbstractCollection {
+public class GroupInstance extends AbstractCollection {
- final InstancedModel model;
+ final Instancer model;
final List backing;
- public InstanceGroup(InstancedModel model) {
+ public GroupInstance(Instancer model) {
this.model = model;
this.backing = new ArrayList<>();
}
- public InstanceGroup(InstancedModel model, int size) {
+ public GroupInstance(Instancer model, int size) {
this.model = model;
this.backing = new ArrayList<>(size);
diff --git a/src/main/java/com/jozufozu/flywheel/backend/instancing/util/SelectInstance.java b/src/main/java/com/jozufozu/flywheel/core/instancing/SelectInstance.java
similarity index 82%
rename from src/main/java/com/jozufozu/flywheel/backend/instancing/util/SelectInstance.java
rename to src/main/java/com/jozufozu/flywheel/core/instancing/SelectInstance.java
index e986763f2..b0f812fb3 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/instancing/util/SelectInstance.java
+++ b/src/main/java/com/jozufozu/flywheel/core/instancing/SelectInstance.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.instancing.util;
+package com.jozufozu.flywheel.core.instancing;
import java.util.ArrayList;
import java.util.List;
@@ -7,11 +7,11 @@ import java.util.Optional;
import javax.annotation.Nullable;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
public class SelectInstance {
- final List> models;
+ final List> models;
ModelSelector selector;
@@ -24,7 +24,7 @@ public class SelectInstance {
this.selector = selector;
}
- public SelectInstance addModel(InstancedModel model) {
+ public SelectInstance addModel(Instancer model) {
models.add(model);
return this;
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/materials/BasicData.java b/src/main/java/com/jozufozu/flywheel/core/materials/BasicData.java
similarity index 90%
rename from src/main/java/com/jozufozu/flywheel/backend/core/materials/BasicData.java
rename to src/main/java/com/jozufozu/flywheel/core/materials/BasicData.java
index 9097d9ee7..368839298 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/materials/BasicData.java
+++ b/src/main/java/com/jozufozu/flywheel/core/materials/BasicData.java
@@ -1,8 +1,8 @@
-package com.jozufozu.flywheel.backend.core.materials;
+package com.jozufozu.flywheel.core.materials;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
public class BasicData extends InstanceData implements IFlatLight {
@@ -14,7 +14,7 @@ public class BasicData extends InstanceData implements IFlatLight {
protected byte b = (byte) 0xFF;
protected byte a = (byte) 0xFF;
- public BasicData(InstancedModel> owner) {
+ public BasicData(Instancer> owner) {
super(owner);
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/materials/IFlatLight.java b/src/main/java/com/jozufozu/flywheel/core/materials/IFlatLight.java
similarity index 94%
rename from src/main/java/com/jozufozu/flywheel/backend/core/materials/IFlatLight.java
rename to src/main/java/com/jozufozu/flywheel/core/materials/IFlatLight.java
index 250ffda90..93c90dbea 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/materials/IFlatLight.java
+++ b/src/main/java/com/jozufozu/flywheel/core/materials/IFlatLight.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.core.materials;
+package com.jozufozu.flywheel.core.materials;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/materials/ModelData.java b/src/main/java/com/jozufozu/flywheel/core/materials/ModelData.java
similarity index 77%
rename from src/main/java/com/jozufozu/flywheel/backend/core/materials/ModelData.java
rename to src/main/java/com/jozufozu/flywheel/core/materials/ModelData.java
index 88475d478..f7c99122a 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/materials/ModelData.java
+++ b/src/main/java/com/jozufozu/flywheel/core/materials/ModelData.java
@@ -1,7 +1,7 @@
-package com.jozufozu.flywheel.backend.core.materials;
+package com.jozufozu.flywheel.core.materials;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.jozufozu.flywheel.util.RenderUtil;
import com.mojang.blaze3d.matrix.MatrixStack;
@@ -10,7 +10,7 @@ public class ModelData extends BasicData {
private float[] matrices = empty;
- public ModelData(InstancedModel> owner) {
+ public ModelData(Instancer> owner) {
super(owner);
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/materials/OrientedData.java b/src/main/java/com/jozufozu/flywheel/core/materials/OrientedData.java
similarity index 92%
rename from src/main/java/com/jozufozu/flywheel/backend/core/materials/OrientedData.java
rename to src/main/java/com/jozufozu/flywheel/core/materials/OrientedData.java
index 0132537c7..d6c63480a 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/materials/OrientedData.java
+++ b/src/main/java/com/jozufozu/flywheel/core/materials/OrientedData.java
@@ -1,7 +1,7 @@
-package com.jozufozu.flywheel.backend.core.materials;
+package com.jozufozu.flywheel.core.materials;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Quaternion;
@@ -22,7 +22,7 @@ public class OrientedData extends BasicData {
private float qW;
- public OrientedData(InstancedModel> owner) {
+ public OrientedData(Instancer> owner) {
super(owner);
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/ExtensibleGlProgram.java b/src/main/java/com/jozufozu/flywheel/core/shader/ExtensibleGlProgram.java
similarity index 91%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/ExtensibleGlProgram.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/ExtensibleGlProgram.java
index a582595b9..7da1e8b14 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/ExtensibleGlProgram.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/ExtensibleGlProgram.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.core.shader;
+package com.jozufozu.flywheel.core.shader;
import java.util.ArrayList;
import java.util.Collections;
@@ -7,10 +7,10 @@ import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import com.jozufozu.flywheel.backend.core.shader.extension.IExtensionInstance;
-import com.jozufozu.flywheel.backend.core.shader.extension.IProgramExtension;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.loading.Program;
+import com.jozufozu.flywheel.core.shader.extension.IExtensionInstance;
+import com.jozufozu.flywheel.core.shader.extension.IProgramExtension;
/**
* A shader program that be arbitrarily "extended". This class can take in any number of program extensions, and
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/FogMode.java b/src/main/java/com/jozufozu/flywheel/core/shader/FogMode.java
similarity index 91%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/FogMode.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/FogMode.java
index b8c80f3f5..2ff577b0a 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/FogMode.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/FogMode.java
@@ -1,10 +1,10 @@
-package com.jozufozu.flywheel.backend.core.shader;
+package com.jozufozu.flywheel.core.shader;
import org.lwjgl.opengl.GL20;
import com.jozufozu.flywheel.Flywheel;
-import com.jozufozu.flywheel.backend.core.shader.extension.IExtensionInstance;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
+import com.jozufozu.flywheel.core.shader.extension.IExtensionInstance;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/GlFog.java b/src/main/java/com/jozufozu/flywheel/core/shader/GlFog.java
similarity index 95%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/GlFog.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/GlFog.java
index dd1111425..55428f94d 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/GlFog.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/GlFog.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.core.shader;
+package com.jozufozu.flywheel.core.shader;
import org.lwjgl.opengl.GL11;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/IMultiProgram.java b/src/main/java/com/jozufozu/flywheel/core/shader/IMultiProgram.java
similarity index 91%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/IMultiProgram.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/IMultiProgram.java
index f4d7478e4..6b009a968 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/IMultiProgram.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/IMultiProgram.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.core.shader;
+package com.jozufozu.flywheel.core.shader;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
diff --git a/src/main/java/com/jozufozu/flywheel/core/shader/IProgramCallback.java b/src/main/java/com/jozufozu/flywheel/core/shader/IProgramCallback.java
new file mode 100644
index 000000000..4dae733e9
--- /dev/null
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/IProgramCallback.java
@@ -0,0 +1,19 @@
+package com.jozufozu.flywheel.core.shader;
+
+import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
+
+/**
+ * Used to define shader uniforms.
+ */
+@FunctionalInterface
+public interface IProgramCallback {
+
+ void call(P program);
+
+ default IProgramCallback
andThen(IProgramCallback
other) {
+ return program -> {
+ call(program);
+ other.call(program);
+ };
+ }
+}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/StateSensitiveMultiProgram.java b/src/main/java/com/jozufozu/flywheel/core/shader/StateSensitiveMultiProgram.java
similarity index 83%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/StateSensitiveMultiProgram.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/StateSensitiveMultiProgram.java
index 2dbce5473..e48a86bc5 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/StateSensitiveMultiProgram.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/StateSensitiveMultiProgram.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.core.shader;
+package com.jozufozu.flywheel.core.shader;
import java.util.ArrayList;
import java.util.Collections;
@@ -6,11 +6,11 @@ import java.util.List;
import com.jozufozu.flywheel.backend.ShaderContext;
import com.jozufozu.flywheel.backend.ShaderLoader;
-import com.jozufozu.flywheel.backend.core.shader.spec.IContextCondition;
-import com.jozufozu.flywheel.backend.core.shader.spec.ProgramSpec;
-import com.jozufozu.flywheel.backend.core.shader.spec.ProgramState;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.loading.Program;
+import com.jozufozu.flywheel.core.shader.spec.IContextCondition;
+import com.jozufozu.flywheel.core.shader.spec.ProgramSpec;
+import com.jozufozu.flywheel.core.shader.spec.ProgramState;
import com.jozufozu.flywheel.util.Pair;
public class StateSensitiveMultiProgram
implements IMultiProgram
{
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/WorldFog.java b/src/main/java/com/jozufozu/flywheel/core/shader/WorldFog.java
similarity index 76%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/WorldFog.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/WorldFog.java
index 1ae189611..0f8243f85 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/WorldFog.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/WorldFog.java
@@ -1,12 +1,12 @@
-package com.jozufozu.flywheel.backend.core.shader;
+package com.jozufozu.flywheel.core.shader;
import java.util.function.Function;
import com.jozufozu.flywheel.Flywheel;
-import com.jozufozu.flywheel.backend.core.shader.extension.IExtensionInstance;
-import com.jozufozu.flywheel.backend.core.shader.extension.IProgramExtension;
-import com.jozufozu.flywheel.backend.core.shader.extension.UnitExtensionInstance;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
+import com.jozufozu.flywheel.core.shader.extension.IExtensionInstance;
+import com.jozufozu.flywheel.core.shader.extension.IProgramExtension;
+import com.jozufozu.flywheel.core.shader.extension.UnitExtensionInstance;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/WorldProgram.java b/src/main/java/com/jozufozu/flywheel/core/shader/WorldProgram.java
similarity index 91%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/WorldProgram.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/WorldProgram.java
index c83c4ba6f..c6da0487d 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/WorldProgram.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/WorldProgram.java
@@ -1,12 +1,12 @@
-package com.jozufozu.flywheel.backend.core.shader;
+package com.jozufozu.flywheel.core.shader;
import static org.lwjgl.opengl.GL20.glUniform1f;
import static org.lwjgl.opengl.GL20.glUniform3f;
import java.util.List;
-import com.jozufozu.flywheel.backend.core.shader.extension.IProgramExtension;
import com.jozufozu.flywheel.backend.loading.Program;
+import com.jozufozu.flywheel.core.shader.extension.IProgramExtension;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.util.math.vector.Matrix4f;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/extension/IExtensionInstance.java b/src/main/java/com/jozufozu/flywheel/core/shader/extension/IExtensionInstance.java
similarity index 83%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/extension/IExtensionInstance.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/extension/IExtensionInstance.java
index 586121bce..8cd43311e 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/extension/IExtensionInstance.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/extension/IExtensionInstance.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.core.shader.extension;
+package com.jozufozu.flywheel.core.shader.extension;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/extension/IProgramExtension.java b/src/main/java/com/jozufozu/flywheel/core/shader/extension/IProgramExtension.java
similarity index 85%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/extension/IProgramExtension.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/extension/IProgramExtension.java
index f0ad388b7..74da45a1d 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/extension/IProgramExtension.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/extension/IProgramExtension.java
@@ -1,7 +1,7 @@
-package com.jozufozu.flywheel.backend.core.shader.extension;
+package com.jozufozu.flywheel.core.shader.extension;
-import com.jozufozu.flywheel.backend.core.shader.spec.SpecMetaRegistry;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
+import com.jozufozu.flywheel.core.shader.spec.SpecMetaRegistry;
import com.mojang.serialization.Codec;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/extension/UnitExtensionInstance.java b/src/main/java/com/jozufozu/flywheel/core/shader/extension/UnitExtensionInstance.java
similarity index 88%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/extension/UnitExtensionInstance.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/extension/UnitExtensionInstance.java
index a66e1a30d..0fc5d76f9 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/extension/UnitExtensionInstance.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/extension/UnitExtensionInstance.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.core.shader.extension;
+package com.jozufozu.flywheel.core.shader.extension;
import com.jozufozu.flywheel.Flywheel;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/FogStateProvider.java b/src/main/java/com/jozufozu/flywheel/core/shader/gamestate/FogStateProvider.java
similarity index 79%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/FogStateProvider.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/gamestate/FogStateProvider.java
index 6abddede4..8423896ea 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/FogStateProvider.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/gamestate/FogStateProvider.java
@@ -1,7 +1,7 @@
-package com.jozufozu.flywheel.backend.core.shader.gamestate;
+package com.jozufozu.flywheel.core.shader.gamestate;
import com.jozufozu.flywheel.Flywheel;
-import com.jozufozu.flywheel.backend.core.shader.GlFog;
+import com.jozufozu.flywheel.core.shader.GlFog;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/IGameStateProvider.java b/src/main/java/com/jozufozu/flywheel/core/shader/gamestate/IGameStateProvider.java
similarity index 69%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/IGameStateProvider.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/gamestate/IGameStateProvider.java
index 82fe2653c..e5a06e57c 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/IGameStateProvider.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/gamestate/IGameStateProvider.java
@@ -1,6 +1,6 @@
-package com.jozufozu.flywheel.backend.core.shader.gamestate;
+package com.jozufozu.flywheel.core.shader.gamestate;
-import com.jozufozu.flywheel.backend.core.shader.spec.SpecMetaRegistry;
+import com.jozufozu.flywheel.core.shader.spec.SpecMetaRegistry;
import com.mojang.serialization.Codec;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/NormalDebugStateProvider.java b/src/main/java/com/jozufozu/flywheel/core/shader/gamestate/NormalDebugStateProvider.java
similarity index 78%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/NormalDebugStateProvider.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/gamestate/NormalDebugStateProvider.java
index b87943e22..e05890003 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/NormalDebugStateProvider.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/gamestate/NormalDebugStateProvider.java
@@ -1,7 +1,7 @@
-package com.jozufozu.flywheel.backend.core.shader.gamestate;
+package com.jozufozu.flywheel.core.shader.gamestate;
import com.jozufozu.flywheel.Flywheel;
-import com.jozufozu.flywheel.backend.core.shader.spec.IBooleanStateProvider;
+import com.jozufozu.flywheel.core.shader.spec.IBooleanStateProvider;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/RainbowDebugStateProvider.java b/src/main/java/com/jozufozu/flywheel/core/shader/gamestate/RainbowDebugStateProvider.java
similarity index 81%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/RainbowDebugStateProvider.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/gamestate/RainbowDebugStateProvider.java
index a49cf28e8..b005c8e72 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/gamestate/RainbowDebugStateProvider.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/gamestate/RainbowDebugStateProvider.java
@@ -1,6 +1,6 @@
-package com.jozufozu.flywheel.backend.core.shader.gamestate;
+package com.jozufozu.flywheel.core.shader.gamestate;
-import com.jozufozu.flywheel.backend.core.shader.spec.IBooleanStateProvider;
+import com.jozufozu.flywheel.core.shader.spec.IBooleanStateProvider;
import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.KineticDebugger;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/BooleanContextCondition.java b/src/main/java/com/jozufozu/flywheel/core/shader/spec/BooleanContextCondition.java
similarity index 86%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/BooleanContextCondition.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/spec/BooleanContextCondition.java
index ae3dc164c..a61a69f51 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/BooleanContextCondition.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/spec/BooleanContextCondition.java
@@ -1,6 +1,6 @@
-package com.jozufozu.flywheel.backend.core.shader.spec;
+package com.jozufozu.flywheel.core.shader.spec;
-import com.jozufozu.flywheel.backend.core.shader.gamestate.IGameStateProvider;
+import com.jozufozu.flywheel.core.shader.gamestate.IGameStateProvider;
import com.mojang.serialization.Codec;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/IBooleanStateProvider.java b/src/main/java/com/jozufozu/flywheel/core/shader/spec/IBooleanStateProvider.java
similarity index 53%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/IBooleanStateProvider.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/spec/IBooleanStateProvider.java
index 3265c11a0..1f1265724 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/IBooleanStateProvider.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/spec/IBooleanStateProvider.java
@@ -1,6 +1,6 @@
-package com.jozufozu.flywheel.backend.core.shader.spec;
+package com.jozufozu.flywheel.core.shader.spec;
-import com.jozufozu.flywheel.backend.core.shader.gamestate.IGameStateProvider;
+import com.jozufozu.flywheel.core.shader.gamestate.IGameStateProvider;
public interface IBooleanStateProvider extends IGameStateProvider {
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/IContextCondition.java b/src/main/java/com/jozufozu/flywheel/core/shader/spec/IContextCondition.java
similarity index 55%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/IContextCondition.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/spec/IContextCondition.java
index b9499da84..5d6d7ee42 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/IContextCondition.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/spec/IContextCondition.java
@@ -1,6 +1,6 @@
-package com.jozufozu.flywheel.backend.core.shader.spec;
+package com.jozufozu.flywheel.core.shader.spec;
-import com.jozufozu.flywheel.backend.core.shader.gamestate.IGameStateProvider;
+import com.jozufozu.flywheel.core.shader.gamestate.IGameStateProvider;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/ProgramSpec.java b/src/main/java/com/jozufozu/flywheel/core/shader/spec/ProgramSpec.java
similarity index 96%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/ProgramSpec.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/spec/ProgramSpec.java
index 05c76888f..391cc7c65 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/ProgramSpec.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/spec/ProgramSpec.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.core.shader.spec;
+package com.jozufozu.flywheel.core.shader.spec;
import java.util.ArrayList;
import java.util.Collections;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/ProgramState.java b/src/main/java/com/jozufozu/flywheel/core/shader/spec/ProgramState.java
similarity index 93%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/ProgramState.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/spec/ProgramState.java
index 4a39e8b7f..cd2f74547 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/ProgramState.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/spec/ProgramState.java
@@ -1,9 +1,9 @@
-package com.jozufozu.flywheel.backend.core.shader.spec;
+package com.jozufozu.flywheel.core.shader.spec;
import java.util.Collections;
import java.util.List;
-import com.jozufozu.flywheel.backend.core.shader.extension.IProgramExtension;
+import com.jozufozu.flywheel.core.shader.extension.IProgramExtension;
import com.jozufozu.flywheel.util.CodecUtil;
import com.mojang.datafixers.util.Either;
import com.mojang.serialization.Codec;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/SpecMetaRegistry.java b/src/main/java/com/jozufozu/flywheel/core/shader/spec/SpecMetaRegistry.java
similarity index 78%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/SpecMetaRegistry.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/spec/SpecMetaRegistry.java
index 9f26fe448..9bd884cd8 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/SpecMetaRegistry.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/spec/SpecMetaRegistry.java
@@ -1,14 +1,14 @@
-package com.jozufozu.flywheel.backend.core.shader.spec;
+package com.jozufozu.flywheel.core.shader.spec;
import java.util.HashMap;
import java.util.Map;
-import com.jozufozu.flywheel.backend.core.shader.WorldFog;
-import com.jozufozu.flywheel.backend.core.shader.extension.IProgramExtension;
-import com.jozufozu.flywheel.backend.core.shader.gamestate.FogStateProvider;
-import com.jozufozu.flywheel.backend.core.shader.gamestate.IGameStateProvider;
-import com.jozufozu.flywheel.backend.core.shader.gamestate.NormalDebugStateProvider;
-import com.jozufozu.flywheel.backend.core.shader.gamestate.RainbowDebugStateProvider;
+import com.jozufozu.flywheel.core.shader.WorldFog;
+import com.jozufozu.flywheel.core.shader.extension.IProgramExtension;
+import com.jozufozu.flywheel.core.shader.gamestate.FogStateProvider;
+import com.jozufozu.flywheel.core.shader.gamestate.IGameStateProvider;
+import com.jozufozu.flywheel.core.shader.gamestate.NormalDebugStateProvider;
+import com.jozufozu.flywheel.core.shader.gamestate.RainbowDebugStateProvider;
import net.minecraft.util.ResourceLocation;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/SpecificValueCondition.java b/src/main/java/com/jozufozu/flywheel/core/shader/spec/SpecificValueCondition.java
similarity index 88%
rename from src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/SpecificValueCondition.java
rename to src/main/java/com/jozufozu/flywheel/core/shader/spec/SpecificValueCondition.java
index 8b05e3588..cefc0d868 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/core/shader/spec/SpecificValueCondition.java
+++ b/src/main/java/com/jozufozu/flywheel/core/shader/spec/SpecificValueCondition.java
@@ -1,6 +1,6 @@
-package com.jozufozu.flywheel.backend.core.shader.spec;
+package com.jozufozu.flywheel.core.shader.spec;
-import com.jozufozu.flywheel.backend.core.shader.gamestate.IGameStateProvider;
+import com.jozufozu.flywheel.core.shader.gamestate.IGameStateProvider;
import com.mojang.serialization.Codec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/light/GridAlignedBB.java b/src/main/java/com/jozufozu/flywheel/light/GridAlignedBB.java
similarity index 98%
rename from src/main/java/com/jozufozu/flywheel/backend/light/GridAlignedBB.java
rename to src/main/java/com/jozufozu/flywheel/light/GridAlignedBB.java
index f5c63e564..29e66663a 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/light/GridAlignedBB.java
+++ b/src/main/java/com/jozufozu/flywheel/light/GridAlignedBB.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.light;
+package com.jozufozu.flywheel.light;
import static com.jozufozu.flywheel.util.RenderUtil.isPowerOf2;
@@ -283,7 +283,7 @@ public class GridAlignedBB {
return this.minX < maxX && this.maxX > minX && this.minY < maxY && this.maxY > minY && this.minZ < maxZ && this.maxZ > minZ;
}
- public void forEachContained(CoordinateConsumer func) {
+ public void forEachContained(ICoordinateConsumer func) {
if (empty()) return;
for (int x = minX; x < maxX; x++) {
diff --git a/src/main/java/com/jozufozu/flywheel/light/ICoordinateConsumer.java b/src/main/java/com/jozufozu/flywheel/light/ICoordinateConsumer.java
new file mode 100644
index 000000000..a4d77b32e
--- /dev/null
+++ b/src/main/java/com/jozufozu/flywheel/light/ICoordinateConsumer.java
@@ -0,0 +1,6 @@
+package com.jozufozu.flywheel.light;
+
+@FunctionalInterface
+public interface ICoordinateConsumer {
+ void consume(int x, int y, int z);
+}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/light/LightUpdateListener.java b/src/main/java/com/jozufozu/flywheel/light/ILightUpdateListener.java
similarity index 92%
rename from src/main/java/com/jozufozu/flywheel/backend/light/LightUpdateListener.java
rename to src/main/java/com/jozufozu/flywheel/light/ILightUpdateListener.java
index 1dd0e95dc..570467411 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/light/LightUpdateListener.java
+++ b/src/main/java/com/jozufozu/flywheel/light/ILightUpdateListener.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.light;
+package com.jozufozu.flywheel.light;
import net.minecraft.world.IBlockDisplayReader;
import net.minecraft.world.LightType;
@@ -7,7 +7,7 @@ import net.minecraft.world.LightType;
* Anything can implement this, implementors should call {@link LightUpdater#startListening}
* appropriately to make sure they get the updates they want.
*/
-public interface LightUpdateListener {
+public interface ILightUpdateListener {
/**
* Called when a light updates in a chunk the implementor cares about.
diff --git a/src/main/java/com/jozufozu/flywheel/backend/light/LightUpdater.java b/src/main/java/com/jozufozu/flywheel/light/LightUpdater.java
similarity index 75%
rename from src/main/java/com/jozufozu/flywheel/backend/light/LightUpdater.java
rename to src/main/java/com/jozufozu/flywheel/light/LightUpdater.java
index 7aaaeb892..563b75dc8 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/light/LightUpdater.java
+++ b/src/main/java/com/jozufozu/flywheel/light/LightUpdater.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.light;
+package com.jozufozu.flywheel.light;
import java.util.WeakHashMap;
import java.util.function.LongConsumer;
@@ -33,11 +33,11 @@ public class LightUpdater {
return instance;
}
- private final Long2ObjectMap> sections;
- private final WeakHashMap listenersToSections;
+ private final Long2ObjectMap> sections;
+ private final WeakHashMap listenersToSections;
- private final Long2ObjectMap> chunks;
- private final WeakHashMap listenersToChunks;
+ private final Long2ObjectMap> chunks;
+ private final WeakHashMap listenersToChunks;
public LightUpdater() {
sections = new Long2ObjectOpenHashMap<>();
@@ -51,12 +51,12 @@ public class LightUpdater {
* Add a listener associated with the given {@link BlockPos}.
*
* When a light update occurs in the chunk the position is contained in,
- * {@link LightUpdateListener#onLightUpdate} will be called.
+ * {@link ILightUpdateListener#onLightUpdate} will be called.
*
* @param pos The position in the world that the listener cares about.
* @param listener The object that wants to receive light update notifications.
*/
- public void startListening(BlockPos pos, LightUpdateListener listener) {
+ public void startListening(BlockPos pos, ILightUpdateListener listener) {
LongRBTreeSet sections = clearSections(listener);
LongRBTreeSet chunks = clearChunks(listener);
@@ -73,12 +73,12 @@ public class LightUpdater {
* Add a listener associated with the given {@link GridAlignedBB}.
*
* When a light update occurs in any chunk spanning the given volume,
- * {@link LightUpdateListener#onLightUpdate} will be called.
+ * {@link ILightUpdateListener#onLightUpdate} will be called.
*
* @param volume The volume in the world that the listener cares about.
* @param listener The object that wants to receive light update notifications.
*/
- public void startListening(GridAlignedBB volume, LightUpdateListener listener) {
+ public void startListening(GridAlignedBB volume, ILightUpdateListener listener) {
LongRBTreeSet sections = clearSections(listener);
LongRBTreeSet chunks = clearSections(listener);
@@ -104,14 +104,14 @@ public class LightUpdater {
}
/**
- * Dispatch light updates to all registered {@link LightUpdateListener}s.
+ * Dispatch light updates to all registered {@link ILightUpdateListener}s.
*
* @param world The world in which light was updated.
* @param type The type of light that changed.
* @param sectionPos A long representing the section position where light changed.
*/
public void onLightUpdate(IBlockDisplayReader world, LightType type, long sectionPos) {
- WeakHashSet set = sections.get(sectionPos);
+ WeakHashSet set = sections.get(sectionPos);
if (set == null || set.isEmpty()) return;
@@ -121,7 +121,7 @@ public class LightUpdater {
}
/**
- * Dispatch light updates to all registered {@link LightUpdateListener}s
+ * Dispatch light updates to all registered {@link ILightUpdateListener}s
* when the server sends lighting data for an entire chunk.
*
* @param world The world in which light was updated.
@@ -130,22 +130,22 @@ public class LightUpdater {
long chunkPos = SectionPos.asLong(chunkX, 0, chunkZ);
- WeakHashSet set = chunks.get(chunkPos);
+ WeakHashSet set = chunks.get(chunkPos);
if (set == null || set.isEmpty()) return;
set.removeIf(listener -> listener.onLightPacket(world, chunkX, chunkZ));
}
- private LongRBTreeSet clearChunks(LightUpdateListener listener) {
+ private LongRBTreeSet clearChunks(ILightUpdateListener listener) {
return clear(listener, listenersToChunks, chunks);
}
- private LongRBTreeSet clearSections(LightUpdateListener listener) {
+ private LongRBTreeSet clearSections(ILightUpdateListener listener) {
return clear(listener, listenersToSections, sections);
}
- private LongRBTreeSet clear(LightUpdateListener listener, WeakHashMap listeners, Long2ObjectMap> lookup) {
+ private LongRBTreeSet clear(ILightUpdateListener listener, WeakHashMap listeners, Long2ObjectMap> lookup) {
LongRBTreeSet set = listeners.get(listener);
if (set == null) {
@@ -153,7 +153,7 @@ public class LightUpdater {
listeners.put(listener, set);
} else {
set.forEach((LongConsumer) l -> {
- WeakHashSet listeningSections = lookup.get(l);
+ WeakHashSet listeningSections = lookup.get(l);
if (listeningSections != null) listeningSections.remove(listener);
});
@@ -164,16 +164,16 @@ public class LightUpdater {
return set;
}
- private void addToSection(long sectionPos, LightUpdateListener listener) {
+ private void addToSection(long sectionPos, ILightUpdateListener listener) {
getOrCreate(sections, sectionPos).add(listener);
}
- private void addToChunk(long chunkPos, LightUpdateListener listener) {
+ private void addToChunk(long chunkPos, ILightUpdateListener listener) {
getOrCreate(chunks, chunkPos).add(listener);
}
- private WeakHashSet getOrCreate(Long2ObjectMap> sections, long chunkPos) {
- WeakHashSet set = sections.get(chunkPos);
+ private WeakHashSet getOrCreate(Long2ObjectMap> sections, long chunkPos) {
+ WeakHashSet set = sections.get(chunkPos);
if (set == null) {
set = new WeakHashSet<>();
diff --git a/src/main/java/com/jozufozu/flywheel/backend/light/LightVolume.java b/src/main/java/com/jozufozu/flywheel/light/LightVolume.java
similarity index 99%
rename from src/main/java/com/jozufozu/flywheel/backend/light/LightVolume.java
rename to src/main/java/com/jozufozu/flywheel/light/LightVolume.java
index 48a86fcb6..2e5550482 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/light/LightVolume.java
+++ b/src/main/java/com/jozufozu/flywheel/light/LightVolume.java
@@ -1,4 +1,4 @@
-package com.jozufozu.flywheel.backend.light;
+package com.jozufozu.flywheel.light;
import java.nio.ByteBuffer;
diff --git a/src/main/java/com/jozufozu/flywheel/util/AttribUtil.java b/src/main/java/com/jozufozu/flywheel/util/AttribUtil.java
index bb8cd1ce4..eb1c7aa89 100644
--- a/src/main/java/com/jozufozu/flywheel/util/AttribUtil.java
+++ b/src/main/java/com/jozufozu/flywheel/util/AttribUtil.java
@@ -8,8 +8,8 @@ public class AttribUtil {
enableArrays(0, count);
}
- public static void enableArrays(int start, int end) {
- for (int i = start; i <= end; i++) {
+ public static void enableArrays(int fromInclusive, int toExclusive) {
+ for (int i = fromInclusive; i < toExclusive; i++) {
GL20.glEnableVertexAttribArray(i);
}
}
@@ -18,8 +18,8 @@ public class AttribUtil {
disableArrays(0, count);
}
- public static void disableArrays(int start, int end) {
- for (int i = start; i <= end; i++) {
+ public static void disableArrays(int fromInclusive, int toExclusive) {
+ for (int i = fromInclusive; i < toExclusive; i++) {
GL20.glDisableVertexAttribArray(i);
}
}
diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java
index adb99f9b8..57a0aa28f 100644
--- a/src/main/java/com/simibubi/create/AllBlockPartials.java
+++ b/src/main/java/com/simibubi/create/AllBlockPartials.java
@@ -3,7 +3,7 @@ package com.simibubi.create;
import java.util.HashMap;
import java.util.Map;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.content.contraptions.fluids.FluidTransportBehaviour;
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock;
import com.simibubi.create.foundation.utility.Iterate;
@@ -98,7 +98,7 @@ public class AllBlockPartials {
GOGGLES = get("goggles"),
EJECTOR_TOP = get("weighted_ejector/top"),
-
+
COPPER_BACKTANK_SHAFT = get("copper_backtank/block_shaft_input"),
COPPER_BACKTANK_COGS = get("copper_backtank/block_cogs"),
diff --git a/src/main/java/com/simibubi/create/CreateClient.java b/src/main/java/com/simibubi/create/CreateClient.java
index 70086497f..caa38fe21 100644
--- a/src/main/java/com/simibubi/create/CreateClient.java
+++ b/src/main/java/com/simibubi/create/CreateClient.java
@@ -9,8 +9,8 @@ import javax.annotation.Nullable;
import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.backend.OptifineHandler;
-import com.jozufozu.flywheel.backend.core.PartialModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ContraptionRenderDispatcher;
import com.simibubi.create.content.contraptions.relays.encased.CasingConnectivity;
diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java
index 8af7874a1..8d448783d 100644
--- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java
+++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedBlazeBurner.java
@@ -1,6 +1,6 @@
package com.simibubi.create.compat.jei.category.animations;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java
index dcf4f1633..fe8a3c37f 100644
--- a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java
+++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedKinetics.java
@@ -1,6 +1,6 @@
package com.simibubi.create.compat.jei.category.animations;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java
index aae8b7c2d..7e4f3f44a 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/base/HalfShaftInstance.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.base;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.simibubi.create.AllBlockPartials;
import net.minecraft.state.properties.BlockStateProperties;
@@ -13,7 +13,7 @@ public class HalfShaftInstance extends SingleRotatingInstance {
}
@Override
- protected InstancedModel getModel() {
+ protected Instancer getModel() {
Direction dir = getShaftDirection();
return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, blockState, dir);
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java
index 6d30b973e..2c0e15355 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticData.java
@@ -1,8 +1,8 @@
package com.simibubi.create.content.contraptions.base;
-import com.jozufozu.flywheel.backend.core.materials.BasicData;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
+import com.jozufozu.flywheel.core.materials.BasicData;
import com.simibubi.create.foundation.utility.ColorHelper;
import net.minecraft.util.math.BlockPos;
@@ -15,7 +15,7 @@ public class KineticData extends BasicData {
private float rotationalSpeed;
private float rotationOffset;
- protected KineticData(InstancedModel> owner) {
+ protected KineticData(Instancer> owner) {
super(owner);
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java b/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java
index ef59d938e..443168be0 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/base/RotatingData.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.base;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import net.minecraft.util.Direction;
import net.minecraft.util.math.vector.Vector3f;
@@ -11,7 +11,7 @@ public class RotatingData extends KineticData {
private byte rotationAxisY;
private byte rotationAxisZ;
- public RotatingData(InstancedModel> owner) {
+ public RotatingData(Instancer> owner) {
super(owner);
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java
index 533b95ece..f692033b0 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/base/ShaftlessCogInstance.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.base;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.foundation.render.AllMaterialSpecs;
@@ -12,7 +12,7 @@ public class ShaftlessCogInstance extends SingleRotatingInstance {
}
@Override
- protected InstancedModel getModel() {
+ protected Instancer getModel() {
return renderer.getMaterial(AllMaterialSpecs.ROTATING).getModel(AllBlockPartials.SHAFTLESS_COGWHEEL, tile.getBlockState());
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java b/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java
index 266f1f0cd..adba0e16e 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/base/SingleRotatingInstance.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.base;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import net.minecraft.block.BlockState;
@@ -34,7 +34,7 @@ public class SingleRotatingInstance extends KineticTileInstance getModel() {
+ protected Instancer getModel() {
return getRotatingMaterial().getModel(getRenderedBlockState());
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/ActorData.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/ActorData.java
index 0d993e316..dd8c01e8e 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/ActorData.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/ActorData.java
@@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.actors;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Quaternion;
@@ -28,7 +28,7 @@ public class ActorData extends InstanceData {
private float speed;
- public ActorData(InstancedModel> owner) {
+ public ActorData(Instancer> owner) {
super(owner);
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java
index 35d8e766a..f097d1330 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/DrillInstance.java
@@ -2,8 +2,8 @@ package com.simibubi.create.content.contraptions.components.actors;
import static net.minecraft.state.properties.BlockStateProperties.FACING;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.base.RotatingData;
@@ -19,7 +19,7 @@ public class DrillInstance extends SingleRotatingInstance {
}
@Override
- protected InstancedModel getModel() {
+ protected Instancer getModel() {
BlockState referenceState = tile.getBlockState();
Direction facing = referenceState.get(FACING);
return getRotatingMaterial().getModel(AllBlockPartials.DRILL_HEAD, referenceState, facing);
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java
index e04fa94a8..1b1068756 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/HarvesterActorInstance.java
@@ -2,8 +2,8 @@ package com.simibubi.create.content.contraptions.components.actors;
import static net.minecraft.state.properties.BlockStateProperties.HORIZONTAL_FACING;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.RenderMaterial;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java
index ebaa7fbe0..c6700f0f3 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java
@@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.actors;
import java.util.function.Consumer;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.simibubi.create.AllBlockPartials;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java
index a5e0a6a33..03f8fa982 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockRenderer.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.clock;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.simibubi.create.AllBlockPartials;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockTileEntity.java
index 7ee30f4d6..5948a5adf 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/clock/CuckooClockTileEntity.java
@@ -41,7 +41,7 @@ public class CuckooClockTileEntity extends KineticTileEntity {
super(type);
animationType = Animation.NONE;
}
-
+
@Override
protected void fromTag(BlockState state, CompoundNBT compound, boolean clientPacket) {
super.fromTag(state, compound, clientPacket);
@@ -51,7 +51,7 @@ public class CuckooClockTileEntity extends KineticTileEntity {
animationProgress.value = 0;
}
}
-
+
@Override
public void write(CompoundNBT compound, boolean clientPacket) {
if (clientPacket && sendAnimationUpdate)
@@ -150,10 +150,10 @@ public class CuckooClockTileEntity extends KineticTileEntity {
animationProgress.lastValue = 0;
animationProgress.value = 0;
sendAnimationUpdate = true;
-
+
if (animation == Animation.CREEPER)
AllTriggers.triggerForNearbyPlayers(AllTriggers.CUCKOO, world, pos, 10);
-
+
sendData();
}
@@ -174,7 +174,7 @@ public class CuckooClockTileEntity extends KineticTileEntity {
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java
index 517258358..4931fdd2d 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterInstance.java
@@ -2,8 +2,8 @@ package com.simibubi.create.content.contraptions.components.crafter;
import java.util.function.Supplier;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
@@ -20,7 +20,7 @@ public class MechanicalCrafterInstance extends SingleRotatingInstance {
}
@Override
- protected InstancedModel getModel() {
+ protected Instancer getModel() {
Direction facing = blockState.get(MechanicalCrafterBlock.HORIZONTAL_FACING);
Supplier ms = () -> {
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterRenderer.java
index 8aa4b126e..68ba4f024 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterRenderer.java
@@ -4,7 +4,7 @@ import static com.simibubi.create.content.contraptions.base.HorizontalKineticBlo
import static com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer.standardKineticRotationTransform;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.simibubi.create.AllBlockPartials;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java
index 1f64d7ac3..8a12fcffc 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java
@@ -285,7 +285,7 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
Pointing pointing = getBlockState().get(MechanicalCrafterBlock.POINTING);
groupedItems.mergeOnto(targetingCrafter.groupedItems, pointing);
groupedItems = new GroupedItems();
-
+
float pitch = targetingCrafter.groupedItems.grid.size() * 1/16f + .5f;
AllSoundEvents.CRAFTER_CLICK.playOnServer(world, pos, 1, pitch);
@@ -335,12 +335,12 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
int prev = countDown;
countDown -= getCountDownSpeed();
-
+
if (countDown < 1000 && prev >= 1000) {
AllSoundEvents.CRAFTER_CLICK.playOnServer(world, pos, 1, 2);
AllSoundEvents.CRAFTER_CRAFT.playOnServer(world, pos);
}
-
+
if (countDown < 0) {
countDown = 0;
if (!runLogic)
@@ -513,7 +513,7 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity {
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java
index c1a4a3fe3..bef299a96 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankBlock.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.crank;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllShapes;
import com.simibubi.create.AllTileEntities;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankInstance.java
index 8cd33f08d..544094d8b 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankInstance.java
@@ -1,10 +1,10 @@
package com.simibubi.create.content.contraptions.components.crank;
-import com.jozufozu.flywheel.backend.core.PartialModel;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
+import com.jozufozu.flywheel.core.PartialModel;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.content.contraptions.base.SingleRotatingInstance;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
@@ -33,7 +33,7 @@ public class HandCrankInstance extends SingleRotatingInstance implements IDynami
facing = blockState.get(BlockStateProperties.FACING);
Direction opposite = facing.getOpposite();
- InstancedModel model = getTransformMaterial().getModel(renderedHandle, blockState, opposite);
+ Instancer model = getTransformMaterial().getModel(renderedHandle, blockState, opposite);
crank = model.createInstance();
rotateCrank();
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankRenderer.java
index b9190e738..923274b56 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankRenderer.java
@@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.components.crank;
import static net.minecraft.state.properties.BlockStateProperties.FACING;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankTileEntity.java
index a058b740c..259a89b10 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/HandCrankTileEntity.java
@@ -77,7 +77,7 @@ public class HandCrankTileEntity extends GeneratingKineticTileEntity {
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java
index 86c13f7c3..46c60ab96 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/crank/ValveHandleBlock.java
@@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.crank;
import javax.annotation.ParametersAreNonnullByDefault;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.DyeHelper;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java
index 94b874fca..5060c768e 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerActorInstance.java
@@ -3,9 +3,9 @@ package com.simibubi.create.content.contraptions.components.deployer;
import static com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE;
import static com.simibubi.create.content.contraptions.base.DirectionalKineticBlock.FACING;
-import com.jozufozu.flywheel.backend.core.PartialModel;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.RenderMaterial;
+import com.jozufozu.flywheel.core.PartialModel;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.IRotate;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java
index e638631ea..2a1f112b4 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerInstance.java
@@ -3,11 +3,11 @@ package com.simibubi.create.content.contraptions.components.deployer;
import static com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock.AXIS_ALONG_FIRST_COORDINATE;
import static com.simibubi.create.content.contraptions.base.DirectionalKineticBlock.FACING;
-import com.jozufozu.flywheel.backend.core.PartialModel;
-import com.jozufozu.flywheel.backend.core.materials.OrientedData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.ITickableInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.core.PartialModel;
+import com.jozufozu.flywheel.core.materials.OrientedData;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java
index ccac8329a..ca1c97b80 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerRenderer.java
@@ -4,7 +4,7 @@ import static com.simibubi.create.content.contraptions.base.DirectionalAxisKinet
import static com.simibubi.create.content.contraptions.base.DirectionalKineticBlock.FACING;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.simibubi.create.AllBlockPartials;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java
index db34e9ff4..8dbe3e5fb 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerTileEntity.java
@@ -7,7 +7,7 @@ import java.util.List;
import javax.annotation.Nullable;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllRecipeTypes;
@@ -407,7 +407,7 @@ public class DeployerTileEntity extends KineticTileEntity {
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java
index ef6f69d5b..059f42ea0 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/FlyWheelInstance.java
@@ -6,12 +6,12 @@ import java.util.Collections;
import java.util.List;
import com.google.common.collect.Lists;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.jozufozu.flywheel.backend.instancing.RenderMaterial;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileInstance;
@@ -158,7 +158,7 @@ public class FlyWheelInstance extends KineticTileInstance im
connectors.clear();
}
- protected InstancedModel shaftModel() {
+ protected Instancer shaftModel() {
Direction opposite = facing.getOpposite();
return getRotatingMaterial().getModel(AllBlockPartials.SHAFT_HALF, blockState, opposite);
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineBlock.java
index 6e8e09d51..a32696209 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineBlock.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineBlock.java
@@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.flywheel.engine;
import javax.annotation.Nullable;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.content.contraptions.wrench.IWrenchable;
import com.simibubi.create.foundation.utility.Iterate;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java
index f435111ae..cbfbdc0ae 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineInstance.java
@@ -1,9 +1,9 @@
package com.simibubi.create.content.contraptions.components.flywheel.engine;
-import com.jozufozu.flywheel.backend.core.PartialModel;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.jozufozu.flywheel.backend.instancing.TileEntityInstance;
+import com.jozufozu.flywheel.core.PartialModel;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.utility.AngleHelper;
import com.simibubi.create.foundation.utility.MatrixStacker;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineRenderer.java
index 017dd5e10..5be5fe8c3 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/EngineRenderer.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.components.flywheel.engine;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.render.PartialBufferer;
import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/FurnaceEngineBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/FurnaceEngineBlock.java
index 82ab8ffea..e3083ac1a 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/FurnaceEngineBlock.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/flywheel/engine/FurnaceEngineBlock.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.flywheel.engine;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllShapes;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java
index 7cad8bda9..84e325545 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/millstone/MillStoneCogInstance.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.components.millstone;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.base.RotatingData;
@@ -14,7 +14,7 @@ public class MillStoneCogInstance extends SingleRotatingInstance {
}
@Override
- protected InstancedModel getModel() {
+ protected Instancer getModel() {
return getRotatingMaterial().getModel(AllBlockPartials.MILLSTONE_COG, tile.getBlockState());
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java
index b49dd5432..490c4de1e 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/mixer/MixerInstance.java
@@ -1,8 +1,8 @@
package com.simibubi.create.content.contraptions.components.mixer;
-import com.jozufozu.flywheel.backend.core.materials.OrientedData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.core.materials.OrientedData;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.RotatingData;
import com.simibubi.create.content.contraptions.base.ShaftlessCogInstance;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java
index 86b386dfc..c4f68f4c7 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/press/PressInstance.java
@@ -1,8 +1,8 @@
package com.simibubi.create.content.contraptions.components.press;
-import com.jozufozu.flywheel.backend.core.materials.OrientedData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.core.materials.OrientedData;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance;
import com.simibubi.create.foundation.utility.AngleHelper;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java
index 47b49924a..0c2b57a0c 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawInstance.java
@@ -2,8 +2,8 @@ package com.simibubi.create.content.contraptions.components.saw;
import static net.minecraft.state.properties.BlockStateProperties.FACING;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.base.RotatingData;
@@ -20,7 +20,7 @@ public class SawInstance extends SingleRotatingInstance {
}
@Override
- protected InstancedModel getModel() {
+ protected Instancer getModel() {
if (blockState.get(FACING).getAxis().isHorizontal()) {
BlockState referenceState = blockState.rotate(tile.getWorld(), tile.getPos(), Rotation.CLOCKWISE_180);
Direction facing = referenceState.get(FACING);
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java
index b9303a69a..dba81ee8b 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawRenderer.java
@@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.components.saw;
import static net.minecraft.state.properties.BlockStateProperties.FACING;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.CreateClient;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java
index f7eca3cc1..56d099158 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/saw/SawTileEntity.java
@@ -280,7 +280,7 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity {
* RecipeConditions.isOfType(IRecipeType.STONECUTTING,
* AllRecipeTypes.CUTTING.getType()) :
* RecipeConditions.isOfType(AllRecipeTypes.CUTTING.getType());
- *
+ *
*/
Predicate> types = RecipeConditions.isOfType(AllRecipeTypes.CUTTING.getType(),
@@ -406,7 +406,7 @@ public class SawTileEntity extends BlockBreakingKineticTileEntity {
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java
index 7870953e9..d2ac984a1 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java
@@ -25,8 +25,8 @@ import javax.annotation.Nullable;
import org.apache.commons.lang3.tuple.MutablePair;
import org.apache.commons.lang3.tuple.Pair;
-import com.jozufozu.flywheel.backend.instancing.IFlywheelWorld;
-import com.jozufozu.flywheel.backend.light.GridAlignedBB;
+import com.jozufozu.flywheel.backend.IFlywheelWorld;
+import com.jozufozu.flywheel.light.GridAlignedBB;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllMovementBehaviours;
import com.simibubi.create.content.contraptions.base.IRotate;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionLighter.java
index 518fa9dff..0e5a776b3 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionLighter.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionLighter.java
@@ -1,15 +1,15 @@
package com.simibubi.create.content.contraptions.components.structureMovement;
-import com.jozufozu.flywheel.backend.light.GridAlignedBB;
-import com.jozufozu.flywheel.backend.light.LightUpdateListener;
-import com.jozufozu.flywheel.backend.light.LightUpdater;
-import com.jozufozu.flywheel.backend.light.LightVolume;
+import com.jozufozu.flywheel.light.GridAlignedBB;
+import com.jozufozu.flywheel.light.ILightUpdateListener;
+import com.jozufozu.flywheel.light.LightUpdater;
+import com.jozufozu.flywheel.light.LightVolume;
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
import net.minecraft.world.IBlockDisplayReader;
import net.minecraft.world.LightType;
-public abstract class ContraptionLighter implements LightUpdateListener {
+public abstract class ContraptionLighter implements ILightUpdateListener {
protected final C contraption;
public final LightVolume lightVolume;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java
index 50c0e7119..50345908c 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/NonStationaryLighter.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement;
-import com.jozufozu.flywheel.backend.light.GridAlignedBB;
+import com.jozufozu.flywheel.light.GridAlignedBB;
import com.simibubi.create.content.contraptions.components.structureMovement.render.RenderedContraption;
public class NonStationaryLighter extends ContraptionLighter {
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/AnchoredLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/AnchoredLighter.java
index 4a0489ca1..16bd4e82a 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/AnchoredLighter.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/AnchoredLighter.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement.bearing;
-import com.jozufozu.flywheel.backend.light.GridAlignedBB;
+import com.jozufozu.flywheel.light.GridAlignedBB;
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java
index 7ca1af20f..d797db75a 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingInstance.java
@@ -1,9 +1,9 @@
package com.simibubi.create.content.contraptions.components.structureMovement.bearing;
-import com.jozufozu.flywheel.backend.core.PartialModel;
-import com.jozufozu.flywheel.backend.core.materials.OrientedData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.core.PartialModel;
+import com.jozufozu.flywheel.core.materials.OrientedData;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.BackHalfShaftInstance;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java
index 02fd58228..acafdb8f9 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingRenderer.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.components.structureMovement.bearing;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java
index 1816c047c..8b1abf741 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/ClockworkBearingTileEntity.java
@@ -119,11 +119,11 @@ public class ClockworkBearingTileEntity extends KineticTileEntity
protected void applyRotations() {
BlockState blockState = getBlockState();
Axis axis = Axis.X;
-
+
if (blockState.contains(BlockStateProperties.FACING))
axis = blockState.get(BlockStateProperties.FACING)
.getAxis();
-
+
if (hourHand != null) {
hourHand.setAngle(hourAngle);
hourHand.setRotationAxis(axis);
@@ -417,7 +417,7 @@ public class ClockworkBearingTileEntity extends KineticTileEntity
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java
index d7ed6958b..1f936da5f 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/MechanicalBearingTileEntity.java
@@ -80,7 +80,7 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity
super.fromTag(state, compound, clientPacket);
return;
}
-
+
float angleBefore = angle;
running = compound.getBoolean("Running");
angle = compound.getFloat("Angle");
@@ -108,7 +108,7 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity
public void onSpeedChanged(float prevSpeed) {
super.onSpeedChanged(prevSpeed);
assembleNextTick = true;
-
+
if (movedContraption != null && Math.signum(prevSpeed) != Math.signum(getSpeed()) && prevSpeed != 0) {
movedContraption.getContraption()
.stop(world);
@@ -169,7 +169,7 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity
movedContraption.setPosition(anchor.getX(), anchor.getY(), anchor.getZ());
movedContraption.setRotationAxis(direction.getAxis());
world.addEntity(movedContraption);
-
+
AllSoundEvents.CONTRAPTION_ASSEMBLE.playOnServer(world, pos);
running = true;
@@ -323,7 +323,7 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java
index aea9824bc..dc30e3adf 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingInstance.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement.bearing;
-import com.jozufozu.flywheel.backend.core.materials.OrientedData;
+import com.jozufozu.flywheel.core.materials.OrientedData;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext;
import com.simibubi.create.content.contraptions.components.structureMovement.render.ActorInstance;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java
index 8afaa8bcc..5b13b7f9b 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/StabilizedBearingMovementBehaviour.java
@@ -3,7 +3,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be
import javax.annotation.Nullable;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.ControlledContraptionEntity;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java
index 9f595e99f..c6bbd204d 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/StickerInstance.java
@@ -1,9 +1,9 @@
package com.simibubi.create.content.contraptions.components.structureMovement.chassis;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.jozufozu.flywheel.backend.instancing.TileEntityInstance;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.foundation.utility.AngleHelper;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java
index c9be46e89..880400dbc 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageInstance.java
@@ -1,8 +1,8 @@
package com.simibubi.create.content.contraptions.components.structureMovement.gantry;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageTileEntity.java
index 055db9ed8..95ee3c8af 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/gantry/GantryCarriageTileEntity.java
@@ -36,7 +36,7 @@ public class GantryCarriageTileEntity extends KineticTileEntity implements IDisp
if (shouldAssemble())
queueAssembly();
}
-
+
@Override
public void initialize() {
super.initialize();
@@ -173,7 +173,7 @@ public class GantryCarriageTileEntity extends KineticTileEntity implements IDisp
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java
index 6070a9ccb..84fa87b31 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/piston/PistonLighter.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement.piston;
-import com.jozufozu.flywheel.backend.light.GridAlignedBB;
+import com.jozufozu.flywheel.light.GridAlignedBB;
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
import net.minecraft.util.math.vector.Vector3i;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyInstance.java
index d7b2f4886..0fad406f2 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyInstance.java
@@ -1,5 +1,20 @@
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
+import java.util.Arrays;
+
+import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
+import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
+import com.jozufozu.flywheel.core.instancing.ConditionalInstance;
+import com.jozufozu.flywheel.core.instancing.GroupInstance;
+import com.jozufozu.flywheel.core.instancing.SelectInstance;
+import com.jozufozu.flywheel.core.materials.OrientedData;
+import com.jozufozu.flywheel.light.GridAlignedBB;
+import com.jozufozu.flywheel.light.ILightUpdateListener;
+import com.jozufozu.flywheel.light.LightUpdater;
+import com.simibubi.create.content.contraptions.base.KineticTileEntity;
+import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance;
+
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
@@ -7,26 +22,11 @@ import net.minecraft.util.math.vector.Vector3f;
import net.minecraft.world.IBlockDisplayReader;
import net.minecraft.world.LightType;
-import java.util.Arrays;
-
-import com.jozufozu.flywheel.backend.core.materials.OrientedData;
-import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
-import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
-import com.jozufozu.flywheel.backend.instancing.util.ConditionalInstance;
-import com.jozufozu.flywheel.backend.instancing.util.InstanceGroup;
-import com.jozufozu.flywheel.backend.instancing.util.SelectInstance;
-import com.jozufozu.flywheel.backend.light.GridAlignedBB;
-import com.jozufozu.flywheel.backend.light.LightUpdateListener;
-import com.jozufozu.flywheel.backend.light.LightUpdater;
-import com.simibubi.create.content.contraptions.base.KineticTileEntity;
-import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance;
-
-public abstract class AbstractPulleyInstance extends ShaftInstance implements IDynamicInstance, LightUpdateListener {
+public abstract class AbstractPulleyInstance extends ShaftInstance implements IDynamicInstance, ILightUpdateListener {
final OrientedData coil;
final SelectInstance magnet;
- final InstanceGroup rope;
+ final GroupInstance rope;
final ConditionalInstance halfRope;
protected float offset;
@@ -51,7 +51,7 @@ public abstract class AbstractPulleyInstance extends ShaftInstance implements ID
magnet.addModel(getMagnetModel())
.addModel(getHalfMagnetModel());
- rope = new InstanceGroup<>(getRopeModel());
+ rope = new GroupInstance<>(getRopeModel());
halfRope = new ConditionalInstance<>(getHalfRopeModel(), this::shouldRenderHalfRope);
}
@@ -115,15 +115,15 @@ public abstract class AbstractPulleyInstance extends ShaftInstance implements ID
halfRope.delete();
}
- protected abstract InstancedModel getRopeModel();
+ protected abstract Instancer getRopeModel();
- protected abstract InstancedModel getMagnetModel();
+ protected abstract Instancer getMagnetModel();
- protected abstract InstancedModel getHalfMagnetModel();
+ protected abstract Instancer getHalfMagnetModel();
- protected abstract InstancedModel getCoilModel();
+ protected abstract Instancer getCoilModel();
- protected abstract InstancedModel getHalfRopeModel();
+ protected abstract Instancer getHalfRopeModel();
protected abstract float getOffset();
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyRenderer.java
index 13c77dca6..c5439f47d 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/AbstractPulleyRenderer.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.simibubi.create.content.contraptions.base.IRotate;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java
index 18ed0ed05..f9c8275ec 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/HosePulleyInstance.java
@@ -1,8 +1,8 @@
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
-import com.jozufozu.flywheel.backend.core.materials.OrientedData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
+import com.jozufozu.flywheel.core.materials.OrientedData;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.fluids.actors.HosePulleyTileEntity;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
@@ -15,23 +15,23 @@ public class HosePulleyInstance extends AbstractPulleyInstance {
beginFrame();
}
- protected InstancedModel getRopeModel() {
+ protected Instancer getRopeModel() {
return getOrientedMaterial().getModel(AllBlockPartials.HOSE, blockState);
}
- protected InstancedModel getMagnetModel() {
+ protected Instancer getMagnetModel() {
return getOrientedMaterial().getModel(AllBlockPartials.HOSE_MAGNET, blockState);
}
- protected InstancedModel getHalfMagnetModel() {
+ protected Instancer getHalfMagnetModel() {
return getOrientedMaterial().getModel(AllBlockPartials.HOSE_HALF_MAGNET, blockState);
}
- protected InstancedModel getCoilModel() {
+ protected Instancer getCoilModel() {
return getOrientedMaterial().getModel(AllBlockPartials.HOSE_COIL, blockState, rotatingAbout);
}
- protected InstancedModel getHalfRopeModel() {
+ protected Instancer getHalfRopeModel() {
return getOrientedMaterial().getModel(AllBlockPartials.HOSE_HALF, blockState);
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java
index 8235bc095..27d75fa07 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyLighter.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
-import com.jozufozu.flywheel.backend.light.GridAlignedBB;
+import com.jozufozu.flywheel.light.GridAlignedBB;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java
index 5ba2f892b..c1813dc06 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyRenderer.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.CreateClient;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java
index ec522e422..f892445c5 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/PulleyTileEntity.java
@@ -42,7 +42,7 @@ public class PulleyTileEntity extends LinearActuatorTileEntity {
public double getMaxRenderDistanceSquared() {
return super.getMaxRenderDistanceSquared() + offset * offset;
}
-
+
@Override
public void tick() {
super.tick();
@@ -200,7 +200,7 @@ public class PulleyTileEntity extends LinearActuatorTileEntity {
initialOffset = compound.getInt("InitialOffset");
super.fromTag(state, compound, clientPacket);
}
-
+
@Override
public void write(CompoundNBT compound, boolean clientPacket) {
compound.putInt("InitialOffset", initialOffset);
@@ -234,13 +234,13 @@ public class PulleyTileEntity extends LinearActuatorTileEntity {
boolean moving = running && (movedContraption == null || !movedContraption.isStalled());
return super.getInterpolatedOffset(moving ? partialTicks : 0.5f);
}
-
+
public void animateOffset(float forcedOffset) {
offset = forcedOffset;
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return false;
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java
index 5e90df5fd..7f8d03a7a 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/pulley/RopePulleyInstance.java
@@ -1,9 +1,9 @@
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
-import com.jozufozu.flywheel.backend.core.materials.OrientedData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
+import com.jozufozu.flywheel.core.materials.OrientedData;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
@@ -16,23 +16,23 @@ public class RopePulleyInstance extends AbstractPulleyInstance {
beginFrame();
}
- protected InstancedModel getRopeModel() {
+ protected Instancer getRopeModel() {
return getOrientedMaterial().getModel(AllBlocks.ROPE.getDefaultState());
}
- protected InstancedModel getMagnetModel() {
+ protected Instancer getMagnetModel() {
return getOrientedMaterial().getModel(AllBlocks.PULLEY_MAGNET.getDefaultState());
}
- protected InstancedModel getHalfMagnetModel() {
+ protected Instancer getHalfMagnetModel() {
return getOrientedMaterial().getModel(AllBlockPartials.ROPE_HALF_MAGNET, blockState);
}
- protected InstancedModel getCoilModel() {
+ protected Instancer getCoilModel() {
return getOrientedMaterial().getModel(AllBlockPartials.ROPE_COIL, blockState, rotatingAbout);
}
- protected InstancedModel getHalfRopeModel() {
+ protected Instancer getHalfRopeModel() {
return getOrientedMaterial().getModel(AllBlockPartials.ROPE_HALF, blockState);
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java
index a343ee9b8..529051f11 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionProgram.java
@@ -4,9 +4,9 @@ import java.util.List;
import org.lwjgl.opengl.GL20;
-import com.jozufozu.flywheel.backend.core.shader.WorldProgram;
-import com.jozufozu.flywheel.backend.core.shader.extension.IProgramExtension;
import com.jozufozu.flywheel.backend.loading.Program;
+import com.jozufozu.flywheel.core.shader.WorldProgram;
+import com.jozufozu.flywheel.core.shader.extension.IProgramExtension;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.vector.Matrix4f;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java
index b89680166..07d228a91 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/ContraptionRenderDispatcher.java
@@ -15,8 +15,8 @@ import java.util.stream.Stream;
import org.apache.commons.lang3.tuple.Pair;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.context.WorldContext;
import com.jozufozu.flywheel.backend.loading.ModelTemplate;
+import com.jozufozu.flywheel.core.WorldContext;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllMovementBehaviours;
import com.simibubi.create.CreateClient;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/EmptyLighter.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/EmptyLighter.java
index b46e9e1fb..da4a5384b 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/EmptyLighter.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/EmptyLighter.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement.render;
-import com.jozufozu.flywheel.backend.light.GridAlignedBB;
+import com.jozufozu.flywheel.light.GridAlignedBB;
import com.simibubi.create.content.contraptions.components.structureMovement.Contraption;
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionLighter;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/LightVolumeDebugger.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/LightVolumeDebugger.java
index c8d78bcf0..8645e4077 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/LightVolumeDebugger.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/LightVolumeDebugger.java
@@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.re
import java.util.ArrayList;
-import com.jozufozu.flywheel.backend.light.GridAlignedBB;
+import com.jozufozu.flywheel.light.GridAlignedBB;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java
index 40dce589a..5cf1f5953 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/render/RenderedContraption.java
@@ -10,12 +10,13 @@ import java.util.Map;
import javax.annotation.Nullable;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.BufferedArrayModel;
-import com.jozufozu.flywheel.backend.core.BufferedModel;
+import com.jozufozu.flywheel.backend.gl.GlPrimitive;
import com.jozufozu.flywheel.backend.gl.attrib.CommonAttributes;
import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
import com.jozufozu.flywheel.backend.instancing.IInstanceRendered;
-import com.jozufozu.flywheel.backend.light.GridAlignedBB;
+import com.jozufozu.flywheel.core.BufferedArrayModel;
+import com.jozufozu.flywheel.core.BufferedModel;
+import com.jozufozu.flywheel.light.GridAlignedBB;
import com.jozufozu.flywheel.util.BufferBuilderReader;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.content.contraptions.components.structureMovement.AbstractContraptionEntity;
@@ -71,7 +72,7 @@ public class RenderedContraption extends ContraptionWorldHolder {
BufferedModel structure = renderLayers.get(layer);
if (structure != null) {
setup(shader);
- structure.render();
+ structure.draw();
teardown();
}
}
@@ -194,8 +195,8 @@ public class RenderedContraption extends ContraptionWorldHolder {
to.rewind();
if (Backend.compat.vertexArrayObjectsSupported())
- return new BufferedArrayModel(format, to, vertexCount);
+ return new BufferedArrayModel(GlPrimitive.QUADS, format, to, vertexCount);
else
- return new BufferedModel(format, to, vertexCount);
+ return new BufferedModel(GlPrimitive.QUADS, format, to, vertexCount);
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java
index 2aae2c2d6..87b1fcacf 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpCogInstance.java
@@ -2,8 +2,8 @@ package com.simibubi.create.content.contraptions.fluids;
import static net.minecraft.state.properties.BlockStateProperties.FACING;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.base.RotatingData;
@@ -19,7 +19,7 @@ public class PumpCogInstance extends SingleRotatingInstance {
}
@Override
- protected InstancedModel getModel() {
+ protected Instancer getModel() {
BlockState referenceState = tile.getBlockState();
Direction facing = referenceState.get(FACING);
return getRotatingMaterial().getModel(AllBlockPartials.MECHANICAL_PUMP_COG, referenceState, facing);
diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpTileEntity.java
index 77dd51c68..1311e286d 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/PumpTileEntity.java
@@ -103,7 +103,7 @@ public class PumpTileEntity extends KineticTileEntity {
BlockPos backPos = pos.offset(getFront().getOpposite());
FluidPropagator.propagateChangedPipe(world, frontPos, world.getBlockState(frontPos));
FluidPropagator.propagateChangedPipe(world, backPos, world.getBlockState(backPos));
-
+
FluidTransportBehaviour behaviour = getBehaviour(FluidTransportBehaviour.TYPE);
if (behaviour != null)
behaviour.wipePressure();
@@ -380,7 +380,7 @@ public class PumpTileEntity extends KineticTileEntity {
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyRenderer.java
index 6615a4a09..1b93f3fa5 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyRenderer.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.fluids.actors;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.components.structureMovement.pulley.AbstractPulleyRenderer;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyTileEntity.java
index 7871b9e10..29e674ffb 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/HosePulleyTileEntity.java
@@ -194,7 +194,7 @@ public class HosePulleyTileEntity extends KineticTileEntity {
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutRenderer.java
index 20db657b8..56e8a77d6 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/actors/SpoutRenderer.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.fluids.actors;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.foundation.fluid.FluidRenderer;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java
index f3785b232..c50a0d5db 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveInstance.java
@@ -1,8 +1,8 @@
package com.simibubi.create.content.contraptions.fluids.pipes;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveTileEntity.java
index c57007b7f..8125ea16f 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/fluids/pipes/FluidValveTileEntity.java
@@ -78,9 +78,9 @@ public class FluidValveTileEntity extends KineticTileEntity {
public void addBehaviours(List behaviours) {
behaviours.add(new ValvePipeBehaviour(this));
}
-
+
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinOperatingTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinOperatingTileEntity.java
index d948c5af9..a4f77ed6d 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/processing/BasinOperatingTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/processing/BasinOperatingTileEntity.java
@@ -89,11 +89,11 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
return false;
return BasinRecipe.match(basin.get(), recipe);
}
-
+
protected void applyBasinRecipe() {
if (currentRecipe == null)
return;
-
+
Optional optionalBasin = getBasin();
if (!optionalBasin.isPresent())
return;
@@ -101,10 +101,10 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
if (!BasinRecipe.apply(basin, currentRecipe))
return;
Optional processedRecipeTrigger = getProcessedRecipeTrigger();
- if (world != null && !world.isRemote && processedRecipeTrigger.isPresent())
+ if (world != null && !world.isRemote && processedRecipeTrigger.isPresent())
AllTriggers.triggerForNearbyPlayers(processedRecipeTrigger.get(), world, pos, 4);
basin.inputTank.sendDataImmediately();
-
+
// Continue mixing
if (matchBasinRecipe(currentRecipe)) {
continueWithPreviousRecipe();
@@ -135,7 +135,7 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
return Optional.empty();
return Optional.of((BasinTileEntity) basinTE);
}
-
+
protected Optional getProcessedRecipeTrigger() {
return Optional.empty();
}
@@ -145,7 +145,7 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity {
protected abstract Object getRecipeCacheKey();
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java
index f581a022d..cf99503c0 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/processing/burner/BlazeBurnerRenderer.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.processing.burner;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.processing.burner.BlazeBurnerBlock.HeatLevel;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerTileEntity.java
index d173a0008..732ed470d 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/SpeedControllerTileEntity.java
@@ -116,9 +116,9 @@ public class SpeedControllerTileEntity extends KineticTileEntity {
hasBracket = ICogWheel.isDedicatedCogWheel(stateAbove.getBlock()) && ICogWheel.isLargeCog(stateAbove)
&& stateAbove.get(CogWheelBlock.AXIS).isHorizontal();
}
-
+
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltData.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltData.java
index 29264554a..2727ddbe1 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltData.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltData.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.relays.belt;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.simibubi.create.content.contraptions.base.KineticData;
import com.simibubi.create.foundation.block.render.SpriteShiftEntry;
@@ -21,7 +21,7 @@ public class BeltData extends KineticData {
private float maxV;
private byte scrollMult;
- public BeltData(InstancedModel> owner) {
+ public BeltData(Instancer> owner) {
super(owner);
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java
index f388fe75f..9b9ceb910 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltInstance.java
@@ -3,10 +3,10 @@ package com.simibubi.create.content.contraptions.relays.belt;
import java.util.ArrayList;
import java.util.function.Supplier;
-import com.jozufozu.flywheel.backend.core.PartialModel;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
@@ -61,7 +61,7 @@ public class BeltInstance extends KineticTileInstance {
PartialModel beltPartial = BeltRenderer.getBeltPartial(diagonal, start, end, bottom);
SpriteShiftEntry spriteShift = BeltRenderer.getSpriteShiftEntry(color, diagonal, bottom);
- InstancedModel beltModel = modelManager.getMaterial(AllMaterialSpecs.BELTS).getModel(beltPartial, blockState);
+ Instancer beltModel = modelManager.getMaterial(AllMaterialSpecs.BELTS).getModel(beltPartial, blockState);
keys.add(setup(beltModel.createInstance(), bottom, spriteShift));
@@ -69,7 +69,7 @@ public class BeltInstance extends KineticTileInstance {
}
if (tile.hasPulley()) {
- InstancedModel pulleyModel = getPulleyModel();
+ Instancer pulleyModel = getPulleyModel();
pulleyKey = setup(pulleyModel.createInstance());
}
@@ -121,7 +121,7 @@ public class BeltInstance extends KineticTileInstance {
return speed;
}
- private InstancedModel getPulleyModel() {
+ private Instancer getPulleyModel() {
Direction dir = getOrientation();
Direction.Axis axis = dir.getAxis();
diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java
index 1816a538f..6c6ab9ff5 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltRenderer.java
@@ -4,7 +4,7 @@ import java.util.Random;
import java.util.function.Supplier;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.simibubi.create.AllBlockPartials;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java
index 9dbf9e00c..76e4755e1 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java
@@ -13,9 +13,9 @@ import java.util.Optional;
import java.util.function.Function;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.light.GridAlignedBB;
-import com.jozufozu.flywheel.backend.light.LightUpdateListener;
-import com.jozufozu.flywheel.backend.light.LightUpdater;
+import com.jozufozu.flywheel.light.GridAlignedBB;
+import com.jozufozu.flywheel.light.ILightUpdateListener;
+import com.jozufozu.flywheel.light.LightUpdater;
import com.simibubi.create.AllBlocks;
import com.simibubi.create.content.contraptions.base.IRotate;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
@@ -60,7 +60,7 @@ import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
-public class BeltTileEntity extends KineticTileEntity implements LightUpdateListener {
+public class BeltTileEntity extends KineticTileEntity implements ILightUpdateListener {
public Map passengers;
public Optional color;
@@ -518,7 +518,7 @@ public class BeltTileEntity extends KineticTileEntity implements LightUpdateList
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
if (world == null)
return isController();
BlockState state = getBlockState();
diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java
index 39596f241..23ff796fc 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/relays/encased/SplitShaftInstance.java
@@ -3,8 +3,8 @@ package com.simibubi.create.content.contraptions.relays.encased;
import java.util.ArrayList;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.jozufozu.flywheel.backend.instancing.RenderMaterial;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.IRotate;
@@ -30,7 +30,7 @@ public class SplitShaftInstance extends KineticTileInstance half = rotatingMaterial.getModel(AllBlockPartials.SHAFT_HALF, blockState, dir);
+ Instancer half = rotatingMaterial.getModel(AllBlockPartials.SHAFT_HALF, blockState, dir);
float splitSpeed = speed * tile.getRotationSpeedModifier(dir);
diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java
index 684d14396..d054e653e 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeInstance.java
@@ -2,10 +2,10 @@ package com.simibubi.create.content.contraptions.relays.gauge;
import java.util.ArrayList;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
@@ -32,8 +32,8 @@ public abstract class GaugeInstance extends ShaftInstance implements IDynamicIns
GaugeTileEntity gaugeTile = (GaugeTileEntity) tile;
GaugeBlock gaugeBlock = (GaugeBlock) blockState.getBlock();
- InstancedModel dialModel = getTransformMaterial().getModel(AllBlockPartials.GAUGE_DIAL, blockState);
- InstancedModel headModel = getHeadModel();
+ Instancer dialModel = getTransformMaterial().getModel(AllBlockPartials.GAUGE_DIAL, blockState);
+ Instancer headModel = getHeadModel();
ms = new MatrixStack();
MatrixStacker msr = MatrixStacker.of(ms);
@@ -53,7 +53,7 @@ public abstract class GaugeInstance extends ShaftInstance implements IDynamicIns
}
}
- private DialFace makeFace(Direction face, InstancedModel dialModel, InstancedModel headModel) {
+ private DialFace makeFace(Direction face, Instancer dialModel, Instancer headModel) {
return new DialFace(face, dialModel.createInstance(), headModel.createInstance());
}
@@ -88,7 +88,7 @@ public abstract class GaugeInstance extends ShaftInstance implements IDynamicIns
faces.forEach(DialFace::delete);
}
- protected abstract InstancedModel getHeadModel();
+ protected abstract Instancer getHeadModel();
private class DialFace extends Couple {
@@ -149,7 +149,7 @@ public abstract class GaugeInstance extends ShaftInstance implements IDynamicIns
}
@Override
- protected InstancedModel getHeadModel() {
+ protected Instancer getHeadModel() {
return getTransformMaterial().getModel(AllBlockPartials.GAUGE_HEAD_SPEED, blockState);
}
}
@@ -160,7 +160,7 @@ public abstract class GaugeInstance extends ShaftInstance implements IDynamicIns
}
@Override
- protected InstancedModel getHeadModel() {
+ protected Instancer getHeadModel() {
return getTransformMaterial().getModel(AllBlockPartials.GAUGE_HEAD_STRESS, blockState);
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java
index 01a5a7e7f..4649333e4 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeRenderer.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.relays.gauge;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.simibubi.create.AllBlockPartials;
diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeTileEntity.java
index 13dac75fa..1a1c4a8b2 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gauge/GaugeTileEntity.java
@@ -53,7 +53,7 @@ public class GaugeTileEntity extends KineticTileEntity implements IHaveGoggleInf
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
}
diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java
index cf85386ac..d26ec2b62 100644
--- a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java
+++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/GearboxInstance.java
@@ -4,8 +4,8 @@ import java.util.EnumMap;
import java.util.Map;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.jozufozu.flywheel.backend.instancing.RenderMaterial;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileInstance;
@@ -40,7 +40,7 @@ public class GearboxInstance extends KineticTileInstance {
if (boxAxis == axis)
continue;
- InstancedModel shaft = rotatingMaterial.getModel(AllBlockPartials.SHAFT_HALF, blockState, direction);
+ Instancer shaft = rotatingMaterial.getModel(AllBlockPartials.SHAFT_HALF, blockState, direction);
RotatingData key = shaft.createInstance();
diff --git a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankInstance.java b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankInstance.java
index 46a4c6ff6..6cedfac43 100644
--- a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankInstance.java
+++ b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankInstance.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.curiosities.armor;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.KineticTileEntity;
import com.simibubi.create.content.contraptions.base.RotatingData;
@@ -14,7 +14,7 @@ public class CopperBacktankInstance extends SingleRotatingInstance {
}
@Override
- protected InstancedModel getModel() {
+ protected Instancer getModel() {
return getRotatingMaterial().getModel(AllBlockPartials.COPPER_BACKTANK_SHAFT, blockState);
}
diff --git a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java
index b38a3d841..30b63d8c2 100644
--- a/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/curiosities/armor/CopperBacktankTileEntity.java
@@ -121,9 +121,9 @@ public class CopperBacktankTileEntity extends KineticTileEntity implements IName
: new TranslationTextComponent(AllItems.COPPER_BACKTANK.get()
.getTranslationKey());
}
-
+
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/CrossPlaneMirror.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/CrossPlaneMirror.java
index 45894d199..562393881 100644
--- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/CrossPlaneMirror.java
+++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/CrossPlaneMirror.java
@@ -5,7 +5,7 @@ import java.util.List;
import java.util.Map;
import com.google.common.collect.ImmutableList;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.foundation.utility.Lang;
diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/EmptyMirror.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/EmptyMirror.java
index 0fc2fe73b..0fbdba41f 100644
--- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/EmptyMirror.java
+++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/EmptyMirror.java
@@ -5,7 +5,7 @@ import java.util.List;
import java.util.Map;
import com.google.common.collect.ImmutableList;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import net.minecraft.block.BlockState;
import net.minecraft.util.IStringSerializable;
diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/PlaneMirror.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/PlaneMirror.java
index 2d849ba46..af20b66ef 100644
--- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/PlaneMirror.java
+++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/PlaneMirror.java
@@ -5,7 +5,7 @@ import java.util.List;
import java.util.Map;
import com.google.common.collect.ImmutableList;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.foundation.utility.Lang;
diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/SymmetryMirror.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/SymmetryMirror.java
index 46df9226b..d704c0723 100644
--- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/SymmetryMirror.java
+++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/SymmetryMirror.java
@@ -5,7 +5,7 @@ import java.util.List;
import java.util.Map;
import com.google.common.collect.ImmutableList;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.utility.Lang;
diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/TriplePlaneMirror.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/TriplePlaneMirror.java
index 9cac8c376..abf923a58 100644
--- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/TriplePlaneMirror.java
+++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/mirror/TriplePlaneMirror.java
@@ -5,7 +5,7 @@ import java.util.List;
import java.util.Map;
import com.google.common.collect.ImmutableList;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.foundation.utility.Lang;
diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java
index 7f3d7c31b..17fadd6c2 100644
--- a/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java
+++ b/src/main/java/com/simibubi/create/content/curiosities/tools/ExtendoGripRenderHandler.java
@@ -1,6 +1,6 @@
package com.simibubi.create.content.curiosities.tools;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllItems;
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/FlapData.java b/src/main/java/com/simibubi/create/content/logistics/block/FlapData.java
index 8b51aca11..25d0e0b6a 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/FlapData.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/FlapData.java
@@ -1,9 +1,9 @@
package com.simibubi.create.content.logistics.block;
-import com.jozufozu.flywheel.backend.core.materials.IFlatLight;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
+import com.jozufozu.flywheel.core.materials.IFlatLight;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Vector3f;
@@ -30,7 +30,7 @@ public class FlapData extends InstanceData implements IFlatLight {
private float flapness;
- public FlapData(InstancedModel> owner) {
+ public FlapData(Instancer> owner) {
super(owner);
}
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java
index 9abe8e68c..b9ba09d16 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelInstance.java
@@ -7,8 +7,8 @@ import java.util.Map;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.jozufozu.flywheel.backend.instancing.TileEntityInstance;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.logistics.block.FlapData;
@@ -28,7 +28,7 @@ public class BeltTunnelInstance extends TileEntityInstance
tunnelFlaps = new EnumMap<>(Direction.class);
- InstancedModel model = modelManager.getMaterial(AllMaterialSpecs.FLAPS)
+ Instancer model = modelManager.getMaterial(AllMaterialSpecs.FLAPS)
.getModel(AllBlockPartials.BELT_TUNNEL_FLAP, blockState);
int blockLight = world.getLightLevel(LightType.BLOCK, pos);
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java
index 63046c288..b206b0cbc 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelTileEntity.java
@@ -176,7 +176,7 @@ public class BeltTunnelTileEntity extends SmartTileEntity implements IInstanceRe
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java
index 7b2f66191..80ae1ac06 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorInstance.java
@@ -1,8 +1,8 @@
package com.simibubi.create.content.logistics.block.depot;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.relays.encased.ShaftInstance;
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java
index 5188e1ab0..c55fb02a1 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/depot/EjectorTileEntity.java
@@ -542,7 +542,7 @@ public class EjectorTileEntity extends KineticTileEntity {
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterInstance.java
index e6abc4765..b28877f05 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterInstance.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/diodes/AdjustableRepeaterInstance.java
@@ -1,9 +1,9 @@
package com.simibubi.create.content.logistics.block.diodes;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.ITickableInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.jozufozu.flywheel.backend.instancing.TileEntityInstance;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.foundation.utility.ColorHelper;
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java
index ef501a549..df5270be5 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelInstance.java
@@ -2,12 +2,12 @@ package com.simibubi.create.content.logistics.block.funnel;
import java.util.ArrayList;
-import com.jozufozu.flywheel.backend.core.PartialModel;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.jozufozu.flywheel.backend.instancing.TileEntityInstance;
+import com.jozufozu.flywheel.core.PartialModel;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.logistics.block.FlapData;
import com.simibubi.create.foundation.render.AllMaterialSpecs;
@@ -29,7 +29,7 @@ public class FunnelInstance extends TileEntityInstance impleme
PartialModel flapPartial = (blockState.getBlock() instanceof FunnelBlock ? AllBlockPartials.FUNNEL_FLAP
: AllBlockPartials.BELT_FUNNEL_FLAP);
- InstancedModel model = modelManager.getMaterial(AllMaterialSpecs.FLAPS)
+ Instancer model = modelManager.getMaterial(AllMaterialSpecs.FLAPS)
.getModel(flapPartial, blockState);
int blockLight = world.getLightLevel(LightType.BLOCK, pos);
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java
index 1c5a468d6..48d8d7f9f 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelRenderer.java
@@ -1,7 +1,7 @@
package com.simibubi.create.content.logistics.block.funnel;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.simibubi.create.AllBlockPartials;
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java
index 10cba6b83..47e3bff94 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelTileEntity.java
@@ -341,7 +341,7 @@ public class FunnelTileEntity extends SmartTileEntity implements IHaveHoveringIn
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java
index 42912a6a2..293bb2f57 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInstance.java
@@ -3,12 +3,12 @@ package com.simibubi.create.content.logistics.block.mechanicalArm;
import java.util.ArrayList;
import com.google.common.collect.Lists;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
-import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
+import com.jozufozu.flywheel.backend.instancing.Instancer;
import com.jozufozu.flywheel.backend.instancing.RenderMaterial;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.content.contraptions.base.RotatingData;
@@ -55,7 +55,7 @@ public class ArmInstance extends SingleRotatingInstance implements IDynamicInsta
head = mat.getModel(AllBlockPartials.ARM_HEAD, blockState).createInstance();
claw = mat.getModel(AllBlockPartials.ARM_CLAW_BASE, blockState).createInstance();
- InstancedModel clawHalfModel = mat.getModel(AllBlockPartials.ARM_CLAW_GRIP, blockState);
+ Instancer clawHalfModel = mat.getModel(AllBlockPartials.ARM_CLAW_GRIP, blockState);
ModelData clawGrip1 = clawHalfModel.createInstance();
ModelData clawGrip2 = clawHalfModel.createInstance();
@@ -173,7 +173,7 @@ public class ArmInstance extends SingleRotatingInstance implements IDynamicInsta
}
@Override
- protected InstancedModel getModel() {
+ protected Instancer getModel() {
return getRotatingMaterial().getModel(AllBlockPartials.ARM_COG, tile.getBlockState());
}
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java
index bb8f4e297..2a0398b38 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmInteractionPoint.java
@@ -7,7 +7,7 @@ import javax.annotation.Nullable;
import org.apache.commons.lang3.mutable.MutableBoolean;
import com.google.common.collect.ImmutableMap;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.AllBlocks;
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java
index 6fcd86229..9db6a126a 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/mechanicalArm/ArmTileEntity.java
@@ -504,7 +504,7 @@ public class ArmTileEntity extends KineticTileEntity {
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java
index 705fde20f..b80f946e7 100644
--- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java
+++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/AnalogLeverInstance.java
@@ -1,10 +1,10 @@
package com.simibubi.create.content.logistics.block.redstone;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.jozufozu.flywheel.backend.instancing.RenderMaterial;
import com.jozufozu.flywheel.backend.instancing.TileEntityInstance;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.foundation.utility.AngleHelper;
diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java
index 9568583db..1c647775d 100644
--- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java
+++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInstance.java
@@ -1,10 +1,10 @@
package com.simibubi.create.content.schematics.block;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.jozufozu.flywheel.backend.instancing.RenderMaterial;
import com.jozufozu.flywheel.backend.instancing.TileEntityInstance;
+import com.jozufozu.flywheel.core.materials.ModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllBlockPartials;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java
index f99431e6c..435ed5a41 100644
--- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java
+++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java
@@ -1005,7 +1005,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC
}
@Override
- public boolean shouldRenderAsTE() {
+ public boolean shouldRenderNormally() {
return true;
}
}
diff --git a/src/main/java/com/simibubi/create/events/ClientEvents.java b/src/main/java/com/simibubi/create/events/ClientEvents.java
index 77d261d04..9205329ca 100644
--- a/src/main/java/com/simibubi/create/events/ClientEvents.java
+++ b/src/main/java/com/simibubi/create/events/ClientEvents.java
@@ -5,8 +5,8 @@ import java.util.List;
import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.backend.RenderWork;
-import com.jozufozu.flywheel.backend.core.WorldTileRenderer;
-import com.jozufozu.flywheel.backend.core.shader.WorldProgram;
+import com.jozufozu.flywheel.core.WorldTileRenderer;
+import com.jozufozu.flywheel.core.shader.WorldProgram;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.AllFluids;
diff --git a/src/main/java/com/simibubi/create/foundation/data/CreateTileEntityBuilder.java b/src/main/java/com/simibubi/create/foundation/data/CreateTileEntityBuilder.java
index 0a9530d23..151c9097b 100644
--- a/src/main/java/com/simibubi/create/foundation/data/CreateTileEntityBuilder.java
+++ b/src/main/java/com/simibubi/create/foundation/data/CreateTileEntityBuilder.java
@@ -46,7 +46,7 @@ public class CreateTileEntityBuilder extends TileEntity
OneTimeEventReceiver.addModListener(FMLClientSetupEvent.class, ($) -> {
NonNullSupplier> instanceFactory = this.instanceFactory;
if (instanceFactory != null) {
- InstancedTileRenderRegistry.instance.register(getEntry(), instanceFactory.get());
+ InstancedTileRenderRegistry.getInstance().register(getEntry(), instanceFactory.get());
}
});
diff --git a/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java b/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java
index 037ceed34..720b3e87c 100644
--- a/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java
+++ b/src/main/java/com/simibubi/create/foundation/gui/GuiGameElement.java
@@ -2,7 +2,7 @@ package com.simibubi.create.foundation.gui;
import javax.annotation.Nullable;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.jozufozu.flywheel.util.VirtualEmptyModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.platform.GlStateManager;
diff --git a/src/main/java/com/simibubi/create/foundation/mixin/flywheel/CancelTileEntityRenderMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/flywheel/CancelTileEntityRenderMixin.java
index 4f1c95202..b27b2e31d 100644
--- a/src/main/java/com/simibubi/create/foundation/mixin/flywheel/CancelTileEntityRenderMixin.java
+++ b/src/main/java/com/simibubi/create/foundation/mixin/flywheel/CancelTileEntityRenderMixin.java
@@ -30,7 +30,7 @@ public class CancelTileEntityRenderMixin {
if (Backend.canUseInstancing()) {
List tiles = cir.getReturnValue();
- tiles.removeIf(tile -> tile instanceof IInstanceRendered && !((IInstanceRendered) tile).shouldRenderAsTE());
+ tiles.removeIf(tile -> tile instanceof IInstanceRendered && !((IInstanceRendered) tile).shouldRenderNormally());
}
}
}
diff --git a/src/main/java/com/simibubi/create/foundation/mixin/flywheel/FogColorTrackerMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/flywheel/FogColorTrackerMixin.java
index 508caedc2..255857075 100644
--- a/src/main/java/com/simibubi/create/foundation/mixin/flywheel/FogColorTrackerMixin.java
+++ b/src/main/java/com/simibubi/create/foundation/mixin/flywheel/FogColorTrackerMixin.java
@@ -6,7 +6,7 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-import com.jozufozu.flywheel.backend.core.shader.GlFog;
+import com.jozufozu.flywheel.core.shader.GlFog;
import com.mojang.blaze3d.platform.GlStateManager;
@Mixin(GlStateManager.class)
diff --git a/src/main/java/com/simibubi/create/foundation/mixin/flywheel/TileWorldHookMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/flywheel/TileWorldHookMixin.java
index 246127c0a..63bc66a82 100644
--- a/src/main/java/com/simibubi/create/foundation/mixin/flywheel/TileWorldHookMixin.java
+++ b/src/main/java/com/simibubi/create/foundation/mixin/flywheel/TileWorldHookMixin.java
@@ -11,8 +11,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.WorldTileRenderer;
-import com.jozufozu.flywheel.backend.core.shader.WorldProgram;
+import com.jozufozu.flywheel.core.WorldTileRenderer;
+import com.jozufozu.flywheel.core.shader.WorldProgram;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
diff --git a/src/main/java/com/simibubi/create/foundation/mixin/flywheel/light/LightUpdateMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/flywheel/light/LightUpdateMixin.java
index 7319e0a96..d08a6d67e 100644
--- a/src/main/java/com/simibubi/create/foundation/mixin/flywheel/light/LightUpdateMixin.java
+++ b/src/main/java/com/simibubi/create/foundation/mixin/flywheel/light/LightUpdateMixin.java
@@ -8,7 +8,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.light.LightUpdater;
+import com.jozufozu.flywheel.light.LightUpdater;
import net.minecraft.client.multiplayer.ClientChunkProvider;
import net.minecraft.client.world.ClientWorld;
diff --git a/src/main/java/com/simibubi/create/foundation/mixin/flywheel/light/NetworkLightUpdateMixin.java b/src/main/java/com/simibubi/create/foundation/mixin/flywheel/light/NetworkLightUpdateMixin.java
index 2f65f4ae9..b87465381 100644
--- a/src/main/java/com/simibubi/create/foundation/mixin/flywheel/light/NetworkLightUpdateMixin.java
+++ b/src/main/java/com/simibubi/create/foundation/mixin/flywheel/light/NetworkLightUpdateMixin.java
@@ -7,7 +7,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.backend.RenderWork;
-import com.jozufozu.flywheel.backend.light.LightUpdater;
+import com.jozufozu.flywheel.light.LightUpdater;
import net.minecraft.client.Minecraft;
import net.minecraft.client.network.play.ClientPlayNetHandler;
diff --git a/src/main/java/com/simibubi/create/foundation/render/AllMaterialSpecs.java b/src/main/java/com/simibubi/create/foundation/render/AllMaterialSpecs.java
index ce9d21249..562ac7c26 100644
--- a/src/main/java/com/simibubi/create/foundation/render/AllMaterialSpecs.java
+++ b/src/main/java/com/simibubi/create/foundation/render/AllMaterialSpecs.java
@@ -2,11 +2,11 @@ package com.simibubi.create.foundation.render;
import static com.jozufozu.flywheel.backend.Backend.register;
-import com.jozufozu.flywheel.backend.core.materials.ModelData;
-import com.jozufozu.flywheel.backend.core.materials.OrientedData;
import com.jozufozu.flywheel.backend.gl.attrib.CommonAttributes;
import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
import com.jozufozu.flywheel.backend.instancing.MaterialSpec;
+import com.jozufozu.flywheel.core.materials.ModelData;
+import com.jozufozu.flywheel.core.materials.OrientedData;
import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.base.RotatingData;
import com.simibubi.create.content.contraptions.components.actors.ActorData;
diff --git a/src/main/java/com/simibubi/create/foundation/render/Compartment.java b/src/main/java/com/simibubi/create/foundation/render/Compartment.java
index 8c7e45338..59a601df4 100644
--- a/src/main/java/com/simibubi/create/foundation/render/Compartment.java
+++ b/src/main/java/com/simibubi/create/foundation/render/Compartment.java
@@ -2,7 +2,7 @@ package com.simibubi.create.foundation.render;
import org.apache.commons.lang3.tuple.Pair;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import net.minecraft.block.BlockState;
import net.minecraft.util.Direction;
diff --git a/src/main/java/com/simibubi/create/foundation/render/PartialBufferer.java b/src/main/java/com/simibubi/create/foundation/render/PartialBufferer.java
index a41249fa9..7a8af4c23 100644
--- a/src/main/java/com/simibubi/create/foundation/render/PartialBufferer.java
+++ b/src/main/java/com/simibubi/create/foundation/render/PartialBufferer.java
@@ -4,7 +4,7 @@ import static net.minecraft.state.properties.BlockStateProperties.FACING;
import java.util.function.Supplier;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.CreateClient;
import com.simibubi.create.foundation.utility.AngleHelper;
diff --git a/src/main/java/com/simibubi/create/foundation/render/SuperByteBufferCache.java b/src/main/java/com/simibubi/create/foundation/render/SuperByteBufferCache.java
index 1fbebb0aa..d11742f51 100644
--- a/src/main/java/com/simibubi/create/foundation/render/SuperByteBufferCache.java
+++ b/src/main/java/com/simibubi/create/foundation/render/SuperByteBufferCache.java
@@ -11,7 +11,7 @@ import org.lwjgl.opengl.GL11;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
-import com.jozufozu.flywheel.backend.core.PartialModel;
+import com.jozufozu.flywheel.core.PartialModel;
import com.jozufozu.flywheel.util.VirtualEmptyModelData;
import com.mojang.blaze3d.matrix.MatrixStack;
diff --git a/src/main/java/com/simibubi/create/foundation/render/effects/EffectsContext.java b/src/main/java/com/simibubi/create/foundation/render/effects/EffectsContext.java
index d0510522f..6f42dbd43 100644
--- a/src/main/java/com/simibubi/create/foundation/render/effects/EffectsContext.java
+++ b/src/main/java/com/simibubi/create/foundation/render/effects/EffectsContext.java
@@ -5,9 +5,9 @@ import java.util.Collections;
import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.backend.ShaderContext;
import com.jozufozu.flywheel.backend.ShaderLoader;
-import com.jozufozu.flywheel.backend.core.shader.IMultiProgram;
-import com.jozufozu.flywheel.backend.core.shader.spec.ProgramSpec;
import com.jozufozu.flywheel.backend.loading.ShaderTransformer;
+import com.jozufozu.flywheel.core.shader.IMultiProgram;
+import com.jozufozu.flywheel.core.shader.spec.ProgramSpec;
import com.simibubi.create.foundation.render.AllProgramSpecs;
public class EffectsContext extends ShaderContext {
diff --git a/src/main/java/com/simibubi/create/foundation/render/effects/EffectsHandler.java b/src/main/java/com/simibubi/create/foundation/render/effects/EffectsHandler.java
index 2e3e71301..c8095eff5 100644
--- a/src/main/java/com/simibubi/create/foundation/render/effects/EffectsHandler.java
+++ b/src/main/java/com/simibubi/create/foundation/render/effects/EffectsHandler.java
@@ -9,7 +9,7 @@ import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GL30;
import com.jozufozu.flywheel.backend.Backend;
-import com.jozufozu.flywheel.backend.core.FullscreenQuad;
+import com.jozufozu.flywheel.core.FullscreenQuad;
import com.jozufozu.flywheel.util.RenderUtil;
import com.simibubi.create.foundation.render.AllProgramSpecs;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
diff --git a/src/main/java/com/simibubi/create/foundation/render/effects/SphereFilterProgram.java b/src/main/java/com/simibubi/create/foundation/render/effects/SphereFilterProgram.java
index b11f9c5d4..3b69fa5db 100644
--- a/src/main/java/com/simibubi/create/foundation/render/effects/SphereFilterProgram.java
+++ b/src/main/java/com/simibubi/create/foundation/render/effects/SphereFilterProgram.java
@@ -5,12 +5,12 @@ import java.util.ArrayList;
import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GL31;
-import com.jozufozu.flywheel.backend.core.shader.IMultiProgram;
import com.jozufozu.flywheel.backend.gl.buffer.GlBuffer;
import com.jozufozu.flywheel.backend.gl.buffer.GlBufferType;
import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
import com.jozufozu.flywheel.backend.gl.shader.GlProgram;
import com.jozufozu.flywheel.backend.loading.Program;
+import com.jozufozu.flywheel.core.shader.IMultiProgram;
import net.minecraft.util.math.vector.Matrix4f;
import net.minecraft.util.math.vector.Vector3d;
diff --git a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/PlacementSimulationWorld.java b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/PlacementSimulationWorld.java
index 733b8fd60..e0f1c9806 100644
--- a/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/PlacementSimulationWorld.java
+++ b/src/main/java/com/simibubi/create/foundation/utility/worldWrappers/PlacementSimulationWorld.java
@@ -7,7 +7,7 @@ import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
-import com.jozufozu.flywheel.backend.instancing.IFlywheelWorld;
+import com.jozufozu.flywheel.backend.IFlywheelWorld;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;