Jump to content

Missing Method - public Icon getBlockTextureFromSideAndMetadata()


Recommended Posts

Posted

Hi. I seem to be missing this function in my minecraft.jar (1.5.1).  I have tried installing both the recommended and the latest versions of forge (by downloading, and running install from in the folder)

 

public Icon getBlockTextureFromSideAndMetadata()

 

When I try to overide it in my custom block class (which extends BlockSand) I get errors. 

 

I am new to modding and forge, so not sure if this is a real method, or the examples and tutorials I am looking at are wrong or outdated?

 

 

Posted

Hi. I seem to be missing this function in my minecraft.jar (1.5.1).  I have tried installing both the recommended and the latest versions of forge (by downloading, and running install from in the folder)

 

public Icon getBlockTextureFromSideAndMetadata()

 

When I try to overide it in my custom block class (which extends BlockSand) I get errors. 

 

I am new to modding and forge, so not sure if this is a real method, or the examples and tutorials I am looking at are wrong or outdated?

 

 

Posted

Copy and paste your whole class here.

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.

Posted

Copy and paste your whole class here.

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.

Posted

It's probably because it's not:

public Icon getBlockTextureFromSideAndMetadata()

 

It's:

public Icon getBlockTextureFromSideAndMetadata(int side, int metadata).

 

If the parameters are different, it's considered a completely different function. You can find the original function in the Block class. If it's not there, then you must've installed something wrong or deleted it somehow, because it is definitely supposed to be there.

Posted

It's probably because it's not:

public Icon getBlockTextureFromSideAndMetadata()

 

It's:

public Icon getBlockTextureFromSideAndMetadata(int side, int metadata).

 

If the parameters are different, it's considered a completely different function. You can find the original function in the Block class. If it's not there, then you must've installed something wrong or deleted it somehow, because it is definitely supposed to be there.

Posted

new names try to look at the getIcon(...) method :)

 

I have the latest version and getBlockTextureFromSideAndMetadata(...) is in mine and getIcon(...) is not.

Posted

new names try to look at the getIcon(...) method :)

 

I have the latest version and getBlockTextureFromSideAndMetadata(...) is in mine and getIcon(...) is not.

Posted

getBlockIcon may be the name, couldn't get teamviewer to work so can't check what it's spelling was.

 

In anycase if you look into what methods you can override from the block class you should find several with texture or icon as a part of their name, if you check those methods one of them will have two int arguments, and it's documentation will tell you it's metadata and side :)

If you guys dont get it.. then well ya.. try harder...

Posted

getBlockIcon may be the name, couldn't get teamviewer to work so can't check what it's spelling was.

 

In anycase if you look into what methods you can override from the block class you should find several with texture or icon as a part of their name, if you check those methods one of them will have two int arguments, and it's documentation will tell you it's metadata and side :)

If you guys dont get it.. then well ya.. try harder...

Posted

It's probably because it's not:

public Icon getBlockTextureFromSideAndMetadata()

 

It's:

public Icon getBlockTextureFromSideAndMetadata(int side, int metadata).

 

If the parameters are different, it's considered a completely different function. You can find the original function in the Block class. If it's not there, then you must've installed something wrong or deleted it somehow, because it is definitely supposed to be there.

 

I was typing from memory at work and too lazy to look it up so I left out the args...

Posted

It's probably because it's not:

public Icon getBlockTextureFromSideAndMetadata()

 

It's:

public Icon getBlockTextureFromSideAndMetadata(int side, int metadata).

 

If the parameters are different, it's considered a completely different function. You can find the original function in the Block class. If it's not there, then you must've installed something wrong or deleted it somehow, because it is definitely supposed to be there.

 

I was typing from memory at work and too lazy to look it up so I left out the args...

Posted

new names try to look at the getIcon(...) method :)

 

Ahh, I see now.  This is my first steps into modding...  I know have 2 files in different folders from playing around, and they have different method names.

 

I have this in an older folder from last week:

 

    public final Icon getBlockTextureFromSide(int par1)

    {

        return this.getBlockTextureFromSideAndMetadata(par1, 0);

    }

 

and this in yesterdays one:

 

    public final Icon getBlockTextureFromSide(int par1)

    {

        return this.getIcon(par1, 0);

    }

 

 

How often does this happen?

Posted

new names try to look at the getIcon(...) method :)

 

Ahh, I see now.  This is my first steps into modding...  I know have 2 files in different folders from playing around, and they have different method names.

 

I have this in an older folder from last week:

 

    public final Icon getBlockTextureFromSide(int par1)

    {

        return this.getBlockTextureFromSideAndMetadata(par1, 0);

    }

 

and this in yesterdays one:

 

    public final Icon getBlockTextureFromSide(int par1)

    {

        return this.getIcon(par1, 0);

    }

 

 

How often does this happen?

Posted

Method names change between new versions of MCP and Forge, usually this is a minor problem to fix and it does not happen to often :)

The methods for textures are being worked on as a result of the new way textures are handled as of MC 1.5 therefore the methods aren't final.

But this is no problem since you can without a problem look into the block class to see what methods you have access too :P

 

Besides if you don't update your MCP/Forge version then it won't change by itself either :=)

If you guys dont get it.. then well ya.. try harder...

Posted

Method names change between new versions of MCP and Forge, usually this is a minor problem to fix and it does not happen to often :)

The methods for textures are being worked on as a result of the new way textures are handled as of MC 1.5 therefore the methods aren't final.

But this is no problem since you can without a problem look into the block class to see what methods you have access too :P

 

Besides if you don't update your MCP/Forge version then it won't change by itself either :=)

If you guys dont get it.. then well ya.. try harder...

Posted

Now that I got home I can see that I got the following methods inn my mod's block:

public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side);

This you could probably use.

As well as this one:

public Icon getIcon(int side, int metaData)

 

This is with Forge 7.7.1.656 and MCP 7.44 for Minecraft 1.5.1

Depending on your forge version it might be a bit different, anyways knowing java and your way around eclipse should make it easy for you to check which methods you got to work with.

 

Simply look intot he Block class and see what public methods it ahs related to textures. Or inside your block class but outside any method press CTRL+SPACE to see the list of methods you can override and look for Icon or Texture related methods :)

 

 

If you guys dont get it.. then well ya.. try harder...

Posted

Now that I got home I can see that I got the following methods inn my mod's block:

public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side);

This you could probably use.

As well as this one:

public Icon getIcon(int side, int metaData)

 

This is with Forge 7.7.1.656 and MCP 7.44 for Minecraft 1.5.1

Depending on your forge version it might be a bit different, anyways knowing java and your way around eclipse should make it easy for you to check which methods you got to work with.

 

Simply look intot he Block class and see what public methods it ahs related to textures. Or inside your block class but outside any method press CTRL+SPACE to see the list of methods you can override and look for Icon or Texture related methods :)

 

 

If you guys dont get it.. then well ya.. try harder...

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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