Skip to content

Commit

Permalink
Fix food with leftovers being completely consumed
Browse files Browse the repository at this point in the history
  • Loading branch information
Flamarine committed Aug 26, 2022
1 parent 8efe9ee commit 6f77174
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ yarn_mappings = 1.19.2+build.1
loader_version = 0.14.8

# Mod Properties
mod_version = 1.0.2+mc1.19.2
mod_version = 1.0.3+mc1.19.2
maven_group = committee.nova
archives_base_name = MinersLunchbox-fabric

Expand Down
2 changes: 1 addition & 1 deletion minepkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ manifestVersion = 0
type = "mod"
name = "minerslunchbox"
description = "Lunchbox, yum"
version = "1.0.2+mc1.19.2"
version = "1.0.3+mc1.19.2"
platform = "fabric"
license = "MIT"
source = "https://github.com/Nova-Committee/MinersLunchbox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public ItemStack finishUsing(ItemStack stack, World world, LivingEntity user) {
ItemStack stackToEat = data.getStacks().get(eat);
if (!stackToEat.isEmpty()) {
if (stackToEat.isFood()) {
data.setStack(eat, user.eatFood(world, stackToEat));
data.setStack(eat, stackToEat.finishUsing(world, user));
} else {
world.spawnEntity(new ItemEntity(world, user.getX(), user.getY(), user.getZ(), stackToEat));
}
Expand Down Expand Up @@ -235,7 +235,7 @@ private static void eatUntilFull(PlayerEntity user, World world, ItemStack lunch
ItemStack stackToEat = data.getStacks().get(eat);
if (!stackToEat.isEmpty()) {
if (stackToEat.isFood()) {
data.setStack(eat, user.eatFood(world, stackToEat));
data.setStack(eat, stackToEat.finishUsing(world, user));
} else {
world.spawnEntity(new ItemEntity(world, user.getX(), user.getY(), user.getZ(), stackToEat));
}
Expand Down
Binary file modified src/main/resources/assets/minerslunchbox/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6f77174

Please sign in to comment.