rob_bb Posted April 21, 2013 Share Posted April 21, 2013 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? Quote Link to comment Share on other sites More sharing options...
rob_bb Posted April 21, 2013 Author Share Posted April 21, 2013 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? Quote Link to comment Share on other sites More sharing options...
Draco18s Posted April 21, 2013 Share Posted April 21, 2013 Copy and paste your whole class here. Quote 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. Link to comment Share on other sites More sharing options...
Draco18s Posted April 21, 2013 Share Posted April 21, 2013 Copy and paste your whole class here. Quote 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. Link to comment Share on other sites More sharing options...
Lunakki Posted April 22, 2013 Share Posted April 22, 2013 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. Quote Link to comment Share on other sites More sharing options...
Lunakki Posted April 22, 2013 Share Posted April 22, 2013 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. Quote Link to comment Share on other sites More sharing options...
Mazetar Posted April 22, 2013 Share Posted April 22, 2013 new names try to look at the getIcon(...) method Quote If you guys dont get it.. then well ya.. try harder... Link to comment Share on other sites More sharing options...
Mazetar Posted April 22, 2013 Share Posted April 22, 2013 new names try to look at the getIcon(...) method Quote If you guys dont get it.. then well ya.. try harder... Link to comment Share on other sites More sharing options...
Lunakki Posted April 22, 2013 Share Posted April 22, 2013 new names try to look at the getIcon(...) method I have the latest version and getBlockTextureFromSideAndMetadata(...) is in mine and getIcon(...) is not. Quote Link to comment Share on other sites More sharing options...
Lunakki Posted April 22, 2013 Share Posted April 22, 2013 new names try to look at the getIcon(...) method I have the latest version and getBlockTextureFromSideAndMetadata(...) is in mine and getIcon(...) is not. Quote Link to comment Share on other sites More sharing options...
Mazetar Posted April 22, 2013 Share Posted April 22, 2013 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 Quote If you guys dont get it.. then well ya.. try harder... Link to comment Share on other sites More sharing options...
Mazetar Posted April 22, 2013 Share Posted April 22, 2013 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 Quote If you guys dont get it.. then well ya.. try harder... Link to comment Share on other sites More sharing options...
rob_bb Posted April 22, 2013 Author Share Posted April 22, 2013 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... Quote Link to comment Share on other sites More sharing options...
rob_bb Posted April 22, 2013 Author Share Posted April 22, 2013 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... Quote Link to comment Share on other sites More sharing options...
rob_bb Posted April 22, 2013 Author Share Posted April 22, 2013 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? Quote Link to comment Share on other sites More sharing options...
rob_bb Posted April 22, 2013 Author Share Posted April 22, 2013 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? Quote Link to comment Share on other sites More sharing options...
Mazetar Posted April 22, 2013 Share Posted April 22, 2013 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 Besides if you don't update your MCP/Forge version then it won't change by itself either :=) Quote If you guys dont get it.. then well ya.. try harder... Link to comment Share on other sites More sharing options...
Mazetar Posted April 22, 2013 Share Posted April 22, 2013 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 Besides if you don't update your MCP/Forge version then it won't change by itself either :=) Quote If you guys dont get it.. then well ya.. try harder... Link to comment Share on other sites More sharing options...
Mazetar Posted April 22, 2013 Share Posted April 22, 2013 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 Quote If you guys dont get it.. then well ya.. try harder... Link to comment Share on other sites More sharing options...
Mazetar Posted April 22, 2013 Share Posted April 22, 2013 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 Quote If you guys dont get it.. then well ya.. try harder... Link to comment Share on other sites More sharing options...
Recommended Posts
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.