Skip to content

Commit

Permalink
Bumped to Origins 1.4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
RaymondBlaze committed Apr 18, 2022
1 parent 91ec322 commit b23c234
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 28 deletions.
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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()));
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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"
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"type": "apoli:modify_crafting",
"item_condition": {
"type": "apoli:food",
"inverted": true
"type": "apoli:food"
},
"item_action": {
"type": "apoli:modify",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"type": "origins:ingredient",
"ingredient": {
"tag": "minecraft:planks"
},
"inverted": true
}
},
"item_action": {
"type": "apoli:modify",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit b23c234

Please sign in to comment.