Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Category] Multiple conditions for CTM #7838

Open
PastaLaPasta opened this issue Dec 11, 2024 · 6 comments
Open

[Category] Multiple conditions for CTM #7838

PastaLaPasta opened this issue Dec 11, 2024 · 6 comments

Comments

@PastaLaPasta
Copy link

Description of the new feature

Here's the scenario: I had the idea to make it so that bedrock has different textures under different conditions, lets call them "vanilla" and "alternate". The idea is that in The End, bedrock uses the alternate texture, in The Nether it uses the vanilla texture, and in the overworld it uses the vanilla in the deepslate layer and the alternate above it (because of some stuff in my creative design world). Problem is, the current CTM only allows one property file per block (as far as I can tell at least), so I can't really make it work.

Here's my ideas for how to make it work:

  1. Allow us to make multiple sets of conditions inside one property file for the same tile. I would imagine this would work the same way as how CEM and Random Entities does it, so you have something like "matchTile.1=x", "biomes.1=y" and then "matchTiles.2=x", "height.2=z", and so forth.
  2. Let you have multiple property files loaded at the same time through some variable so the mod knows to let it (so that older Resource Packs don't break).

I personally think the first idea is the better one, but I don't know which one would be the easier or more efficient to implement, so I'll leave that to you in case you decide to entertain this suggestion.

@Emfire12345
Copy link

You can have multiple propertie files for the same block (some blocks in my pack have like 70), make the first one match your default state (0), than match with ./0.png for any conditions you want to match with multiple propertie files.

Also, next time ask in the discord first before making a bug report.

@PastaLaPasta
Copy link
Author

I see. I assumed it wouldn't work from a line in the CTM documentation, but in that case I'll try what you said. Also, sorry for not doing it through the Discord server. Though it doesn't surprise me, it never occurred to me that one exists.

@Emfire12345
Copy link

Just a little example for you:
1
2

@PastaLaPasta
Copy link
Author

I've been at it for an hour now, but I'm struggling to replicate what you've done correctly. It either just keeps defaulting back to being based on the height (so same problem that I had initially), or it just doesn't work at all.

For the record, I'm still in the opinion that my suggestion is a good one. Sure, it's technically possible to make it work, but the method for doing so is so convoluted that that it feels like it's not an intentional feature of the mod.

@Emfire12345
Copy link

You technically only need 2 files (if your default bedrock doesnt have ctm), the first one matching the end biomes and the second one matching all overworld biomes + heights above 0 and that should work.

If that still doesnt work, dm me in the optifine discord (Emfire) with how your files look atm

@PastaLaPasta
Copy link
Author

I still couldn't get it to work, but your latest reply made me realize that if I'm going to filter for every single biome in the overworld anyway, I could just compress everything into one file that checks for all overworld + End biomes above y=0, since everything in The End is above that regardless.

Though to be honest, this solution is far less elegant than I'd like, since this feels like hardcoding values instead of using variables (doesn't help that OptiFine doesn't have negative checks so that I could exclude the Nether biomes instead of including everything else). Unless there's a reason not to, I still think I want to leave the initial suggestion marked as open, since this solution wouldn't work in a modded scenario (like if my world were using Terralith, for example), which could matter when doing something more important than messing with the Bedrock texture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants