-
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.
Refactored and rewrote StewStack, now it's toggable
-It is no longer a mixin (though uses mixins under the hood i think but still) (also now it has better mod compat out of the box bc of the use of DefaultItemComponentEvents instead of the previous method w Mixins) -Now StewStackBool finally works as intented
- Loading branch information
flatkat
committed
Sep 21, 2024
1 parent
53dd3bc
commit 8358546
Showing
4 changed files
with
42 additions
and
63 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); | ||
}); | ||
}); | ||
} | ||
} | ||
} |
62 changes: 0 additions & 62 deletions
62
src/main/java/dev/symphony/harmony/mixin/food/StewStack.java
This file was deleted.
Oops, something went wrong.
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