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

I am creating a model in code by generating BakedQuads, using this constructor

public BakedQuad(int[] vertexDataIn, int tintIndexIn, EnumFacing faceIn, TextureAtlasSprite spriteIn, boolean applyDiffuseLighting, net.minecraft.client.renderer.vertex.VertexFormat format)

 

what are tintIndexIn, and spriteIn used for?

Current Project: Armerger 

Planned mods: Light Drafter  | Ore Swords

Looking for help getting a mod off the ground? Coding  | Textures

The tint index is passed to

IBlockColor

/

IItemColor

so they know which part of the model is being coloured and can return the appropriate colour based on that.

 

I believe the

TextureAtlasSprite

is a location on the block texture sheet to render on the quad (i.e. the quad's texture).

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author

I am trying to choose the rgba color for the quad to be during runtime.

I followed the calls in RenderItem to method in TextureUtil:

public static int anaglyphColor(int p_177054_0_)
    {
        int i = p_177054_0_ >> 24 & 255;
        int j = p_177054_0_ >> 16 & 255;
        int k = p_177054_0_ >> 8 & 255;
        int l = p_177054_0_ & 255;
        int i1 = (j * 30 + k * 59 + l * 11) / 100;
        int j1 = (j * 30 + k * 70) / 100;
        int k1 = (j * 30 + l * 70) / 100;
        return i << 24 | i1 << 16 | j1 << 8 | k1;
    }

Which seems to be getting the rgba information correctly and then completely destroying the information ...

 

If my item doesn't have a texture will the tintIndexIn do anything?

Current Project: Armerger 

Planned mods: Light Drafter  | Ore Swords

Looking for help getting a mod off the ground? Coding  | Textures

RenderItem#renderQuads

uses the quad's tint index to get the colour from

ItemColors

(i.e. the

IItemColor

registered for the

Item

). If anaglyph mode is enabled,

TextureUtil.anaglyphColor

is used to translate the colour into an anaglyph colour.

 

I don't know enough about the rendering system to say what happens when a colour is applied to a quad without a texture.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author

I am confused beyond expression ... I build my mod and made a lan world and had another player connect, this is what my item looks like (yes it includes those chickens in the background) as she moves around it changes. sometimes its chickens sometimes there are bows, once there was even a giant bat.

imgur

(The guy in red is holding a MeleeCore item that is generated with the name Bluex5 which gets registered during world load event in LiDrEvents.class)

 

Nothing shows up on my client when I am holding the item. (btw I am expecting a small series of 5 blue cubes extended in a single direction)

 

Here is my current project

If you want to know where a specific thing is let me know.

Current Project: Armerger 

Planned mods: Light Drafter  | Ore Swords

Looking for help getting a mod off the ground? Coding  | Textures

  • Author

Still haven't figured out how this is getting all these different models. If anyone has the time and is willing to I would appreciate getting into some kind of chat/screen share to step through this and hopefully get it solved.

Current Project: Armerger 

Planned mods: Light Drafter  | Ore Swords

Looking for help getting a mod off the ground? Coding  | Textures

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.