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

Hi, I'm having some problems creating a block with custom block model (similar to how a beacon is created) with RenderBlocks.class. I orgininally posted on minecraftfourms.net so if you wouldn't mind, follow this link. (mainly because im too lazy to type it out here). Thx!

http://www.minecraftforum.net/topic/2614094-forge-help-with-custom-block-renderer/

 

EDIT:

I found the problem. I was calling the wrong constructor of RenderBlocks. I needed to give an instance of IBlockAccess, because it was calling that. That is what was returning the null pointer exception. derp. xD

I think it's better to use the tessellator directly instead of the Model thingy, since each time you call render() on each part (cube) of your model, it does this:

- check if it's not hidden then
  - check if it's visible then
    - check if it's not compiled then
      - compile display list
    . else
      - translate the offset
      - check if it's rotate angles X, Y and Z are equal to 0.0F then
        - check if it's rotation points X, Y and Z are equal to 0.0F then
          - use displayList
          - check if it has child parts then
            - render childs
          . end if
        . else
          - translate to rotation points * par1
          - use displayList
          - check if it has child parts then
            - render childs
          . end if
          - counter-translate to rotation points * par1
        . end if

etc...

 

To look at what exactly it does, look up the render() method in the ModelRenderer class

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

  • Author

I think it's better to use the tessellator directly instead of the Model thingy, since each time you call render() on each part (cube) of your model, it does this:

- check if it's not hidden then
  - check if it's visible then
    - check if it's not compiled then
      - compile display list
    . else
      - translate the offset
      - check if it's rotate angles X, Y and Z are equal to 0.0F then
        - check if it's rotation points X, Y and Z are equal to 0.0F then
          - use displayList
          - check if it has child parts then
            - render childs
          . end if
        . else
          - translate to rotation points * par1
          - use displayList
          - check if it has child parts then
            - render childs
          . end if
          - counter-translate to rotation points * par1
        . end if

etc...

 

To look at what exactly it does, look up the render() method in the ModelRenderer class

 

My fault for not elaborating. I'm not actually using a conventional model. I want to render a block using RenderBlocks, like a beacon. I'm soon this so I don't actually have to use a model file.

Guest
This topic is now closed to further replies.

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.