Skip to content

Commit

Permalink
Merge branch '12.x/forge' of https://github.com/Asek3/sodium-1.12 int…
Browse files Browse the repository at this point in the history
…o 12.x/forge
  • Loading branch information
embeddedt committed Jan 13, 2024
2 parents 1516698 + 3ac465e commit 00a9615
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import net.minecraft.world.WorldType;
import net.minecraftforge.client.ForgeHooksClient;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fluids.IFluidBlock;
import org.embeddedt.embeddium.api.ChunkDataBuiltEvent;
import org.embeddedt.embeddium.compat.ccl.CCLCompat;

Expand Down Expand Up @@ -100,7 +101,7 @@ public ChunkBuildResult<T> performBuild(ChunkRenderCacheLocal cache, ChunkBuildB

// If the block is vanilla air, assume it renders nothing. Don't use isAir because mods
// can abuse it for all sorts of things
if (block.getMaterial(blockState) == Material.AIR) {
if (blockState.getMaterial() == Material.AIR) {
continue;
}

Expand All @@ -123,7 +124,7 @@ public ChunkBuildResult<T> performBuild(ChunkRenderCacheLocal cache, ChunkBuildB

if (CCLCompat.canHandle(renderType)) {
CCLCompat.renderBlock(slice, pos, blockState, buffers.get(layer));
} else if (renderType == EnumBlockRenderType.MODEL) {
} else if (renderType == EnumBlockRenderType.MODEL && !(block instanceof IFluidBlock)) {
IBakedModel model = cache.getBlockModels()
.getModelForState(blockState);

Expand All @@ -135,7 +136,7 @@ public ChunkBuildResult<T> performBuild(ChunkRenderCacheLocal cache, ChunkBuildB
bounds.addBlock(relX, relY, relZ);
}

} else if (renderType == EnumBlockRenderType.LIQUID) {
} else if (block instanceof IFluidBlock) {
if (cache.getFluidRenderer().render(cache.getLocalSlice(), blockState, pos, buffers.get(layer))) {
bounds.addBlock(relX, relY, relZ);
}
Expand Down

0 comments on commit 00a9615

Please sign in to comment.