File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
src/main/java/iguanaman/hungeroverhaul/util Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -69,16 +69,22 @@ else if (Loader.isModLoaded("harvestcraft") && IguanaConfig.addSaplingTradesFarm
69
69
70
70
public static void modifyStackSize (Item item , ItemStack stack , FoodValues values )
71
71
{
72
+ int curStackSize = item .getItemStackLimit (stack );
73
+ int newStackSize = curStackSize ;
74
+
72
75
if (values .hunger <= 2 )
73
- item . setMaxStackSize ( 16 * IguanaConfig .foodStackSizeMultiplier ) ;
76
+ newStackSize = 16 * IguanaConfig .foodStackSizeMultiplier ;
74
77
else if (values .hunger <= 5 )
75
- item . setMaxStackSize ( 8 * IguanaConfig .foodStackSizeMultiplier ) ;
78
+ newStackSize = 8 * IguanaConfig .foodStackSizeMultiplier ;
76
79
else if (values .hunger <= 8 )
77
- item . setMaxStackSize ( 4 * IguanaConfig .foodStackSizeMultiplier ) ;
80
+ newStackSize = 4 * IguanaConfig .foodStackSizeMultiplier ;
78
81
else if (values .hunger <= 11 )
79
- item . setMaxStackSize ( 2 * IguanaConfig .foodStackSizeMultiplier ) ;
82
+ newStackSize = 2 * IguanaConfig .foodStackSizeMultiplier ;
80
83
else
81
- item .setMaxStackSize (IguanaConfig .foodStackSizeMultiplier );
84
+ newStackSize = IguanaConfig .foodStackSizeMultiplier ;
85
+
86
+ if (curStackSize > newStackSize )
87
+ item .setMaxStackSize (newStackSize );
82
88
}
83
89
84
90
public static void addButcherTrade (Item item , ItemStack stack , FoodValues values )
You can’t perform that action at this time.
0 commit comments