mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-28 16:06:48 +01:00
Virtual rendering fixes
- Fix blocks in schematic renders being too dark - Fix shafts and cogs fired from a schematicannon not rendering
This commit is contained in:
parent
541e5bd6ae
commit
d0a660c0ae
4 changed files with 5 additions and 4 deletions
|
@ -142,7 +142,7 @@ public class SchematicWorld extends WrappedWorld implements ServerLevelAccessor
|
|||
|
||||
@Override
|
||||
public int getBrightness(LightLayer p_226658_1_, BlockPos p_226658_2_) {
|
||||
return 10;
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.simibubi.create.content.schematics.block;
|
|||
import java.util.Random;
|
||||
|
||||
import com.jozufozu.flywheel.backend.Backend;
|
||||
import com.jozufozu.flywheel.core.virtual.VirtualEmptyModelData;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||
import com.mojang.math.Vector3f;
|
||||
|
@ -24,7 +25,6 @@ import net.minecraft.core.particles.ParticleTypes;
|
|||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.client.model.data.EmptyModelData;
|
||||
|
||||
public class SchematicannonRenderer extends SafeTileEntityRenderer<SchematicannonTileEntity> {
|
||||
|
||||
|
@ -172,7 +172,7 @@ public class SchematicannonRenderer extends SafeTileEntityRenderer<Schematicanno
|
|||
Minecraft.getInstance()
|
||||
.getBlockRenderer()
|
||||
.renderSingleBlock(((ForBlockState) launched).state, ms, buffer, light, overlay,
|
||||
EmptyModelData.INSTANCE);
|
||||
VirtualEmptyModelData.INSTANCE);
|
||||
}
|
||||
|
||||
// Render the item
|
||||
|
|
|
@ -76,6 +76,7 @@ public class SchematicRenderer {
|
|||
if (!usedBlockRenderLayers.contains(layer))
|
||||
continue;
|
||||
SuperByteBuffer superByteBuffer = bufferCache.get(layer);
|
||||
superByteBuffer.disableDiffuseMult();
|
||||
superByteBuffer.renderInto(ms, buffer.getBuffer(layer));
|
||||
}
|
||||
TileEntityRenderHelper.renderTileEntities(schematic, schematic.getRenderedTileEntities(), ms, buffer);
|
||||
|
|
|
@ -344,7 +344,7 @@ public class WorldSectionElement extends AnimatedSceneElement {
|
|||
.normal());
|
||||
Minecraft.getInstance()
|
||||
.getBlockRenderer()
|
||||
.renderBatched(world.getBlockState(pos), pos, world, ms, builder, true, world.random,
|
||||
.renderBatched(world.getBlockState(pos), pos, world, ms, builder, true, new Random(),
|
||||
EmptyModelData.INSTANCE);
|
||||
ms.popPose();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue