Skip to content

Commit

Permalink
Increase saturation bonus, decrease magic food bonus #1500
Browse files Browse the repository at this point in the history
  • Loading branch information
baileyholl committed Nov 11, 2024
1 parent 829e1ea commit 5a63c3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build
# other
eclipse
run

runs
# Files from Forge MDK
forge*changelog.txt
server/*
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,18 @@ public void tick() {

public int getSourceValue(ItemStack i) {
if (i.getItem().isEdible()) {
int mana = 0;
FoodProperties food = i.getItem().getFoodProperties(i, null);
if(food == null)
return 0;
mana += 11 * food.getNutrition();
mana += 30 * food.getSaturationModifier();
int mana = 0;
mana += 11 * food.nutrition();
mana += (int) (30.0 * ((food.saturation() * 2.0)));
progress += 1;

if (i.is(ItemTagProvider.MAGIC_FOOD) || (i.getItem() instanceof BlockItem blockItem && blockItem.getBlock().defaultBlockState().is(BlockTagProvider.MAGIC_PLANTS))) {
progress += 4;
mana += 10;
mana *= 2;
mana += (int) ((float) mana * 1.5f);
}
return mana;
}
Expand Down

0 comments on commit 5a63c3f

Please sign in to comment.