Minor fixes for translucency and block ID's
This commit is contained in:
+3
@@ -483,6 +483,7 @@ public class BlockStateWrapper implements IBlockStateWrapper
|
||||
if (this.blockState.is(BlockTags.LEAVES)
|
||||
|| serialString.contains("bamboo")
|
||||
|| serialString.contains("cactus")
|
||||
|| serialString.contains("chorus_flower")
|
||||
)
|
||||
{
|
||||
return IrisBlockMaterial.LEAVES;
|
||||
@@ -517,6 +518,8 @@ public class BlockStateWrapper implements IBlockStateWrapper
|
||||
|| serialString.contains("grass_block")
|
||||
|| serialString.contains("gravel")
|
||||
|| serialString.contains("mud")
|
||||
|| serialString.contains("podzol")
|
||||
|| serialString.contains("mycelium")
|
||||
)
|
||||
{
|
||||
return IrisBlockMaterial.DIRT;
|
||||
|
||||
@@ -202,14 +202,6 @@ public class FabricClientProxy implements AbstractModInitializer.IEventProxy
|
||||
#endif
|
||||
}
|
||||
});
|
||||
|
||||
WorldRenderEvents.AFTER_TRANSLUCENT.register((renderContext) ->
|
||||
{
|
||||
this.clientApi.renderDeferredLods(ClientLevelWrapper.getWrapper(renderContext.world()),
|
||||
McObjectConverter.Convert(renderContext.matrixStack().last().pose()),
|
||||
McObjectConverter.Convert(renderContext.projectionMatrix()),
|
||||
renderContext.tickDelta());
|
||||
});
|
||||
|
||||
// Debug keyboard event
|
||||
// FIXME: Use better hooks so it doesn't trigger key press events in text boxes
|
||||
|
||||
+11
@@ -23,7 +23,11 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
||||
#if MC_VER < MC_1_19_4
|
||||
import com.mojang.math.Matrix4f;
|
||||
#else
|
||||
import com.seibel.distanthorizons.common.wrappers.McObjectConverter;
|
||||
import com.seibel.distanthorizons.common.wrappers.world.ClientLevelWrapper;
|
||||
import com.seibel.distanthorizons.core.api.internal.ClientApi;
|
||||
import net.minecraft.client.Camera;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
import net.minecraft.client.renderer.LightTexture;
|
||||
import org.joml.Matrix4f;
|
||||
@@ -106,6 +110,13 @@ public class MixinLevelRenderer
|
||||
private void renderChunkLayer(RenderType renderType, PoseStack modelViewMatrixStack, double camX, double camY, double camZ, Matrix4f projectionMatrix, CallbackInfo callback)
|
||||
#endif
|
||||
{
|
||||
if (renderType.equals(RenderType.translucent())) {
|
||||
ClientApi.INSTANCE.renderDeferredLods(ClientLevelWrapper.getWrapper(this.level),
|
||||
McObjectConverter.Convert(modelViewMatrixStack.last().pose()),
|
||||
McObjectConverter.Convert(projectionMatrix),
|
||||
previousPartialTicks);
|
||||
}
|
||||
|
||||
// FIXME completely disables rendering when sodium is installed
|
||||
if (Config.Client.Advanced.Debugging.lodOnlyMode.get())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user