Maybe more thread safe renderpass (#100)

This commit is contained in:
Jason Mitchell authored and GitHub committed 2026-07-22 15:30:06 -07:00
1 parent 54c339e03e
commit c1ac213eab
2 files changed
+2 -4

No files matched your search

@@ -4,7 +4,6 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
import net.minecraftforge.client.ForgeHooksClient;
import team.chisel.client.render.RendererMultiLayer;
@@ -43,7 +42,6 @@ public abstract class BlockMultiLayerBase extends Block {
@Override
public boolean canRenderInPass(int pass) {
ForgeHooksClient.setRenderPass(pass);
return pass == 1 || pass == 0;
}
@@ -14,7 +14,7 @@ import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.init.Blocks;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.client.ForgeHooksClient;
import com.gtnewhorizons.angelica.api.ThreadSafeISBRH;
@@ -57,7 +57,7 @@ public class RendererMultiLayer implements ISimpleBlockRenderingHandler {
RenderBlocks renderer) {
if (!(blck instanceof BlockMultiLayerBase block)) return false;
if (MinecraftForgeClient.getRenderPass() == 0) {
if (ForgeHooksClient.getWorldRenderPass() == 0) {
if (block.icon != null) {
renderer.overrideBlockTexture = block.icon;
renderer.renderStandardBlock(block, x, y, z);