mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 03:23:44 +01:00
Contraptions use flywheel for vanilla tiles
- Update more usage of glActiveTexture to the enum wrapper - Fix superglue rendering in the solid layer - Fix issue caused by states with different textures on contraptions - Bump flywheel version
This commit is contained in:
parent
1d6da03799
commit
cb8e6d92d5
5 changed files with 10 additions and 4 deletions
|
@ -16,7 +16,7 @@ cursegradle_version = 1.4.0
|
|||
|
||||
# dependency versions
|
||||
registrate_version = 1.0.4
|
||||
flywheel_version = 1.16-0.2.0.28
|
||||
flywheel_version = 1.16-0.2.0.29
|
||||
jei_version = 7.7.1.110
|
||||
|
||||
# curseforge information
|
||||
|
|
|
@ -56,7 +56,7 @@ public class GlueInstance extends EntityInstance<SuperGlueEntity> implements ITi
|
|||
}
|
||||
|
||||
private Instancer<OrientedData> getInstancer(MaterialManager<?> materialManager, SuperGlueEntity entity) {
|
||||
MaterialGroup<?> group = USE_ATLAS ? materialManager.defaultSolid() : materialManager.solid(TextureRenderState.get(TEXTURE));
|
||||
MaterialGroup<?> group = USE_ATLAS ? materialManager.defaultCutout() : materialManager.cutout(TextureRenderState.get(TEXTURE));
|
||||
|
||||
return group.material(Materials.ORIENTED).model(entity.getType(), GlueModel::new);
|
||||
}
|
||||
|
|
|
@ -137,6 +137,7 @@ public class ContraptionRenderDispatcher {
|
|||
}
|
||||
}
|
||||
|
||||
GlTextureUnit.T4.makeActive();
|
||||
glBindTexture(GL_TEXTURE_3D, 0);
|
||||
layer.clearRenderState();
|
||||
glDisable(GL_TEXTURE_3D);
|
||||
|
|
|
@ -13,6 +13,8 @@ import com.jozufozu.flywheel.backend.Backend;
|
|||
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.instancing.InstancedRenderDispatcher;
|
||||
import com.jozufozu.flywheel.backend.instancing.InstancedRenderRegistry;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialGroup;
|
||||
import com.jozufozu.flywheel.backend.material.MaterialManager;
|
||||
import com.jozufozu.flywheel.backend.model.ArrayModelRenderer;
|
||||
|
@ -151,7 +153,8 @@ public class RenderedContraption extends ContraptionWorldHolder {
|
|||
Collection<TileEntity> tileEntities = contraption.maybeInstancedTileEntities;
|
||||
if (!tileEntities.isEmpty()) {
|
||||
for (TileEntity te : tileEntities) {
|
||||
if (te instanceof IInstanceRendered) {
|
||||
if (InstancedRenderRegistry.getInstance()
|
||||
.canInstance(te.getType())) {
|
||||
World world = te.getLevel();
|
||||
BlockPos pos = te.getBlockPos();
|
||||
te.setLevelAndPosition(renderWorld, pos);
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.Iterator;
|
|||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.jozufozu.flywheel.backend.instancing.InstancedRenderRegistry;
|
||||
import com.jozufozu.flywheel.util.transform.MatrixTransformStack;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.simibubi.create.Create;
|
||||
|
@ -46,7 +47,8 @@ public class TileEntityRenderHelper {
|
|||
Iterator<TileEntity> iterator = customRenderTEs.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
TileEntity tileEntity = iterator.next();
|
||||
// if (tileEntity instanceof IInstanceRendered) continue; // TODO: some things still need to render
|
||||
if (InstancedRenderRegistry.getInstance()
|
||||
.shouldSkipRender(tileEntity)) continue;
|
||||
|
||||
TileEntityRenderer<TileEntity> renderer = TileEntityRendererDispatcher.instance.getRenderer(tileEntity);
|
||||
if (renderer == null) {
|
||||
|
|
Loading…
Reference in a new issue