Guard Villagers (Fabric/Quilt)

Guard Villagers (Fabric/Quilt)

7M Downloads

Eating consumes 2 items and you need to mark the correct dependency | 1.18.1

Opened this issue ยท 2 comments

commented

MC version: 1.18.1
Fabric version: 0.12.12

Mods used (ignoring dependencies)
Guard Villager fabric v1.0.2

Issue: So there's two issues here, the simple one is the fact that Cloth Config API (Fabric) is not marked as a dependency in the mod meaning there's crashes until the user installs that. Please update that to prevent people from being confused on why it fails. Second is that upon eating any food item, instead of only one being eaten, 2 items get used. This occurs with only your mod installed.

commented

public static final Event<OnConsumed> ON_CONSUMED_EVENT = createArrayBacked(OnConsumed.class, listeners -> (livingEntity, itemStack, i, finish) -> { for (OnConsumed listener : listeners) { listener.onConsumed(livingEntity, itemStack, i , finish); } return finish; }); @FunctionalInterface public interface OnConsumed { ItemStack onConsumed(LivingEntity livingEntity, ItemStack itemStack, int i, ItemStack finish); }

This is the offending code within GuardVillagersEvents.java that needs to be changed.

commented

Fixed in latest release