Jump to content

[1.8.9] Add tint to block in world?


paradoxbomb

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 :o

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

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 :o

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I had a similar issue to what you do above. Given this is an old post, you've probably sorted this now In my case, I had Java (JDK) 22 installed. After uninstalling that and installing 17.0.11 (having both installed gives the same error), then running the startserver.bat worked for me. I managed to get to the EULA section and then start my server correctly- I hope it helps anyone else who may have this issue!
    • Make a test with another Launcher like MultiMC, AT Launcher or Technic Launcher
    • I opened up Minecraft today for the first time in a month and whenever I try and play forge I get an error 1 message. I restarted my computer, tried reinstalling both Minecraft and Forge and have updated all of my drivers. Nothing seems to work so I'm stumped. I have absolutely no mods installed ATM so I have no idea what could be causing the problem. I hope yall are able to help.   DebugLog:   [19May2024 20:33:51.600] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, dmoy18, --version, 1.20.1-forge-47.2.0, --gameDir, C:\Users\dmoyf\AppData\Roaming\.minecraft, --assetsDir, C:\Users\dmoyf\AppData\Roaming\.minecraft\assets, --assetIndex, 5, --uuid, c083972cd92d4dd2894beb25b82ebe82, --accessToken, ????????, --clientId, MDljMzIwMjYtOTJiNS00YWUxLTk1M2EtN2ExMGExZWM0MDAw, --xuid, 2535417310772497, --userType, msa, --versionType, release, --quickPlayPath, C:\Users\dmoyf\AppData\Roaming\.minecraft\quickPlay\java\1716168829421.json, --launchTarget, forgeclient, --fml.forgeVersion, 47.2.0, --fml.mcVersion, 1.20.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20230612.114412] [19May2024 20:33:51.604] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.9+10.0.9+main.dcd20f30 starting: java version 17.0.8 by Microsoft; OS Windows 11 arch amd64 version 10.0 [19May2024 20:33:51.634] [main/DEBUG] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Found launch services [fmlclientdev,forgeclient,minecraft,forgegametestserverdev,fmlserveruserdev,fmlclient,fmldatauserdev,forgeserverdev,forgeserveruserdev,forgeclientdev,forgeclientuserdev,forgeserver,forgedatadev,fmlserver,fmlclientuserdev,fmlserverdev,forgedatauserdev,testharness,forgegametestserveruserdev] [19May2024 20:33:51.653] [main/DEBUG] [cpw.mods.modlauncher.NameMappingServiceHandler/MODLAUNCHER]: Found naming services : [srgtomcp] [19May2024 20:33:51.668] [main/DEBUG] [cpw.mods.modlauncher.LaunchPluginHandler/MODLAUNCHER]: Found launch plugins: [mixin,eventbus,slf4jfixer,object_holder_definalize,runtime_enum_extender,capability_token_subclass,accesstransformer,runtimedistcleaner] [19May2024 20:33:51.681] [main/DEBUG] [cpw.mods.modlauncher.TransformationServicesHandler/MODLAUNCHER]: Discovering transformation services [19May2024 20:33:51.688] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path GAMEDIR is C:\Users\dmoyf\AppData\Roaming\.minecraft [19May2024 20:33:51.689] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path MODSDIR is C:\Users\dmoyf\AppData\Roaming\.minecraft\mods [19May2024 20:33:51.689] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path CONFIGDIR is C:\Users\dmoyf\AppData\Roaming\.minecraft\config [19May2024 20:33:51.689] [main/DEBUG] [net.minecraftforge.fml.loading.FMLPaths/CORE]: Path FMLCONFIG is C:\Users\dmoyf\AppData\Roaming\.minecraft\config\fml.toml
  • Topics

×
×
  • Create New...

Important Information

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