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 registered a texture like this from an Item.

    @SideOnly(Side.CLIENT)
    def registerIcons(reg:IIconRegister) {
        sprites(0) = reg.registerIcon(TechnicaCore.RESOURCEID + "parts/Glass_Basic")
    }

 

...how can I use it in a rendering method with the Tesselator in the world renderer?

I tried using its U and V values for the vertex adding but it doesn't seem to work:

val minU = sprites(0).getMinU
        val maxU = sprites(0).getMaxU
        val minV = sprites(0).getMinV
        val maxV = sprites(0).getMaxV

        //Minecraft.getMinecraft.renderEngine.bindTexture(TextureMap.locationItemsTexture)

        
        val tesselator = Tessellator.instance
        tesselator.addVertexWithUV(pos.x+1, pos.y, pos.z, maxU, minV)
        tesselator.addVertexWithUV(pos.x+1, pos.y+1, pos.z, maxU, maxV)
        tesselator.addVertexWithUV(pos.x, pos.y+1, pos.z, minU, maxV)
        tesselator.addVertexWithUV(pos.x, pos.y, pos.z, minU, minV)

 

I also tried using the Item Texture but it doesn't work either.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

  • Author

Ok it seems to work now...

 

EDIT: I forgot about the old "toLowerCase" thing ._.

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

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.