mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-21 21:02:24 +00:00
Maybe more thread safe renderpass (#100)
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user