-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'midnightlib' into midnightlib-trigam
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package dev.symphony.harmony.food; | ||
|
||
import dev.symphony.harmony.config.HarmonyConfig; | ||
import net.fabricmc.fabric.api.item.v1.DefaultItemComponentEvents; | ||
import net.minecraft.component.DataComponentTypes; | ||
import net.minecraft.item.Items; | ||
|
||
public class StewStack { | ||
|
||
// Would be nice if this was applied to all items with a specific custom item tag to facilitate mod compat. | ||
public static void StewStackMethod(){ | ||
if(HarmonyConfig.StewStackBool){ | ||
|
||
DefaultItemComponentEvents.MODIFY.register(context -> { | ||
context.modify(Items.MUSHROOM_STEW, builder -> { | ||
builder.add(DataComponentTypes.MAX_STACK_SIZE, HarmonyConfig.StewStackSize); | ||
}); | ||
}); | ||
|
||
DefaultItemComponentEvents.MODIFY.register(context -> { | ||
context.modify(Items.BEETROOT_SOUP, builder -> { | ||
builder.add(DataComponentTypes.MAX_STACK_SIZE, HarmonyConfig.StewStackSize); | ||
}); | ||
}); | ||
|
||
DefaultItemComponentEvents.MODIFY.register(context -> { | ||
context.modify(Items.RABBIT_STEW, builder -> { | ||
builder.add(DataComponentTypes.MAX_STACK_SIZE, HarmonyConfig.StewStackSize); | ||
}); | ||
}); | ||
|
||
DefaultItemComponentEvents.MODIFY.register(context -> { | ||
context.modify(Items.SUSPICIOUS_STEW, builder -> { | ||
builder.add(DataComponentTypes.MAX_STACK_SIZE, HarmonyConfig.StewStackSize); | ||
}); | ||
}); | ||
} | ||
} | ||
} |