listeners;
-
- public MaterialManager(WorldContext context) {
- this(context, MaterialGroup::new, false);
- }
-
- public static
Builder
builder(WorldContext
context) {
- return new Builder<>(context);
- }
-
- public MaterialManager(WorldContext
context, GroupFactory
groupFactory, boolean ignoreOriginCoordinate) {
- this.context = context;
- this.ignoreOriginCoordinate = ignoreOriginCoordinate;
-
- this.listeners = new WeakHashSet<>();
- this.groupFactory = groupFactory;
-
- this.layers = new EnumMap<>(RenderLayer.class);
- for (RenderLayer value : RenderLayer.values()) {
- layers.put(value, new HashMap<>());
- }
- }
+public interface MaterialManager {
/**
* Get a material group that will render in the given layer with the given state.
@@ -66,162 +16,31 @@ public class MaterialManager
{
* @param state The {@link IRenderState} you need to draw with.
* @return A material group whose children will
*/
- public MaterialGroup
state(RenderLayer layer, IRenderState state) {
- return layers.get(layer).computeIfAbsent(state, this::createGroup);
+ MaterialGroup state(RenderLayer layer, IRenderState state);
+
+ Vector3i getOriginCoordinate();
+
+ default MaterialGroup solid(IRenderState state) {
+ return state(RenderLayer.SOLID, state);
}
- public MaterialGroup
solid(IRenderState state) {
- return layers.get(RenderLayer.SOLID).computeIfAbsent(state, this::createGroup);
+ default MaterialGroup cutout(IRenderState state) {
+ return state(RenderLayer.CUTOUT, state);
}
- public MaterialGroup
cutout(IRenderState state) {
- return layers.get(RenderLayer.CUTOUT).computeIfAbsent(state, this::createGroup);
+ default MaterialGroup transparent(IRenderState state) {
+ return state(RenderLayer.TRANSPARENT, state);
}
- public MaterialGroup
transparent(IRenderState state) {
- return layers.get(RenderLayer.TRANSPARENT).computeIfAbsent(state, this::createGroup);
- }
-
- public MaterialGroup
defaultSolid() {
+ default MaterialGroup defaultSolid() {
return solid(TextureRenderState.get(PlayerContainer.BLOCK_ATLAS));
}
- public MaterialGroup
defaultCutout() {
+ default MaterialGroup defaultCutout() {
return cutout(TextureRenderState.get(PlayerContainer.BLOCK_ATLAS));
}
- public MaterialGroup
defaultTransparent() {
+ default MaterialGroup defaultTransparent() {
return transparent(TextureRenderState.get(PlayerContainer.BLOCK_ATLAS));
}
-
- /**
- * Render every model for every material.
- * @param layer Which of the 3 {@link RenderLayer render layers} is being drawn?
- * @param viewProjection How do we get from camera space to clip space?
- */
- public void render(RenderLayer layer, Matrix4f viewProjection, double camX, double camY, double camZ) {
- if (!ignoreOriginCoordinate) {
- camX -= originCoordinate.getX();
- camY -= originCoordinate.getY();
- camZ -= originCoordinate.getZ();
-
- Matrix4f translate = Matrix4f.createTranslateMatrix((float) -camX, (float) -camY, (float) -camZ);
-
- translate.multiplyBackward(viewProjection);
-
- viewProjection = translate;
- }
-
- for (Map.Entry> entry : layers.get(layer).entrySet()) {
- IRenderState state = entry.getKey();
- MaterialGroup group = entry.getValue();
-
- state.bind();
- group.render(viewProjection, camX, camY, camZ);
- state.unbind();
- }
- }
-
- public void delete() {
- for (Map> groups : layers.values()) {
-
- groups.values().forEach(MaterialGroup::delete);
- }
- }
-
- @Deprecated
- public InstanceMaterial getMaterial(MaterialSpec materialType) {
- return defaultCutout().material(materialType);
- }
-
- @Deprecated
- public InstanceMaterial getMaterial(MaterialSpec materialType, ResourceLocation texture) {
- return cutout(TextureRenderState.get(texture)).material(materialType);
- }
-
- @Deprecated
- public InstanceMaterial getTransformMaterial() {
- return defaultCutout().material(Materials.TRANSFORMED);
- }
-
- @Deprecated
- public InstanceMaterial getOrientedMaterial() {
- return defaultCutout().material(Materials.ORIENTED);
- }
-
- public Supplier getProgram(ResourceLocation name) {
- return context.getProgramSupplier(name);
- }
-
- public Vector3i getOriginCoordinate() {
- return originCoordinate;
- }
-
- public void addListener(OriginShiftListener listener) {
- listeners.add(listener);
- }
-
- /**
- * Maintain the integer origin coordinate to be within a certain distance from the camera in all directions.
- *
- * This prevents floating point precision issues at high coordinates.
- */
- public void checkAndShiftOrigin(ActiveRenderInfo info) {
- int cX = MathHelper.floor(info.getPosition().x);
- int cY = MathHelper.floor(info.getPosition().y);
- int cZ = MathHelper.floor(info.getPosition().z);
-
- int dX = cX - originCoordinate.getX();
- int dY = cY - originCoordinate.getY();
- int dZ = cZ - originCoordinate.getZ();
-
- if (Math.abs(dX) > MAX_ORIGIN_DISTANCE || Math.abs(dY) > MAX_ORIGIN_DISTANCE || Math.abs(dZ) > MAX_ORIGIN_DISTANCE) {
-
- originCoordinate = new BlockPos(cX, cY, cZ);
-
- for (Map> groups : layers.values()) {
- groups.values().forEach(MaterialGroup::clear);
- }
-
- listeners.forEach(OriginShiftListener::onOriginShift);
- }
- }
-
- private MaterialGroup createGroup(IRenderState state) {
- return groupFactory.create(this, state);
- }
-
- @FunctionalInterface
- public interface OriginShiftListener {
- void onOriginShift();
- }
-
- @FunctionalInterface
- public interface GroupFactory
{
- MaterialGroup
create(MaterialManager
materialManager, IRenderState state);
- }
-
- public static class Builder
{
- protected final WorldContext
context;
- protected GroupFactory
groupFactory = MaterialGroup::new;
- protected boolean ignoreOriginCoordinate;
-
- public Builder(WorldContext
context) {
- this.context = context;
- }
-
- public Builder
setGroupFactory(GroupFactory
groupFactory) {
- this.groupFactory = groupFactory;
- return this;
- }
-
- public Builder
setIgnoreOriginCoordinate(boolean ignoreOriginCoordinate) {
- this.ignoreOriginCoordinate = ignoreOriginCoordinate;
- return this;
- }
-
- public MaterialManager
build() {
- return new MaterialManager<>(context, groupFactory, ignoreOriginCoordinate);
- }
- }
}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/material/MaterialManagerImpl.java b/src/main/java/com/jozufozu/flywheel/backend/material/MaterialManagerImpl.java
new file mode 100644
index 000000000..f6771ddf7
--- /dev/null
+++ b/src/main/java/com/jozufozu/flywheel/backend/material/MaterialManagerImpl.java
@@ -0,0 +1,179 @@
+package com.jozufozu.flywheel.backend.material;
+
+import java.util.EnumMap;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.Supplier;
+
+import com.jozufozu.flywheel.backend.state.IRenderState;
+import com.jozufozu.flywheel.backend.state.RenderLayer;
+import com.jozufozu.flywheel.core.WorldContext;
+import com.jozufozu.flywheel.core.shader.WorldProgram;
+import com.jozufozu.flywheel.util.WeakHashSet;
+
+import net.minecraft.client.renderer.ActiveRenderInfo;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.MathHelper;
+import net.minecraft.util.math.vector.Matrix4f;
+import net.minecraft.util.math.vector.Vector3i;
+
+public class MaterialManagerImpl
implements MaterialManager {
+
+ public static int MAX_ORIGIN_DISTANCE = 100;
+
+ protected BlockPos originCoordinate = BlockPos.ZERO;
+
+ protected final WorldContext
context;
+ protected final GroupFactory
groupFactory;
+ protected final boolean ignoreOriginCoordinate;
+
+ protected final Map>> layers;
+
+ private final WeakHashSet listeners;
+
+ public MaterialManagerImpl(WorldContext context) {
+ this(context, MaterialGroupImpl::new, false);
+ }
+
+ public static
Builder
builder(WorldContext
context) {
+ return new Builder<>(context);
+ }
+
+ public MaterialManagerImpl(WorldContext
context, GroupFactory
groupFactory, boolean ignoreOriginCoordinate) {
+ this.context = context;
+ this.ignoreOriginCoordinate = ignoreOriginCoordinate;
+
+ this.listeners = new WeakHashSet<>();
+ this.groupFactory = groupFactory;
+
+ this.layers = new EnumMap<>(RenderLayer.class);
+ for (RenderLayer value : RenderLayer.values()) {
+ layers.put(value, new HashMap<>());
+ }
+ }
+
+ /**
+ * Get a material group that will render in the given layer with the given state.
+ *
+ * @param layer The {@link RenderLayer} you want to draw in.
+ * @param state The {@link IRenderState} you need to draw with.
+ * @return A material group whose children will
+ */
+ @Override
+ public MaterialGroup state(RenderLayer layer, IRenderState state) {
+ return layers.get(layer).computeIfAbsent(state, this::createGroup);
+ }
+
+ /**
+ * Render every model for every material.
+ * @param layer Which of the 3 {@link RenderLayer render layers} is being drawn?
+ * @param viewProjection How do we get from camera space to clip space?
+ */
+ public void render(RenderLayer layer, Matrix4f viewProjection, double camX, double camY, double camZ) {
+ if (!ignoreOriginCoordinate) {
+ camX -= originCoordinate.getX();
+ camY -= originCoordinate.getY();
+ camZ -= originCoordinate.getZ();
+
+ Matrix4f translate = Matrix4f.createTranslateMatrix((float) -camX, (float) -camY, (float) -camZ);
+
+ translate.multiplyBackward(viewProjection);
+
+ viewProjection = translate;
+ }
+
+ for (Map.Entry> entry : layers.get(layer).entrySet()) {
+ IRenderState state = entry.getKey();
+ MaterialGroupImpl group = entry.getValue();
+
+ state.bind();
+ group.render(viewProjection, camX, camY, camZ);
+ state.unbind();
+ }
+ }
+
+ public void delete() {
+ for (Map> groups : layers.values()) {
+
+ groups.values().forEach(MaterialGroupImpl::delete);
+ }
+ }
+
+ public Supplier getProgram(ResourceLocation name) {
+ return context.getProgramSupplier(name);
+ }
+
+ @Override
+ public Vector3i getOriginCoordinate() {
+ return originCoordinate;
+ }
+
+ public void addListener(OriginShiftListener listener) {
+ listeners.add(listener);
+ }
+
+ /**
+ * Maintain the integer origin coordinate to be within a certain distance from the camera in all directions.
+ *
+ * This prevents floating point precision issues at high coordinates.
+ */
+ public void beginFrame(ActiveRenderInfo info) {
+ int cX = MathHelper.floor(info.getPosition().x);
+ int cY = MathHelper.floor(info.getPosition().y);
+ int cZ = MathHelper.floor(info.getPosition().z);
+
+ int dX = cX - originCoordinate.getX();
+ int dY = cY - originCoordinate.getY();
+ int dZ = cZ - originCoordinate.getZ();
+
+ if (Math.abs(dX) > MAX_ORIGIN_DISTANCE || Math.abs(dY) > MAX_ORIGIN_DISTANCE || Math.abs(dZ) > MAX_ORIGIN_DISTANCE) {
+
+ originCoordinate = new BlockPos(cX, cY, cZ);
+
+ for (Map> groups : layers.values()) {
+ groups.values().forEach(MaterialGroupImpl::clear);
+ }
+
+ listeners.forEach(OriginShiftListener::onOriginShift);
+ }
+ }
+
+ private MaterialGroupImpl createGroup(IRenderState state) {
+ return groupFactory.create(this, state);
+ }
+
+ @FunctionalInterface
+ public interface OriginShiftListener {
+ void onOriginShift();
+ }
+
+ @FunctionalInterface
+ public interface GroupFactory
{
+ MaterialGroupImpl
create(MaterialManagerImpl
materialManager, IRenderState state);
+ }
+
+ public static class Builder
{
+ protected final WorldContext
context;
+ protected GroupFactory
groupFactory = MaterialGroupImpl::new;
+ protected boolean ignoreOriginCoordinate;
+
+ public Builder(WorldContext
context) {
+ this.context = context;
+ }
+
+ public Builder
setGroupFactory(GroupFactory
groupFactory) {
+ this.groupFactory = groupFactory;
+ return this;
+ }
+
+ public Builder
setIgnoreOriginCoordinate(boolean ignoreOriginCoordinate) {
+ this.ignoreOriginCoordinate = ignoreOriginCoordinate;
+ return this;
+ }
+
+ public MaterialManagerImpl
build() {
+ return new MaterialManagerImpl<>(context, groupFactory, ignoreOriginCoordinate);
+ }
+ }
+}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/material/MaterialRenderer.java b/src/main/java/com/jozufozu/flywheel/backend/material/MaterialRenderer.java
index 7b27259c7..af695a27c 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/material/MaterialRenderer.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/material/MaterialRenderer.java
@@ -12,11 +12,11 @@ import net.minecraft.util.math.vector.Matrix4f;
public class MaterialRenderer
{
protected final Supplier
program;
- protected final InstanceMaterial> material;
+ protected final InstanceMaterialImpl> material;
protected final Consumer
setupFunc;
- public MaterialRenderer(Supplier
programSupplier, InstanceMaterial> material, Consumer
setupFunc) {
+ public MaterialRenderer(Supplier
programSupplier, InstanceMaterialImpl> material, Consumer
setupFunc) {
this.program = programSupplier;
this.material = material;
this.setupFunc = setupFunc;
diff --git a/src/main/java/com/jozufozu/flywheel/backend/model/ImmediateAllocator.java b/src/main/java/com/jozufozu/flywheel/backend/model/ImmediateAllocator.java
new file mode 100644
index 000000000..7da671ca0
--- /dev/null
+++ b/src/main/java/com/jozufozu/flywheel/backend/model/ImmediateAllocator.java
@@ -0,0 +1,15 @@
+package com.jozufozu.flywheel.backend.model;
+
+import com.jozufozu.flywheel.core.model.IModel;
+
+public class ImmediateAllocator implements ModelAllocator {
+
+ public static final ImmediateAllocator INSTANCE = new ImmediateAllocator();
+
+ @Override
+ public IBufferedModel alloc(IModel model, Callback allocationCallback) {
+ IndexedModel out = new IndexedModel(model);
+ allocationCallback.onAlloc(out);
+ return out;
+ }
+}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/model/ModelAllocator.java b/src/main/java/com/jozufozu/flywheel/backend/model/ModelAllocator.java
new file mode 100644
index 000000000..afa45904a
--- /dev/null
+++ b/src/main/java/com/jozufozu/flywheel/backend/model/ModelAllocator.java
@@ -0,0 +1,18 @@
+package com.jozufozu.flywheel.backend.model;
+
+import com.jozufozu.flywheel.core.model.IModel;
+
+public interface ModelAllocator {
+ /**
+ * Allocate a model.
+ *
+ * @param model The model to allocate.
+ * @return A handle to the allocated model.
+ */
+ IBufferedModel alloc(IModel model, Callback allocationCallback);
+
+ @FunctionalInterface
+ interface Callback {
+ void onAlloc(IBufferedModel arenaModel);
+ }
+}
diff --git a/src/main/java/com/jozufozu/flywheel/backend/model/ModelPool.java b/src/main/java/com/jozufozu/flywheel/backend/model/ModelPool.java
index 7e687e1ef..c905ca44f 100644
--- a/src/main/java/com/jozufozu/flywheel/backend/model/ModelPool.java
+++ b/src/main/java/com/jozufozu/flywheel/backend/model/ModelPool.java
@@ -12,9 +12,8 @@ import com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer;
import com.jozufozu.flywheel.backend.gl.buffer.MappedGlBuffer;
import com.jozufozu.flywheel.core.model.IModel;
import com.jozufozu.flywheel.util.AttribUtil;
-import com.jozufozu.flywheel.util.StringUtil;
-public class ModelPool {
+public class ModelPool implements ModelAllocator {
protected final VertexFormat format;
@@ -47,8 +46,10 @@ public class ModelPool {
* @param model The model to allocate.
* @return A handle to the allocated model.
*/
- public PooledModel alloc(IModel model) {
+ @Override
+ public PooledModel alloc(IModel model, Callback callback) {
PooledModel bufferedModel = new PooledModel(model, vertices);
+ bufferedModel.callback = callback;
vertices += model.vertexCount();
models.add(bufferedModel);
pendingUpload.add(bufferedModel);
@@ -117,7 +118,7 @@ public class ModelPool {
for (PooledModel model : models) {
model.model.buffer(buffer);
if (model.callback != null)
- model.callback.invoke(model);
+ model.callback.onAlloc(model);
}
buffer.flush();
@@ -132,7 +133,7 @@ public class ModelPool {
buffer.position(pos);
model.model.buffer(buffer);
if (model.callback != null)
- model.callback.invoke(model);
+ model.callback.onAlloc(model);
}
pendingUpload.clear();
@@ -199,7 +200,7 @@ public class ModelPool {
ebo.bind();
- Backend.log.info(StringUtil.args("drawElementsInstancedBaseVertex", GlPrimitive.TRIANGLES, ebo.elementCount, ebo.eboIndexType, 0, instanceCount, first));
+ //Backend.log.info(StringUtil.args("drawElementsInstancedBaseVertex", GlPrimitive.TRIANGLES, ebo.elementCount, ebo.eboIndexType, 0, instanceCount, first));
Backend.getInstance().compat.baseVertex.drawElementsInstancedBaseVertex(GlPrimitive.TRIANGLES, ebo.elementCount, ebo.eboIndexType, 0, instanceCount, first);
}
@@ -215,15 +216,6 @@ public class ModelPool {
anyToRemove = true;
remove = true;
}
-
- public PooledModel setReallocCallback(Callback callback) {
- this.callback = callback;
- return this;
- }
}
- @FunctionalInterface
- public interface Callback {
- void invoke(PooledModel arenaModel);
- }
}
diff --git a/src/main/java/com/jozufozu/flywheel/core/QuadConverter.java b/src/main/java/com/jozufozu/flywheel/core/QuadConverter.java
index bdff17230..dc52087e5 100644
--- a/src/main/java/com/jozufozu/flywheel/core/QuadConverter.java
+++ b/src/main/java/com/jozufozu/flywheel/core/QuadConverter.java
@@ -83,7 +83,7 @@ public class QuadConverter {
}
}
- public void free() {
+ public void delete() {
ebos.values()
.forEach(GlBuffer::delete);
ebos.clear();
@@ -172,6 +172,6 @@ public class QuadConverter {
// make sure this gets reset first so it has a chance to repopulate
@SubscribeEvent(priority = EventPriority.HIGHEST)
public static void onRendererReload(ReloadRenderersEvent event) {
- if (INSTANCE != null) INSTANCE.free();
+ if (INSTANCE != null) INSTANCE.delete();
}
}
diff --git a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingGroup.java b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingGroup.java
index 81159c784..ef3b24588 100644
--- a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingGroup.java
+++ b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingGroup.java
@@ -1,20 +1,20 @@
package com.jozufozu.flywheel.core.crumbling;
import com.jozufozu.flywheel.backend.gl.GlTextureUnit;
-import com.jozufozu.flywheel.backend.material.MaterialGroup;
-import com.jozufozu.flywheel.backend.material.MaterialManager;
+import com.jozufozu.flywheel.backend.material.MaterialGroupImpl;
+import com.jozufozu.flywheel.backend.material.MaterialManagerImpl;
import com.jozufozu.flywheel.backend.state.IRenderState;
import com.jozufozu.flywheel.core.atlas.AtlasInfo;
import com.jozufozu.flywheel.core.atlas.SheetData;
import net.minecraft.util.ResourceLocation;
-public class CrumblingGroup
extends MaterialGroup
{
+public class CrumblingGroup
extends MaterialGroupImpl
{
private final int width;
private final int height;
- public CrumblingGroup(MaterialManager
owner, IRenderState state) {
+ public CrumblingGroup(MaterialManagerImpl
owner, IRenderState state) {
super(owner, state);
ResourceLocation texture = state.getTexture(GlTextureUnit.T0);
diff --git a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingInstanceManager.java b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingInstanceManager.java
index 27447a0fe..059b366b1 100644
--- a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingInstanceManager.java
+++ b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingInstanceManager.java
@@ -1,13 +1,13 @@
package com.jozufozu.flywheel.core.crumbling;
import com.jozufozu.flywheel.backend.instancing.tile.TileInstanceManager;
-import com.jozufozu.flywheel.backend.material.MaterialManager;
+import com.jozufozu.flywheel.backend.material.MaterialManagerImpl;
import net.minecraft.util.math.BlockPos;
public class CrumblingInstanceManager extends TileInstanceManager {
- public CrumblingInstanceManager(MaterialManager> materialManager) {
+ public CrumblingInstanceManager(MaterialManagerImpl> materialManager) {
super(materialManager);
}
diff --git a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingRenderer.java b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingRenderer.java
index 5415512dc..d9cd5f838 100644
--- a/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingRenderer.java
+++ b/src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingRenderer.java
@@ -11,6 +11,7 @@ import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.backend.gl.GlTextureUnit;
import com.jozufozu.flywheel.backend.instancing.InstanceManager;
import com.jozufozu.flywheel.backend.material.MaterialManager;
+import com.jozufozu.flywheel.backend.material.MaterialManagerImpl;
import com.jozufozu.flywheel.backend.state.RenderLayer;
import com.jozufozu.flywheel.core.Contexts;
import com.jozufozu.flywheel.event.ReloadRenderersEvent;
@@ -69,7 +70,7 @@ public class CrumblingRenderer {
TextureManager textureManager = Minecraft.getInstance().textureManager;
ActiveRenderInfo info = Minecraft.getInstance().gameRenderer.getMainCamera();
- MaterialManager materials = state.materialManager;
+ MaterialManagerImpl materials = state.materialManager;
layer.setupRenderState();
for (Int2ObjectMap.Entry> stage : activeStages.int2ObjectEntrySet()) {
@@ -140,11 +141,11 @@ public class CrumblingRenderer {
}
private static class State {
- private final MaterialManager materialManager;
+ private final MaterialManagerImpl materialManager;
private final InstanceManager instanceManager;
private State() {
- materialManager = MaterialManager.builder(Contexts.CRUMBLING)
+ materialManager = MaterialManagerImpl.builder(Contexts.CRUMBLING)
.setGroupFactory(CrumblingGroup::new)
.build();
instanceManager = new CrumblingInstanceManager(materialManager);
diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java b/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java
index 42358f7e1..a4a83a711 100644
--- a/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java
+++ b/src/main/java/com/jozufozu/flywheel/vanilla/BellInstance.java
@@ -20,7 +20,7 @@ public class BellInstance extends TileEntityInstance implements
private float lastRingTime = Float.NaN;
- public BellInstance(MaterialManager> materialManager, BellTileEntity tile) {
+ public BellInstance(MaterialManager materialManager, BellTileEntity tile) {
super(materialManager, tile);
bell = createBellInstance()
diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/ChestInstance.java b/src/main/java/com/jozufozu/flywheel/vanilla/ChestInstance.java
index d859d3d5b..d7911e195 100644
--- a/src/main/java/com/jozufozu/flywheel/vanilla/ChestInstance.java
+++ b/src/main/java/com/jozufozu/flywheel/vanilla/ChestInstance.java
@@ -42,7 +42,7 @@ public class ChestInstance extends TileEntityI
private float lastProgress = Float.NaN;
- public ChestInstance(MaterialManager> materialManager, T tile) {
+ public ChestInstance(MaterialManager materialManager, T tile) {
super(materialManager, tile);
Block block = blockState.getBlock();
diff --git a/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java b/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java
index 4b01400c1..08c4b62c7 100644
--- a/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java
+++ b/src/main/java/com/jozufozu/flywheel/vanilla/ShulkerBoxInstance.java
@@ -28,7 +28,7 @@ public class ShulkerBoxInstance extends TileEntityInstance
private float lastProgress = Float.NaN;
- public ShulkerBoxInstance(MaterialManager> materialManager, ShulkerBoxTileEntity tile) {
+ public ShulkerBoxInstance(MaterialManager materialManager, ShulkerBoxTileEntity tile) {
super(materialManager, tile);
DyeColor color = tile.getColor();