EMI

EMI

14M Downloads

1.21.1 Fabric | Dyeable Item Cauldron Washing Is Misleading

DiemondPlayer opened this issue ยท 0 comments

commented

This is a minor issue, but it may mislead some people

The issue is that EMI registers every dyeable item as washable in the cauldron (in the world interaction recipes) when in reality modded dyeable items do not support cauldron washing automatically, as that is something that needs to be implemented by the mod dev explicitly. I propose a solution that instead of registering every dyeable item, EMI registers only the vanilla ones (leather armor, dog armor, etc.). And the mod authors that add cauldron washing for their dyeable items can register those recipes themselves. Or alternatively, looking through CauldronBehaviour maps can help register those recipes dynamically, so that only the actually washable items are registered with a cauldron washing recipe.

I am an author of a mod that adds dyeable items and this is something that a mixin can't really fix, or if it can, it will look kind of ugly, so I thought that maybe opening an issue instead could be a better way to communicate.

The code i'm reffering to that registers cauldron washing:

for (Item i : dyeableItems) { if (hiddenItems.contains(i)) { continue; } EmiStack cauldron = EmiStack.of(Items.CAULDRON); EmiStack waterThird = EmiStack.of(Fluids.WATER, FluidUnit.BOTTLE); int uniq = EmiUtil.RANDOM.nextInt(); addRecipeSafe(registry, () -> EmiWorldInteractionRecipe.builder() .id(synthetic("world/cauldron_washing", EmiUtil.subId(i))) .leftInput(EmiStack.EMPTY, s -> new GeneratedSlotWidget(r -> { ItemStack stack = i.getDefaultStack(); stack.set(DataComponentTypes.DYED_COLOR, new DyedColorComponent(r.nextInt(0xFFFFFF + 1), true)); return EmiStack.of(stack); }, uniq, s.getBounds().x(), s.getBounds().y())) .rightInput(cauldron, true) .rightInput(waterThird, false) .output(EmiStack.of(i)) .supportsRecipeTree(false) .build()); }

located in VanillaPlugin line 646

(if that issue has already been arisen, i apologize for the repetiveness)