Open unilock opened 11 months ago
Mystical Agriculture's Infusion Crystals extend Cucumber's BaseReusableItem
, which appears to work by setting its recipe remainder to itself, minus one durability point. (source)
@Override
public ItemStack getRecipeRemainder(ItemStack stack) {
var copy = stack.copy();
copy.setCount(1);
if (!this.damage)
return copy;
var unbreaking = EnchantmentHelper.getItemEnchantmentLevel(Enchantments.UNBREAKING, stack);
for (var i = 0; i < unbreaking; i++) {
if (DigDurabilityEnchantment.shouldIgnoreDurabilityDrop(stack, unbreaking, Utils.RANDOM))
return copy;
}
copy.setDamageValue(stack.getDamageValue() + 1);
if (copy.getDamageValue() > stack.getMaxDamage())
return ItemStack.EMPTY;
return copy;
}
I'm guessing this is the relevant code in QuickBench?
Can't reproduce with 4.1.0+1.20.1 on 1.20.1 with Mystical Agriculture 3.0.2 in creative and survival, both with shift+click and single-clicking. The item does momentarily disappear but immediately reappears.
What exact versions were you using when you reproduced the bug? Because it seems that upstream inadvertently fixed it; although I'd like to fix it here too.
I believe it was the latest version for 1.19.2?
The mod Mystical Agriculture: Refabricated adds an "Infusion Crystal", an item used as a catalyst in crafting recipes.
Instead of being completely consumed in its recipes, it instead takes a point of damage per recipe it's used in.
(Note, however, that it does not take damage in the form of durability - instead, the damage taken seems to be stored as an integer in the item's NBT data.)(afaict it does take damage in the form of durability, but hides the durability bar in the inventory?)With QuickBench installed, the Crystal is completely consumed in its crafting recipes, when it should only take a single point of damage. Not ideal.