Posted May 18, 201411 yr Hey, I want to know where I find the beacon renderer code. I mean the code, which forces the glass, obsidian and the light in the middle to render correctly.. I remember seeing it somewhere, but today I don't know where it is
May 18, 201411 yr That's the beam what I'm not searching for Search in RenderBlocks(package net.minecraft.client.renderer;).Its just blocktype , like torch rails and other that kind of renderers. public boolean renderBlockBeacon(BlockBeacon par1BlockBeacon, int par2, int par3, int par4) { float f = 0.1875F; this.setOverrideBlockTexture(this.getBlockIcon(Block.glass)); this.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); this.renderStandardBlock(par1BlockBeacon, par2, par3, par4); this.renderAllFaces = true; this.setOverrideBlockTexture(this.getBlockIcon(Block.obsidian)); this.setRenderBounds(0.125D, 0.0062500000931322575D, 0.125D, 0.875D, (double)f, 0.875D); this.renderStandardBlock(par1BlockBeacon, par2, par3, par4); this.setOverrideBlockTexture(this.getBlockIcon(Block.beacon)); this.setRenderBounds(0.1875D, (double)f, 0.1875D, 0.8125D, 0.875D, 0.8125D); this.renderStandardBlock(par1BlockBeacon, par2, par3, par4); this.renderAllFaces = false; this.clearOverrideBlockTexture(); return true; }
May 18, 201411 yr Hi What I did: 1) Open TileBeacon 2) search for usage of getRenderType 3) --> RenderBlocks.renderBlockByRenderType 4) --> search for type 34 gives case 34: return this.renderBlockBeacon((BlockBeacon)par1Block, par2, par3, par4); 5) ---> RenderBlocks.renderBlockBeacon -TGG
May 18, 201411 yr Author That's the beam what I'm not searching for Search in RenderBlocks(package net.minecraft.client.renderer;).Its just blocktype , like torch rails and other that kind of renderers. public boolean renderBlockBeacon(BlockBeacon par1BlockBeacon, int par2, int par3, int par4) { float f = 0.1875F; this.setOverrideBlockTexture(this.getBlockIcon(Block.glass)); this.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); this.renderStandardBlock(par1BlockBeacon, par2, par3, par4); this.renderAllFaces = true; this.setOverrideBlockTexture(this.getBlockIcon(Block.obsidian)); this.setRenderBounds(0.125D, 0.0062500000931322575D, 0.125D, 0.875D, (double)f, 0.875D); this.renderStandardBlock(par1BlockBeacon, par2, par3, par4); this.setOverrideBlockTexture(this.getBlockIcon(Block.beacon)); this.setRenderBounds(0.1875D, (double)f, 0.1875D, 0.8125D, 0.875D, 0.8125D); this.renderStandardBlock(par1BlockBeacon, par2, par3, par4); this.renderAllFaces = false; this.clearOverrideBlockTexture(); return true; } Thanks Hi What I did: 1) Open TileBeacon 2) search for usage of getRenderType 3) --> RenderBlocks.renderBlockByRenderType 4) --> search for type 34 gives case 34: return this.renderBlockBeacon((BlockBeacon)par1Block, par2, par3, par4); 5) ---> RenderBlocks.renderBlockBeacon -TGG Do you know how to create a new renderBlockByRenderType?
May 18, 201411 yr *BIG QUOTE* Very easy.There is even tut on wiki. http://www.minecraftforge.net/wiki/Multiple_Pass_Render_Blocks <- but use it only for one render pass...
May 18, 201411 yr That's the beam what I'm not searching for Search in RenderBlocks(package net.minecraft.client.renderer;).Its just blocktype , like torch rails and other that kind of renderers. public boolean renderBlockBeacon(BlockBeacon par1BlockBeacon, int par2, int par3, int par4) { float f = 0.1875F; this.setOverrideBlockTexture(this.getBlockIcon(Block.glass)); this.setRenderBounds(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); this.renderStandardBlock(par1BlockBeacon, par2, par3, par4); this.renderAllFaces = true; this.setOverrideBlockTexture(this.getBlockIcon(Block.obsidian)); this.setRenderBounds(0.125D, 0.0062500000931322575D, 0.125D, 0.875D, (double)f, 0.875D); this.renderStandardBlock(par1BlockBeacon, par2, par3, par4); this.setOverrideBlockTexture(this.getBlockIcon(Block.beacon)); this.setRenderBounds(0.1875D, (double)f, 0.1875D, 0.8125D, 0.875D, 0.8125D); this.renderStandardBlock(par1BlockBeacon, par2, par3, par4); this.renderAllFaces = false; this.clearOverrideBlockTexture(); return true; } Thanks Hi What I did: 1) Open TileBeacon 2) search for usage of getRenderType 3) --> RenderBlocks.renderBlockByRenderType 4) --> search for type 34 gives case 34: return this.renderBlockBeacon((BlockBeacon)par1Block, par2, par3, par4); 5) ---> RenderBlocks.renderBlockBeacon -TGG Do you know how to create a new renderBlockByRenderType? Hi Some background information in this link that might help http://greyminecraftcoder.blogspot.com.au/2013/07/block-rendering.html A few of the other links in the "Blocks" section might also be interesting http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html -TGG
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.