diff --git a/gradle.properties b/gradle.properties index 603d098..99e03a1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ org.gradle.daemon=false # Base properties minecraft_version=1.18.2 - forge_version=1.18.2-40.0.46 + forge_version=1.18.2-40.0.52 mappings_channel=parchment mappings_version=2022.03.13-1.18.2 @@ -18,5 +18,7 @@ org.gradle.daemon=false # Dependencies caelus_version=1.18.1-3.0.0.2 - origins_version=3747134 + origins_version=3757460 + +# Compat Dependencies apotheosis_version=3717791 \ No newline at end of file diff --git a/src/main/java/limonblaze/originsclasses/mixin/FoodDataMixin.java b/src/main/java/limonblaze/originsclasses/mixin/FoodDataMixin.java index 35eb627..da11bcf 100644 --- a/src/main/java/limonblaze/originsclasses/mixin/FoodDataMixin.java +++ b/src/main/java/limonblaze/originsclasses/mixin/FoodDataMixin.java @@ -3,6 +3,7 @@ import limonblaze.originsclasses.util.NbtType; import limonblaze.originsclasses.util.NbtUtils; import net.minecraft.util.Mth; +import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.food.FoodData; import net.minecraft.world.food.FoodProperties; import net.minecraft.world.item.Item; @@ -18,11 +19,11 @@ public abstract class FoodDataMixin { @Shadow public abstract void eat(int food, float saturationModifier); - @Inject(method = "eat(Lnet/minecraft/world/item/Item;Lnet/minecraft/world/item/ItemStack;)V", at = @At("TAIL")) - private void originsClasses$handleFoodBonus(Item item, ItemStack stack, CallbackInfo ci) { - FoodProperties food = item.getFoodProperties(); + @Inject(method = "eat(Lnet/minecraft/world/item/Item;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/entity/LivingEntity;)V", at = @At("TAIL"), remap = false) + private void originsClasses$handleFoodBonus(Item pItem, ItemStack pStack, LivingEntity entity, CallbackInfo ci) { + FoodProperties food = pStack.getFoodProperties(entity); if(food != null) { - NbtUtils.getOriginsClassesData(stack, NbtUtils.FOOD_BONUS, NbtType.FLOAT).ifPresent(f -> + NbtUtils.getOriginsClassesData(pStack, NbtUtils.FOOD_BONUS, NbtType.FLOAT).ifPresent(f -> this.eat(Mth.floor(food.getNutrition() * f), food.getSaturationModifier())); } } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index ed6e946..c306860 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -16,7 +16,7 @@ description = "An add-on for the Origins mod which adds classes to the game." [[dependencies.origins-classes]] modId = "forge" mandatory = true -versionRange = "[40,)" +versionRange = "[40.0.47,)" ordering = "NONE" side = "BOTH" @@ -30,6 +30,6 @@ side = "BOTH" [[dependencies.origins-classes]] modId = "origins" mandatory = true -versionRange = "[1.18.2-1.3.1.14,)" +versionRange = "[1.18.2-1.4.1,)" ordering = "NONE" side = "BOTH" diff --git a/src/main/resources/data/origins_classes/powers/better_crafted_food.json b/src/main/resources/data/origins_classes/powers/better_crafted_food.json index 43d91f8..1744239 100644 --- a/src/main/resources/data/origins_classes/powers/better_crafted_food.json +++ b/src/main/resources/data/origins_classes/powers/better_crafted_food.json @@ -1,8 +1,7 @@ { "type": "apoli:modify_crafting", "item_condition": { - "type": "apoli:food", - "inverted": true + "type": "apoli:food" }, "item_action": { "type": "apoli:modify", diff --git a/src/main/resources/data/origins_classes/powers/more_planks_from_logs.json b/src/main/resources/data/origins_classes/powers/more_planks_from_logs.json index a02b7d9..14f4323 100644 --- a/src/main/resources/data/origins_classes/powers/more_planks_from_logs.json +++ b/src/main/resources/data/origins_classes/powers/more_planks_from_logs.json @@ -4,8 +4,7 @@ "type": "origins:ingredient", "ingredient": { "tag": "minecraft:planks" - }, - "inverted": true + } }, "item_action": { "type": "apoli:modify", diff --git a/src/main/resources/data/origins_classes/powers/quality_equipment.json b/src/main/resources/data/origins_classes/powers/quality_equipment.json index 94a1043..3504093 100644 --- a/src/main/resources/data/origins_classes/powers/quality_equipment.json +++ b/src/main/resources/data/origins_classes/powers/quality_equipment.json @@ -3,8 +3,7 @@ "melee": { "type": "apoli:modify_crafting", "item_condition": { - "type": "origins_classes:melee", - "inverted": true + "type": "origins_classes:melee" }, "item_action": { "type": "apoli:modify", @@ -14,8 +13,7 @@ "range": { "type": "apoli:modify_crafting", "item_condition": { - "type": "origins_classes:range", - "inverted": true + "type": "origins_classes:range" }, "item_action": { "type": "apoli:modify", @@ -25,8 +23,7 @@ "tool": { "type": "apoli:modify_crafting", "item_condition": { - "type": "origins_classes:tool", - "inverted": true + "type": "origins_classes:tool" }, "item_action": { "type": "apoli:modify", @@ -36,8 +33,7 @@ "shield": { "type": "apoli:modify_crafting", "item_condition": { - "type": "origins_classes:shield", - "inverted": true + "type": "origins_classes:shield" }, "item_action": { "type": "apoli:modify", @@ -47,8 +43,7 @@ "helmet": { "type": "apoli:modify_crafting", "item_condition": { - "type": "origins_classes:helmet", - "inverted": true + "type": "origins_classes:helmet" }, "item_action": { "type": "apoli:modify", @@ -58,8 +53,7 @@ "chestplate": { "type": "apoli:modify_crafting", "item_condition": { - "type": "origins_classes:chestplate", - "inverted": true + "type": "origins_classes:chestplate" }, "item_action": { "type": "apoli:modify", @@ -69,8 +63,7 @@ "leggings": { "type": "apoli:modify_crafting", "item_condition": { - "type": "origins_classes:leggings", - "inverted": true + "type": "origins_classes:leggings" }, "item_action": { "type": "apoli:modify", @@ -80,8 +73,7 @@ "shoes": { "type": "apoli:modify_crafting", "item_condition": { - "type": "origins_classes:shoes", - "inverted": true + "type": "origins_classes:shoes" }, "item_action": { "type": "apoli:modify",