Darkhax-Minecraft / Ore-Stages

Allows blocks (primarily ores) to be placed into custom stages.
GNU Lesser General Public License v2.1
5 stars 5 forks source link

Request; CTM compatibility, for fix but with BetterWithMods HCStrata #40

Closed Fireztonez closed 5 years ago

Fireztonez commented 5 years ago

Hello, I work on a modpack how I want to stages somes ores and blocks, but I have the BetterWithMods HCStrata functionnality how I really enjoy. The HCStrata used CTM question to change the color of blocks depending the height level. The big problem is, right now, all ores hidden like stone blocks is bugged out,a nd is completly transparent.

hcstrata_invisible_block

I ask the Better With Mods dev in discord about that and his reply is:

primetoxinz:
OreStages simply changes the baked model that is rendered. If changing it to stone doesn't work with strata then that is OreStages own incompatiblity with CTM, not HCStrata

The only way I can fixed that issue, is to turn off the option B:"CTM Support"=true, but the mod doesn't have any other way to easily known the mining level of the block without trying to mine it, because there have no WAILA or TOP Support and the dev is not interest to add compatibility for that.

Thank you very mutch for your mod! Fireztonez

Darkhax commented 5 years ago

Hello,

Like the author said to you OreStages simply changes the baked model that is rendered, in this case the model rendering is their model, so it would have to be fixed within their mod. I don't know if it is reasonable for them to try and fix this on their end, but there is absolutely nothing I can do on my end to fix this.

Fireztonez commented 5 years ago

yeah, I see... I have try with ores from Thermal and this block is hidden correctly, so the issue is because NuclearCraft ores (How I try to hide right now) is Layered Texture... So I think I will have to create a report to CTM in that case...

tterrag1098 commented 5 years ago

Wait, huh? What exactly does "OreStages simply changes the baked model that is rendered" mean? How does it change it? Is it wrapping the existing model or replacing it? There are many ways to mess up CTM models as they rely on a lot more constraints than simple models.

Darkhax commented 5 years ago

@tterrag1098 I use a custom model which wraps both the original and hidden model. Then I delegate to the appropriate model based on the state of the client player. https://github.com/Darkhax-Minecraft/Ore-Stages/blob/master/src/main/java/net/darkhax/orestages/client/renderer/block/model/BakedModelTiered.java

tterrag1098 commented 5 years ago

It seems fine, but how do you handle the layer requirements of the wrapped block?

tterrag1098 commented 5 years ago

Nevermind, from what I see that shouldn't be a concern. @Fireztonez what exactly have you changed with CTM, can you post the files?

Fireztonez commented 5 years ago

Sorry for the delay of the reply, I just saw the message here.

I didn't change anything personnaly with CTM... I use Better With Mods configuration for HCStrata how used CTM function question to override the texture if the strata is higher than the normal one.

I have talk with the primetoxinz on discord about that issue and and he said the bug is not caused by BWM but probably by CTM, here's the conversatation I have about that issue:

@primetoxinz I found the issue... the problem is not directly HCStrata or OreStages... the problem look to be on the Mod Owner of the block... Because I try right now to hide NuclearCraft Ores, and this blocks caused problem, probably because the mod doesn't support CTM... Bt I just place a ore from Thermal Foundation staged, and it show correctly like a stone block and with the good strata

primetoxinz28/07/2019
oh, yeah
they are probably special renders

Fireztonez28/07/2019
Nuclearcraft Ores used layered texture

primetoxinz28/07/2019
yeah
that's the problem

Fireztonez28/07/2019
the good thing, the block is already shown with the good strata color... but impossible to stages without issue :/ with hcstarta enabled
so, what, layered texture will caused issue with HCStrata for that? There have a solution for that?

primetoxinz28/07/2019
I have no clue
that's all CTM
not me
ask tterrag

Fireztonez28/07/2019
:open_mouth: my god, so, I should create an issue with CTM... thank's

So, the only thing I do, is made a simple orestages script, question to hide Nuclearcraft Ores (how used layered textures for the ores). So the problem appen only on vert specific case, With HCStrata (Better WIth Mods Feature), with Layered Texture ores (In that case Nuclearcraft) when you try to hide with OreStages...

So, you can possibly look on the Better With Mods code, what function is used for that... I'm not a Java programmer so this is pretty hard to see myself where's that specific function is called, but when I search about Strata on the GitLab I saw couples of files: The main file for HCStrata look to be: https://gitlab.com/BetterWithMods/1.12/BetterWithMods/blob/1.12/src%2Fmain%2Fjava%2Fbetterwithmods%2Fmodule%2Fhardcore%2Fworld%2Fstrata%2FHCStrata.java And the rest on the Strata folder... https://gitlab.com/BetterWithMods/1.12/BetterWithMods/tree/1.12/src/main/java/betterwithmods/module/hardcore/world/strata

If you need more information, I can try to help you more about that issue or, possibly talking with primetoxinz can help...

Fireztonez commented 5 years ago

@tterrag1098 do you see my reply to your question?

tterrag1098 commented 5 years ago

To test this further I'm gonna need to be able to reproduce it locally. Can you provide a minimal set of mods + configs to reproduce this issue?