Wizardry icon indicating copy to clipboard operation
Wizardry copied to clipboard

[JEI & CrT] Can't display wildcard metadata

Open SettingDust opened this issue 3 years ago • 7 comments

Please read the guide for contributing before posting.

Minecraft version: 1.12.2 Wizardry version: 4.2.11 Environment: Single & Sponge server

Issue details: https://github.com/CraftTweaker/CraftTweaker/issues/1077 https://github.com/mezz/JustEnoughItems/issues/2098

CraftTweaker

val runeStone = <ebwizardry:runestone:*>;
val runeStonePedestal = <ebwizardry:runestone_pedestal:*>;

recipes.addShaped("Waystone", <waystones:waystone>, 
[
    [null,              runeStone,              null],
    [runeStone,         <waystones:warp_stone>, runeStone],
    [runeStonePedestal, runeStonePedestal,      runeStonePedestal],
]);

JEI 图片

Minecraft 图片 图片

Other mods involved: Crafttweaker: 1.12-4.1.20.589 JEI: 1.12.2-4.16.1.302

SettingDust avatar Sep 27 '20 00:09 SettingDust

Hmmm okay... there's nothing special about runestone metadata compared to any other metadata blocks apart from 0 not being a valid value. Does crafttweaker have a way to specify a range of metadata values?

Electroblob77 avatar Sep 27 '20 09:09 Electroblob77

That is done by :* which they are doing already, it is the vanilla wildcard metadata, and works fine on things like wool and planks (and I would assume more, I had the user test wool specifically and it worked).

jaredlll08 avatar Sep 27 '20 09:09 jaredlll08

No way apart from for 1 to X. And it's what I'm using


val runeStone = <ebwizardry:runestone>.definition;

for meta in 1 to 8 {
    <ore:blockRuneStone>.add(runeStone.makeStack(meta));
}

val runeStonePedestal = <ebwizardry:runestone_pedestal>.definition;

for meta in 1 to 8 {
    <ore:blockRuneStonePedestal>.add(runeStonePedestal.makeStack(meta));
}

SettingDust avatar Sep 27 '20 09:09 SettingDust

And that works? If so, then it must be because of meta 0 being missing.

Electroblob77 avatar Sep 27 '20 09:09 Electroblob77

And that works? If so, then it must be because of meta 0 being missing.

Yes. It's ok.

SettingDust avatar Sep 27 '20 09:09 SettingDust

Great, in that case I assume allowing meta 0 as a variant (even if it's unobtainable) will fix this.

Electroblob77 avatar Sep 27 '20 09:09 Electroblob77

It's generally safest to assume that players will find a way to get invalid items, particularly when other mods are involved.

Tora-B avatar Sep 28 '20 04:09 Tora-B