mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
Portable clipping interface
- Fix PSI z-fighting
This commit is contained in:
parent
00555ff572
commit
9c42988135
@ -2,6 +2,7 @@ package com.simibubi.create.content.contraptions.components.actors;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.core.PartialModel;
|
||||
import com.jozufozu.flywheel.core.virtual.VirtualRenderWorld;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
@ -34,6 +35,8 @@ public class PortableStorageInterfaceRenderer extends SafeTileEntityRenderer<Por
|
||||
@Override
|
||||
protected void renderSafe(PortableStorageInterfaceTileEntity te, float partialTicks, PoseStack ms,
|
||||
MultiBufferSource buffer, int light, int overlay) {
|
||||
if (Backend.isOn()) return;
|
||||
|
||||
BlockState blockState = te.getBlockState();
|
||||
float progress = te.getExtensionDistance(partialTicks);
|
||||
VertexConsumer vb = buffer.getBuffer(RenderType.solid());
|
||||
|
@ -19,11 +19,10 @@ public class EngineInstance extends BlockEntityInstance<EngineTileEntity> {
|
||||
|
||||
Block block = blockState
|
||||
.getBlock();
|
||||
if (!(block instanceof EngineBlock))
|
||||
if (!(block instanceof EngineBlock engineBlock))
|
||||
return;
|
||||
|
||||
EngineBlock engineBlock = (EngineBlock) block;
|
||||
PartialModel frame = engineBlock.getFrameModel();
|
||||
PartialModel frame = engineBlock.getFrameModel();
|
||||
|
||||
Direction facing = blockState.getValue(BlockStateProperties.HORIZONTAL_FACING);
|
||||
|
||||
@ -33,7 +32,7 @@ public class EngineInstance extends BlockEntityInstance<EngineTileEntity> {
|
||||
|
||||
this.frame.loadIdentity()
|
||||
.translate(getInstancePosition())
|
||||
.nudge(tile.hashCode())
|
||||
.nudge(pos.hashCode())
|
||||
.centre()
|
||||
.rotate(Direction.UP, angle)
|
||||
.unCentre()
|
||||
|
@ -66,9 +66,8 @@ public class FurnaceEngineBlock extends EngineBlock implements ITE<FurnaceEngine
|
||||
@SubscribeEvent
|
||||
public static void usingFurnaceEngineOnFurnacePreventsGUI(RightClickBlock event) {
|
||||
ItemStack item = event.getItemStack();
|
||||
if (!(item.getItem() instanceof BlockItem))
|
||||
if (!(item.getItem() instanceof BlockItem blockItem))
|
||||
return;
|
||||
BlockItem blockItem = (BlockItem) item.getItem();
|
||||
if (blockItem.getBlock() != AllBlocks.FURNACE_ENGINE.get())
|
||||
return;
|
||||
BlockState state = event.getWorld().getBlockState(event.getPos());
|
||||
|
Loading…
Reference in New Issue
Block a user