Posted September 3, 201411 yr I was wondering if there is a way of setting the texture of a block individually for every coordinate. So if i hav - let's say 20 - textures i want to see a random one of them if i place the block
September 4, 201411 yr I tried this some time ago, but it didn't work... I would be grateful if you could help me with this
September 4, 201411 yr public int onBlockPlaced(World world, int x, int y, int z, int meta, float par1, float par2, float par3, int par4){ long seed = (x & 255) | ((y & 255) << | (z << 16); Random generator = new Random(seed); int myRandomTexture = generator.nextInt(11); this.setBlockTextureName("Abrynos:Rune_" + myRandomTexture); return par4; }[/Code]
September 4, 201411 yr What diesieben07 said. This is due to the fact that the texture cannot be stored with the block, it has to be computed at render time in this case. Now the only problem is figuring out when returning the IIcon where the block actually is. That is tricky, since getIcon does not pass in the coordinates of the block as far as I can tell. -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
September 4, 201411 yr Hi this link has some more relevant info http://www.minecraftforge.net/forum/index.php/topic,21963.msg111491.html#msg111491 -TGG
September 5, 201411 yr Right. How did I miss it? -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
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.