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

hello forge modders!

:-X

I have dug all around in the forge leaf class to find how to color block sprites like minecraft does to leaves.

in the leaves class i have dug up

this:

    public Icon getBlockTextureFromSideAndMetadata(int par1, int par2)
    {
        return (par2 & 3) == 1 ? this.iconArray[this.field_94394_cP][1] : ((par2 & 3) == 3 ? this.iconArray[this.field_94394_cP][3] : this.iconArray[this.field_94394_cP][0]);
    }

I honestly have no clue what ANY of this does (I mean what the heck is field_94394_cP?). could someone please assist me and tell me what this means?

 

edit:

iconarray and field_94394_cP are formatted like so:

private int field_94394_cP;

private Icon[][] iconArray = new Icon[2][];

Also, I should have you know that you are reading my signature.

hello forge modders!

:-X

I have dug all around in the forge leaf class to find how to color block sprites like minecraft does to leaves.

in the leaves class i have dug up

this:

    public Icon getBlockTextureFromSideAndMetadata(int par1, int par2)
    {
        return (par2 & 3) == 1 ? this.iconArray[this.field_94394_cP][1] : ((par2 & 3) == 3 ? this.iconArray[this.field_94394_cP][3] : this.iconArray[this.field_94394_cP][0]);
    }

I honestly hav no clue what ANY of this does (I mean what the heck is field_94394_cP?). could someone please assist me and tell me what this means?

 

field_94394_cP is just a not-deobfuscated class variable.

 

In this case it is an array index.  If you're looking at leaves, I believe that field holds a reference to whether or not Minecraft is in fancy rendering (transparent leaves) or fast rendering (opaque leaves).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

okay, cna you point me to where i can learn to color blocks properly?

Also, I should have you know that you are reading my signature.

okay, cna you point me to where i can learn to color blocks properly?

 

	public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
    {
        return 16777215;  //change this
    }

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Oh do i see what i think?

so if i am correct;

i pick a hex color code and translate it to B10.

the par1, par2 and, par3  are coords.

can i apply this to ANY block?

Also, I should have you know that you are reading my signature.

Oh do i see what i think?

so if i am correct;

i pick a hex color code and translate it to B10.

the par1, par2 and, par3  are coords.

can i apply this to ANY block?

 

Yes, its the decimal representation of a hexadecimal RRGGBB value.

par1/2/3 are the x/y/z coords of the specific block

And yes, you can use this function on any block you create (or base class edit existing blocks).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

thanks sooo much!!!!!

Also, I should have you know that you are reading my signature.

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.