Sub-texture overriding fails with custom models
Anfauglir-Jakob opened this issue ยท 5 comments
Its me again and with really bad timing it seems to me. ^^"
But ive again stubled across some issues trying to use features from optifine in cit resewn (v0.8.1)...
This time its about bows and crossbows:
Using the texture.<value>
format for default crossbows seems bugged. It shows the crossbow_arrow
texture for all the pulling states and the normal crossbow
texture for the loaded arrow state.
Using a custom model (only for display changes) for bows (and maybe also crossbows) breaks the texture.<value>
format and only shows the changed bow
texture for all states but not the bow_pulling
ones.
Testpack:
bug_showcase.zip
This includes some custom bows and crossbows to do some testing:
bow - Name: jagdbogen
bow - Name: langbogen
crossbow - Name: leichte armbrust
crossbow - Name: schwere armbrust
Using a custom model (only for display changes) for bows (and maybe also crossbows) breaks the texture. format and only shows the changed bow texture for all states but not the bow_pulling ones.
For the Langboden(minecraft:optifine\cit\test\longbow.properties
) you are replacing the vanilla bow model with a model(minecraft:optifine\models\items\weapons\longbow.json
) that has no way of handling bow pulling.
Look at minecraft:item/bow.json
for reference of how model overrides work with bow pulling.
After adding it, the declared textures should apply to the overrides but the textures seem to not replace as well and that is a bug.
The Jagedbogen seems to work as intended with normal texture overrides.
Using the texture. format for default crossbows seems bugged. It shows the crossbow_arrow texture for all the pulling states and the normal crossbow texture for the loaded arrow state.
This is indeed bugged. For some reason having both the arrow texture and the pulling textures together is what's breaking it.
You are right about the bad timing ๐ I'll fix it when I get the chance but I can't promise when.
For the Langboden(
minecraft:optifine\cit\test\longbow.properties
) you are replacing the vanilla bow model with a model(minecraft:optifine\models\items\weapons\longbow.json
) that has no way of handling bow pulling. Look atminecraft:item/bow.json
for reference of how model overrides work with bow pulling.
After adding it, the declared textures should apply to the overrides but the textures seem to not replace as well and that is a bug.
Thats my bad... i referenced the wrong parent model. ^^" But also with parent:item/bow the same problem occurs.
Ive also tested writing the overrides into the longbow.json, but this only shows the default textures for the pulling states and is a bad way to do simple display changes.
(Ive also stubled across an issue testing around with the overrides: It seems theres no way to reference the optifine folder because it always searches in minecraft:models/<given path>
, but this could also be just me being stupid ^^")
The Jagedbogen seems to work as intended with normal texture overrides.
Yea, i shouldve marked this as "working reference" or so ^^"
This is by no means a critical bug, so please take the time you need :D I didn't expect such a quick answer at all xD
Thank you
I split the issue. The crossbow bug is going to be tackled separately, see issue #81.
I fixed it(will be out with v0.8.2), but you'll have to slightly modify the pack to work with CIT Resewn.
One of the things I dont like about optifine's implementation is the amount of assumptions it makes.
To make the parsing as clear as possible, when you attempt to replace a model, the children of the original model wont be copied over. Meaning that when you create a CIT for a bow and you do the one model, multiple textures thing, the model would have to have the overrides that were originally in the bow.
In your case this would just mean that longbow.json
will now also contain
"overrides": [
{
"predicate": {
"pulling": 1
},
"model": "item/bow_pulling_0"
},
{
"predicate": {
"pulling": 1,
"pull": 0.65
},
"model": "item/bow_pulling_1"
},
{
"predicate": {
"pulling": 1,
"pull": 0.9
},
"model": "item/bow_pulling_2"
}
]
Because I dont want to assume that these are already a part of the replacement model. It has to be declared now.