FoodValuesEvent mapping incorrect on fabric
CoffeeCatRailway opened this issue ยท 3 comments
@Override
public void registerEvents()
{
FoodValuesEvent.EVENT.register(event -> {
ItemStack stack = event.itemStack; // Mapping missmatch
if (stack.getItem() instanceof AbstractSandwichItem)
{
FoodProperties properties = ((AbstractSandwichItem) stack.getItem()).getFood(stack);
event.modifiedFoodValues = new FoodValues(properties.getNutrition(), properties.getSaturationModifier());
}
});
}
modCompileOnly("squeek.appleskin:appleskin-fabric:mc1.18.2-2.4.0:api") { transitive = false }
modRuntimeOnly("squeek.appleskin:appleskin-fabric:mc1.18.2-2.4.0") {
exclude module: 'modmenu'
}
It's saying that event.itemStack
is net.minecraft.item
while net.minecraft.world.item
is required
I didn't know what else to provide here, please tell me if you need anything else
Hm, is this a Yarn mappings difference? I'm not sure how that is handled or what a fix would look like.
I'm using quiltflower with official mojang mappings
I'm also in an architectury environment if that changes anything