[ SUGGESTION ] Implement Interface class to ENUM class
Xelbayria opened this issue ยท 7 comments
Mod Name
Every Compat
This issue occurs when only Valkyrien Skies, addons, and the mod I have specified are installed and no other mods
- I have tested this issue and it occurs with only Valkyrien Skies, addons, and the mod I have specified
Minecraft Version
1.18
Mod Loader
Forge
Eureka version
latest version via Github
Issue description
I'm a DEV adding a mod to Every Compat. so it can generate variant helm with Wood Mods (Biomes O' Plenty & Others)
The issue is that I cannot add the support because of WoodType.kt is an ENUM class.
I noticed a comment was left "// TODO mod compat". Every Compat will take care of it for any Wood Mods. No need to worry about this.
This is applied to 1.20.1, too.
SOLUTION:
You can use Interface class to implement IWoodType.kt
to the WoodType.kt
. Here's an good example from a mod, Function Storage
I had no problem supporting the mod via Every Compat. I hope it's not much of work for you to implement.
Issue reproduction
n/a
Logs
No response
I made the changes you mentioned in a draft but I don't know if it is sufficient as the models are not created at runtime but listed in assets.
common/src/main/resources/assets/vs_eureka/blockstates
common/src/main/resources/assets/vs_eureka/models/block
I believe that the modals can and should be registered runtime to improve compact.
Alright, that shouldn't be an issue. I'll need that to be applied to 1.20.1, too.
You don't have to worry about the blockstates and models. Every Compat can copy them and modify them to use the woodType from other wood mods (Biomes O' Plenty so on...)
it's the same for texturing & recipes.
If you are curious, take a look at EC Backlog - You can leave some info or whatever
alr. All features from 1.18.2 get merged into 1.19+ eventually. I'll merge the pull once it's done. It would help if you could take a look to confirm it is working as I'm not very familiar with how compact is handled.
One place that still uses WoodType, is this file: common\src\main\kotlin\org\valkyrienskies\eureka\blockentity\renderer\WheelModel.kt
I'm not familiar with the functionality of that file.
In my mod Horizontal Doors, I have a list of door types under the common main class public static List<IHorizontalDoor> DOOR_TYPES
, does a list like that make compact easyer?