game changed the way you create foods. for example minecraft 1.21.8 code for the golden apple is Foods.java public static final FoodProperties GOLDEN_APPLE = new FoodProperties.Builder().nutrition(4).saturationModifier(1.2F).alwaysEdible().build(); Items.java public static final Item GOLDEN_APPLE = registerItem("golden_apple", new Item.Properties().food(Foods.GOLDEN_APPLE, Consumables.GOLDEN_APPLE)); Consumables.java public static final Consumable GOLDEN_APPLE = defaultFood() .onConsume( new ApplyStatusEffectsConsumeEffect( List.of(new MobEffectInstance(MobEffects.REGENERATION, 100, 1), new MobEffectInstance(MobEffects.ABSORPTION, 2400, 0)) ) )