Posted February 9, 20169 yr I'm trying to figure out how to add colored tint to a block (or better still, just one face of it) that exists in the world. I imagine I would have to somehow access the block's TintIndex, but I have no idea how to do that or if that's even possible. <signature></signature>
February 9, 20169 yr It would be easier to draw a transparent quad manually. 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.
February 9, 20169 yr Are you referring to how grass has biome dependent coloring? Or are you trying for more of a highlight effect? I think its my java of the variables.
February 9, 20169 yr Author I'm trying to dynamically add tint to a block with an item - make it more red/green/blue/whatever while keeping the same texture. I assumed the TintIndex would be the way to do it. <signature></signature>
February 9, 20169 yr By "block " do you mean "all stone everywhere" or "that one cube right there"? 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.
February 9, 20169 yr he is talking about making blocks like aurora blocks from twilight forest in 1.8.9
February 9, 20169 yr Because I am intimately familiar with the Twilight Forest...mind explaining? 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.
February 10, 20169 yr Author By "block " do you mean "all stone everywhere" or "that one cube right there"? The latter; ideally when the item is used on the block, it should tint that specific face dependent on what dye item is loaded in it, with more uses of the item applying a heavier shade. As an example, if the method were simply shadeSide(r,g,b), then one use with a blue dye would add, say, five to the blue value. <signature></signature>
February 10, 20169 yr "That one cube right there" cannot be achieved via TintIndex or any other Block method. 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.
February 10, 20169 yr Author Well dang, then how do I do what I'm trying to do? Edit for details: if it helps, the item I have is a projectile "weapon" that shoots a custom projectile that extends Entity.Arrow, so I can get the block that it hits easily. <signature></signature>
February 10, 20169 yr Basically - paintball. Way I see it, you would need to make some universal TileEntity which would be able to mimic (render) block that is at its coords and use data saved in TE (colorization values) to manipulate colors of faces. Problem is - every damn block can have ANY-damn face (model). Even stupid dirt block can be made to be e.g stairs or some other sphere-like shit (by changing its .json file). This leads me to belive that the only way to achieve SAFE for use block-painting is to make some kind of special "painting block". Eventually you could alter other blocks, but as said - any block can have any model so I don't think it will be easy to do this for any side of block (you could maybe paint all quads facing some direction, but then BAM - any block can also use OTHER model than .json, and then BAM - it can even be .obj). What is alredy done (as mod) is painting mod that allows you to "paint" whole block of wood or wool to other color, but that one uses block replacement (metadata of both wool and wood are literally "colors". If you were to colorize WHOLE block (no matter what format), that would be infinitely easier, just call GL to alter rendering. But that has to be done in places beyond reach of the mortals, meaning - ASM hook. (I don't think there is a way to manipulate other ppls/vanilla models without having to write code for every possible block). Therefore I conclude - Without some hi-tech coding, rendering redesign, probably ASM and other shit - there is no way to do this NICELY (universal). Well... that's VERY pessimistic. I guess I had a bad day 1.7.10 is no longer supported by forge, you are on your own.
February 10, 20169 yr Author Hmmm.... I assume that you're referring to OpenBlocks when you mention the "other mod?" I tied to take a look at their code for the canvas, but I was really confused by it... I don't know where to look for information on rendering things. I think I might have bitten off more than I can chew for a "first mod" idea. It seemed so simple on paper... Edit: spelling Double edit: Thinking about OpenBlocks, would it be possible for me to do a similar thing with my item where I take the block that I hit with my projectile and replace it with a custom one that I can tint at will? If so, how do I grab the texture? <signature></signature>
February 10, 20169 yr If you were to colorize WHOLE block (no matter what format), that would be infinitely easier, just call GL to alter rendering. But that has to be done in places beyond reach of the mortals, meaning - ASM hook. (I don't think there is a way to manipulate other ppls/vanilla models without having to write code for every possible block). Therefore I conclude - Without some hi-tech coding, rendering redesign, probably ASM and other shit - there is no way to do this NICELY (universal). Well... that's VERY pessimistic. I guess I had a bad day I totally agree with that. Even if i managed to do this in 1.7.10 (with a lot of ASM), i don't want to look at 1.8.9 yet, as all rendering changed and i'll have to write all this from scratch. And it's sometimes not even working. @paradoxbomb In short, it depends on which blocks you want to target. More you are targetting, harder it will be. Simpliest solution here is, as said above, using tile entity and your own block to mimic another block, and recolor it. Just save old block state and color in your te, and use TESR to render a block with tint. Hint: you can recolor block, by using GL11.glColor before rendering it. Also, remember to push and pop matrixes! Hardest solution is one that supports blocks with tile entities and... it's very hard. It requires a lot of ASM. So, my advice, don't even try it, if you have never worked with ASM before. Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones
February 10, 20169 yr When you gaze into the abyss that is ASM, the abyss gazes back. 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.
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.