mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-18 19:49:12 +00:00
RenderBlocksCTM will now respect the render bounds (read below)
This behavior allows for certain renderers to no longer be needed (carpet floor) and for some rendering to be possible (CTM slabs). A single version of marble slab has been implemented with CTM as an example, we will move over the rest of the textures once this is finalized.
This commit is contained in:
1 parent
9b4fc25600
commit
8abc50634b
17 files changed
+258
-105
No files matched your search
@@ -9,6 +9,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.cricketcraft.chisel.Chisel;
|
||||
import com.cricketcraft.chisel.api.ICarvable;
|
||||
import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
import com.cricketcraft.chisel.api.rendering.ISubmapManager;
|
||||
import com.cricketcraft.chisel.utils.Drawing;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
@@ -32,6 +33,7 @@ public class RendererCTM implements ISimpleBlockRenderingHandler {
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks rendererOld) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
@@ -41,6 +43,9 @@ public class RendererCTM implements ISimpleBlockRenderingHandler {
|
||||
if (!rendererOld.hasOverrideBlockTexture() && var != null) {
|
||||
RenderBlocks rb = var.getSubmapManager().createRenderContext(rendererOld, world);
|
||||
if (rb != null) {
|
||||
if (rb.getClass() == RenderBlocksCTM.class) {
|
||||
((RenderBlocksCTM)rb).manager = (ISubmapManager<RenderBlocksCTM>) var.getSubmapManager();
|
||||
}
|
||||
return rb.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user