Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 :D

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;
    }

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

  • 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?

 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.