VazkiiMods / Quark

Small things, improving Minecraft without changing the core gameplay.
https://quark.vazkii.net
Other
587 stars 287 forks source link

Variant Selector pick block does not reset variant type when picking original block #5042

Open copygirl opened 2 months ago

copygirl commented 2 months ago

Minecraft: 1.20.1 NeoForge: 47.1.106 Quark: 4.0-460

Reproduction

Thoughts

Browsing through the code a little, could this be because the original item is not considered a variant, and thus the following code does not reset the currently selected variant?

https://github.com/VazkiiMods/Quark/blob/aa23a936a0e16c775c66988df614a9fbb6b24cff/src/main/java/org/violetmoon/quark/content/experimental/module/VariantSelectorModule.java#L269-L272

The variant might also need to be reset if (baseBlock == pickedBlock).

copygirl commented 2 months ago

Relatedly, the inventory check should be skipped in creative mode, for variant picking to work in creative when you don't already have the original item in your inventory. Otherwise, the variant block is picked and put in the hotbar.