Block breaking overlay is animated now

This commit is contained in:
JozsefA 2021-05-07 21:24:07 -07:00
parent 3171a0b7e5
commit aa1a45f164
44 changed files with 129 additions and 115 deletions

View file

@ -1,18 +1,16 @@
package com.jozufozu.flywheel.backend;
import static org.lwjgl.opengl.GL11.GL_REPEAT;
import static org.lwjgl.opengl.GL11.GL_TEXTURE_2D;
import static org.lwjgl.opengl.GL11.GL_TEXTURE_WRAP_S;
import static org.lwjgl.opengl.GL11.GL_TEXTURE_WRAP_T;
import static org.lwjgl.opengl.GL11.glBindTexture;
import static org.lwjgl.opengl.GL11.glTexParameteri;
import static org.lwjgl.opengl.GL13.GL_TEXTURE0;
import static org.lwjgl.opengl.GL13.glActiveTexture;
import java.util.BitSet;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.SortedSet;
import java.util.Vector;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -20,7 +18,7 @@ import org.lwjgl.opengl.GL;
import org.lwjgl.opengl.GLCapabilities;
import com.jozufozu.flywheel.backend.core.BasicProgram;
import com.jozufozu.flywheel.backend.core.CrumblingProgram;
import com.jozufozu.flywheel.backend.core.CrumblingRenderer;
import com.jozufozu.flywheel.backend.core.EffectsContext;
import com.jozufozu.flywheel.backend.core.WorldContext;
import com.jozufozu.flywheel.backend.core.WorldTileRenderer;
@ -31,14 +29,13 @@ import com.jozufozu.flywheel.backend.gl.versioned.GlCompat;
import com.jozufozu.flywheel.backend.instancing.IFlywheelWorld;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.MaterialSpec;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
import com.simibubi.create.content.contraptions.KineticDebugger;
import com.simibubi.create.foundation.config.AllConfigs;
import com.simibubi.create.foundation.utility.WorldAttached;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.DestroyBlockProgress;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.WorldRenderer;
@ -47,10 +44,10 @@ import net.minecraft.client.renderer.texture.Texture;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.world.ClientWorld;
import net.minecraft.entity.Entity;
import net.minecraft.inventory.container.PlayerContainer;
import net.minecraft.resources.IReloadableResourceManager;
import net.minecraft.resources.IResourceManager;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.LazyValue;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.vector.Matrix4f;
@ -68,7 +65,13 @@ public class Backend {
public static EffectsHandler effects;
public static WorldAttached<WorldTileRenderer<BasicProgram>> tileRenderer = new WorldAttached<>(() -> new WorldTileRenderer<>(WorldContext.INSTANCE));
public static WorldAttached<WorldTileRenderer<CrumblingProgram>> blockBreaking = new WorldAttached<>(() -> new WorldTileRenderer<>(WorldContext.CRUMBLING));
public static LazyValue<Vector<CrumblingRenderer>> blockBreaking = new LazyValue<>(() -> {
Vector<CrumblingRenderer> renderers = new Vector<>(10);
for (int i = 0; i < 10; i++) {
renderers.add(new CrumblingRenderer());
}
return renderers;
});
private static Matrix4f projectionMatrix = new Matrix4f();
private static boolean instancingAvailable;
@ -215,67 +218,49 @@ public class Backend {
layer.endDrawing();
}
private static final RenderType CRUMBLING = ModelBakery.BLOCK_DESTRUCTION_RENDER_LAYERS.get(0);
public static void renderBreaking(ClientWorld world, Matrix4f viewProjection, double cameraX, double cameraY, double cameraZ) {
if (!canUseInstancing(world)) return;
WorldTileRenderer<CrumblingProgram> renderer = blockBreaking.get(world);
if (renderer == null) return;
WorldRenderer worldRenderer = Minecraft.getInstance().worldRenderer;
Long2ObjectMap<SortedSet<DestroyBlockProgress>> breakingProgressions = worldRenderer.blockBreakingProgressions;
if (breakingProgressions.isEmpty()) return;
Vector<CrumblingRenderer> renderers = blockBreaking.getValue();
BitSet bitSet = new BitSet(10);
for (Long2ObjectMap.Entry<SortedSet<DestroyBlockProgress>> entry : breakingProgressions.long2ObjectEntrySet()) {
BlockPos breakingPos = BlockPos.fromLong(entry.getLongKey());
SortedSet<DestroyBlockProgress> sortedset1 = entry.getValue();
if (sortedset1 != null && !sortedset1.isEmpty()) {
renderer.add(world.getTileEntity(breakingPos));
SortedSet<DestroyBlockProgress> progresses = entry.getValue();
if (progresses != null && !progresses.isEmpty()) {
int blockDamage = progresses.last().getPartialBlockDamage();
bitSet.set(blockDamage);
renderers.get(blockDamage).add(world.getTileEntity(breakingPos));
}
}
renderer.beginFrame(Minecraft.getInstance().gameRenderer.getActiveRenderInfo());
RenderType layer = RenderType.getCutoutMipped();
layer.startDrawing();
TextureManager textureManager = Minecraft.getInstance().textureManager;
ActiveRenderInfo info = Minecraft.getInstance().gameRenderer.getActiveRenderInfo();
glActiveTexture(GL_TEXTURE0);
TextureManager textureManager = Minecraft.getInstance().textureManager;
Texture breaking = textureManager.getTexture(ModelBakery.BLOCK_DESTRUCTION_STAGE_TEXTURES.get(5));
CRUMBLING.startDrawing();
bitSet.stream().forEach(i -> {
Texture breaking = textureManager.getTexture(ModelBakery.BLOCK_DESTRUCTION_STAGE_TEXTURES.get(i));
CrumblingRenderer renderer = renderers.get(i);
renderer.beginFrame(info);
if (breaking != null) {
glBindTexture(GL_TEXTURE_2D, breaking.getGlTextureId());
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
RenderSystem.enableBlend();
RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.DST_COLOR, GlStateManager.DestFactor.SRC_COLOR, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
RenderSystem.enableAlphaTest();
RenderSystem.alphaFunc(516, 0.003921569F);
RenderSystem.polygonOffset(-1.0F, -10.0F);
RenderSystem.enablePolygonOffset();
renderer.render(RenderType.getCutoutMipped(), viewProjection, cameraX, cameraY, cameraZ, program -> program.setTextureScale(64, 64));
}
renderer.render(layer, viewProjection, cameraX, cameraY, cameraZ, program -> program.setTextureScale(64, 64));
if (breaking != null) {
glBindTexture(GL_TEXTURE_2D, textureManager.getTexture(PlayerContainer.BLOCK_ATLAS_TEXTURE).getGlTextureId());
RenderSystem.disableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.polygonOffset(0.0F, 0.0F);
RenderSystem.disablePolygonOffset();
}
layer.endDrawing();
renderer.invalidate();
});
CRUMBLING.endDrawing();
}
public static void enqueueUpdate(TileEntity te) {

View file

@ -0,0 +1,14 @@
package com.jozufozu.flywheel.backend.core;
import net.minecraft.util.math.BlockPos;
public class CrumblingRenderer extends WorldTileRenderer<CrumblingProgram> {
public CrumblingRenderer() {
super(WorldContext.CRUMBLING);
}
@Override
protected boolean shouldTick(BlockPos worldPos, float lookX, float lookY, float lookZ, int cX, int cY, int cZ) {
return true;
}
}

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.backend.core;
package com.jozufozu.flywheel.backend.core.materials;
import com.jozufozu.flywheel.backend.gl.attrib.CommonAttributes;
import com.jozufozu.flywheel.backend.gl.attrib.IAttribSpec;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.backend.core;
package com.jozufozu.flywheel.backend.core.materials;
import java.nio.ByteBuffer;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.backend.core;
package com.jozufozu.flywheel.backend.core.materials;
import com.jozufozu.flywheel.backend.instancing.InstanceData;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.backend.core;
package com.jozufozu.flywheel.backend.core.materials;
import com.jozufozu.flywheel.backend.gl.attrib.CommonAttributes;
import com.jozufozu.flywheel.backend.gl.attrib.IAttribSpec;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.backend.core;
package com.jozufozu.flywheel.backend.core.materials;
import java.nio.ByteBuffer;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.backend.core;
package com.jozufozu.flywheel.backend.core.materials;
import com.jozufozu.flywheel.backend.gl.attrib.CommonAttributes;
import com.jozufozu.flywheel.backend.gl.attrib.IAttribSpec;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.backend.core;
package com.jozufozu.flywheel.backend.core.materials;
import java.nio.ByteBuffer;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.backend.core;
package com.jozufozu.flywheel.backend.core.materials;
import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.backend.core;
package com.jozufozu.flywheel.backend.core.materials;
import com.jozufozu.flywheel.backend.gl.attrib.IAttribSpec;
import com.jozufozu.flywheel.backend.gl.attrib.IVertexAttrib;

View file

@ -1,4 +1,4 @@
package com.jozufozu.flywheel.backend.core;
package com.jozufozu.flywheel.backend.core.materials;
import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;

View file

@ -11,7 +11,7 @@ import org.lwjgl.opengl.GL20;
import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.backend.BufferedModel;
import com.jozufozu.flywheel.backend.core.ModelAttributes;
import com.jozufozu.flywheel.backend.core.materials.ModelAttributes;
import com.jozufozu.flywheel.backend.gl.GlBuffer;
import com.jozufozu.flywheel.backend.gl.GlVertexArray;
import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;

View file

@ -9,9 +9,9 @@ import javax.annotation.Nullable;
import com.jozufozu.flywheel.backend.Backend;
import com.jozufozu.flywheel.backend.core.BasicProgram;
import com.jozufozu.flywheel.backend.core.ModelData;
import com.jozufozu.flywheel.backend.core.OrientedData;
import com.jozufozu.flywheel.backend.core.WorldContext;
import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.core.materials.OrientedData;
import com.jozufozu.flywheel.backend.gl.shader.ShaderCallback;
import com.simibubi.create.foundation.render.AllMaterialSpecs;
@ -107,21 +107,29 @@ public abstract class InstancedTileRenderer<P extends BasicProgram> {
if (dynamicInstances.size() > 0) {
for (IDynamicInstance dyn : dynamicInstances.values()) {
if (!dyn.decreaseFramerateWithDistance()) {
dyn.beginFrame();
continue;
}
if (shouldTick(dyn.getWorldPosition(), lookX, lookY, lookZ, cX, cY, cZ))
if (!dyn.decreaseFramerateWithDistance() || shouldTick(dyn.getWorldPosition(), lookX, lookY, lookZ, cX, cY, cZ))
dyn.beginFrame();
}
}
}
/**
* Render every model for every material.
*
* @param layer Which vanilla {@link RenderType} is being drawn?
* @param viewProjection How do we get from camera space to clip space?
*/
public void render(RenderType layer, Matrix4f viewProjection, double camX, double camY, double camZ) {
render(layer, viewProjection, camX, camY, camZ, null);
}
/**
* Render every model for every material.
*
* @param layer Which vanilla {@link RenderType} is being drawn?
* @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<P> callback) {
for (RenderMaterial<P, ?> material : materials.values()) {
if (material.canRenderInLayer(layer))

View file

@ -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.IFlatLight;
import com.jozufozu.flywheel.backend.core.ModelData;
import com.jozufozu.flywheel.backend.core.OrientedData;
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 net.minecraft.block.BlockState;
import net.minecraft.tileentity.TileEntity;

View file

@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.base;
import java.nio.ByteBuffer;
import com.jozufozu.flywheel.backend.core.BasicData;
import com.jozufozu.flywheel.backend.core.materials.BasicData;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.simibubi.create.foundation.utility.ColorHelper;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.base;
import com.jozufozu.flywheel.backend.core.BasicAttributes;
import com.jozufozu.flywheel.backend.core.materials.BasicAttributes;
import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;

View file

@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.actors;
import static net.minecraft.state.properties.BlockStateProperties.HORIZONTAL_FACING;
import com.jozufozu.flywheel.backend.core.ModelData;
import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.RenderMaterial;
import com.mojang.blaze3d.matrix.MatrixStack;

View file

@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.components.crank;
import com.jozufozu.flywheel.backend.core.ModelData;
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;

View file

@ -3,8 +3,8 @@ 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.ModelData;
import com.jozufozu.flywheel.backend.core.PartialModel;
import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.RenderMaterial;
import com.mojang.blaze3d.matrix.MatrixStack;

View file

@ -3,8 +3,8 @@ 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.OrientedData;
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;

View file

@ -6,7 +6,7 @@ import java.util.Collections;
import java.util.List;
import com.google.common.collect.Lists;
import com.jozufozu.flywheel.backend.core.ModelData;
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;

View file

@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.components.flywheel.engine;
import com.jozufozu.flywheel.backend.core.ModelData;
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.mojang.blaze3d.matrix.MatrixStack;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.mixer;
import com.jozufozu.flywheel.backend.core.OrientedData;
import com.jozufozu.flywheel.backend.core.materials.OrientedData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.simibubi.create.AllBlockPartials;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.press;
import com.jozufozu.flywheel.backend.core.OrientedData;
import com.jozufozu.flywheel.backend.core.materials.OrientedData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.simibubi.create.AllBlockPartials;

View file

@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.components.structureMovement.bearing;
import com.jozufozu.flywheel.backend.core.OrientedData;
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.simibubi.create.AllBlockPartials;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement.bearing;
import com.jozufozu.flywheel.backend.core.OrientedData;
import com.jozufozu.flywheel.backend.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;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement.chassis;
import com.jozufozu.flywheel.backend.core.ModelData;
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;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement.gantry;
import com.jozufozu.flywheel.backend.core.ModelData;
import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.mojang.blaze3d.matrix.MatrixStack;

View file

@ -1,8 +1,15 @@
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
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.OrientedData;
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;
@ -15,13 +22,6 @@ import com.jozufozu.flywheel.backend.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;
import net.minecraft.util.math.vector.Vector3f;
import net.minecraft.world.IBlockDisplayReader;
import net.minecraft.world.LightType;
public abstract class AbstractPulleyInstance extends ShaftInstance implements IDynamicInstance, LightUpdateListener {
final OrientedData coil;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
import com.jozufozu.flywheel.backend.core.OrientedData;
import com.jozufozu.flywheel.backend.core.materials.OrientedData;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.simibubi.create.AllBlockPartials;

View file

@ -1,7 +1,7 @@
package com.simibubi.create.content.contraptions.components.structureMovement.pulley;
import com.jozufozu.flywheel.backend.core.OrientedData;
import com.jozufozu.flywheel.backend.core.materials.OrientedData;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.simibubi.create.AllBlockPartials;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.fluids.pipes;
import com.jozufozu.flywheel.backend.core.ModelData;
import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.mojang.blaze3d.matrix.MatrixStack;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.contraptions.relays.belt;
import com.jozufozu.flywheel.backend.core.BasicAttributes;
import com.jozufozu.flywheel.backend.core.materials.BasicAttributes;
import com.jozufozu.flywheel.backend.gl.attrib.VertexFormat;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;

View file

@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.relays.gauge;
import java.util.ArrayList;
import com.jozufozu.flywheel.backend.core.ModelData;
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;

View file

@ -2,7 +2,7 @@ package com.simibubi.create.content.logistics.block;
import java.nio.ByteBuffer;
import com.jozufozu.flywheel.backend.core.IFlatLight;
import com.jozufozu.flywheel.backend.core.materials.IFlatLight;
import com.jozufozu.flywheel.backend.instancing.InstanceData;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.logistics.block.depot;
import com.jozufozu.flywheel.backend.core.ModelData;
import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.instancing.IDynamicInstance;
import com.jozufozu.flywheel.backend.instancing.InstancedTileRenderer;
import com.mojang.blaze3d.matrix.MatrixStack;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.logistics.block.diodes;
import com.jozufozu.flywheel.backend.core.ModelData;
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;

View file

@ -3,7 +3,7 @@ package com.simibubi.create.content.logistics.block.mechanicalArm;
import java.util.ArrayList;
import com.google.common.collect.Lists;
import com.jozufozu.flywheel.backend.core.ModelData;
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;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.logistics.block.redstone;
import com.jozufozu.flywheel.backend.core.ModelData;
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;

View file

@ -1,6 +1,6 @@
package com.simibubi.create.content.schematics.block;
import com.jozufozu.flywheel.backend.core.ModelData;
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;

View file

@ -67,7 +67,14 @@ public class RenderHooksMixin {
Backend.listeners.refresh(world);
}
@Inject(at = @At(value = "INVOKE", target = "Lit/unimi/dsi/fastutil/longs/Long2ObjectMap;long2ObjectEntrySet()Lit/unimi/dsi/fastutil/objects/ObjectSet;"), method = "render")
@Inject(at =
@At(
value = "INVOKE",
target = "Lnet/minecraft/client/renderer/WorldRenderer;checkEmpty(Lcom/mojang/blaze3d/matrix/MatrixStack;)V",
ordinal = 2 // after the game renders the breaking overlay normally
),
method = "render")
private void renderBlockBreaking(MatrixStack stack, float p_228426_2_, long p_228426_3_, boolean p_228426_5_,
ActiveRenderInfo info, GameRenderer gameRenderer, LightTexture lightTexture, Matrix4f p_228426_9_,
CallbackInfo ci) {

View file

@ -2,10 +2,10 @@ package com.simibubi.create.foundation.render;
import static com.jozufozu.flywheel.backend.Backend.register;
import com.jozufozu.flywheel.backend.core.ModelData;
import com.jozufozu.flywheel.backend.core.OrientedData;
import com.jozufozu.flywheel.backend.core.OrientedModel;
import com.jozufozu.flywheel.backend.core.TransformedModel;
import com.jozufozu.flywheel.backend.core.materials.ModelData;
import com.jozufozu.flywheel.backend.core.materials.OrientedData;
import com.jozufozu.flywheel.backend.core.materials.OrientedModel;
import com.jozufozu.flywheel.backend.core.materials.TransformedModel;
import com.jozufozu.flywheel.backend.instancing.InstancedModel;
import com.jozufozu.flywheel.backend.instancing.MaterialSpec;
import com.simibubi.create.Create;

View file

@ -2,10 +2,10 @@ package com.simibubi.create.foundation.render;
import static com.jozufozu.flywheel.backend.Backend.register;
import com.jozufozu.flywheel.backend.core.BasicAttributes;
import com.jozufozu.flywheel.backend.core.ModelAttributes;
import com.jozufozu.flywheel.backend.core.OrientedAttributes;
import com.jozufozu.flywheel.backend.core.TransformAttributes;
import com.jozufozu.flywheel.backend.core.materials.BasicAttributes;
import com.jozufozu.flywheel.backend.core.materials.ModelAttributes;
import com.jozufozu.flywheel.backend.core.materials.OrientedAttributes;
import com.jozufozu.flywheel.backend.core.materials.TransformAttributes;
import com.jozufozu.flywheel.backend.gl.shader.ProgramSpec;
import com.jozufozu.flywheel.backend.gl.shader.ShaderConstants;
import com.simibubi.create.Create;