diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2022-08-17 21:21:26 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2022-08-17 21:24:57 -0300 |
commit | 2d0b363fe3179087de59d9ef4a2d14af21d89071 (patch) | |
tree | befdb1f281c3abd82c23d9f6855a3237170e47a5 /src/main/java/ganarchy/chewstuff/ChewStuff.java | |
parent | 731e568ad487b8f7dfbedf22eaca9b12cb3e754d (diff) |
[Project] ChewStuff
Chew Necklaces for Minecraft!
Diffstat (limited to 'src/main/java/ganarchy/chewstuff/ChewStuff.java')
-rw-r--r-- | src/main/java/ganarchy/chewstuff/ChewStuff.java | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/src/main/java/ganarchy/chewstuff/ChewStuff.java b/src/main/java/ganarchy/chewstuff/ChewStuff.java new file mode 100644 index 0000000..7bea0ec --- /dev/null +++ b/src/main/java/ganarchy/chewstuff/ChewStuff.java @@ -0,0 +1,90 @@ +package ganarchy.chewstuff; + +import net.fabricmc.api.ModInitializer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroup; +import net.minecraft.util.Identifier; +import net.minecraft.util.registry.Registry; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * The mod's entry point. + */ +public class ChewStuff implements ModInitializer { + /** + * The ChewStuff Logger. + */ + public static final Logger LOGGER = LoggerFactory.getLogger("chewstuff"); + + /** + * Silicone. Not to be confused with silicon. Crafting material for + * chews. + */ + public static final Item SILICONE = new Item( + new Item.Settings().group(ItemGroup.MISC) + ); + /** + * 1 day, in ticks. + */ + public static final int DAY_MULTIPLIER = 24 * 60 * 60 * 20; + /** + * Soft chew. Lasts 5 days, 1 effect slot. + */ + public static final Item SOFT_CHEW = new ChewableItem( + 1, + new Item.Settings().maxDamage(5 * DAY_MULTIPLIER).group(ItemGroup.TOOLS) + ); + /** + * Medium chew. Lasts 6 days, 2 effect slots. + */ + public static final Item MEDIUM_CHEW = new ChewableItem( + 2, + new Item.Settings().maxDamage(6 * DAY_MULTIPLIER).group(ItemGroup.TOOLS) + ); + /** + * Hard chew. Lasts 7 days, 3 effect slots. + */ + public static final Item HARD_CHEW = new ChewableItem( + 3, + new Item.Settings().maxDamage(7 * DAY_MULTIPLIER).group(ItemGroup.TOOLS) + ); + /** + * The stat for chew effects. + */ + public static final Identifier CHEW_EFFECTS = new Identifier( + "chewstuff", "effects" + ); + + @Override + public void onInitialize() { + // This code runs as soon as Minecraft is in a mod-load-ready state. + // However, some things (like resources) may still be uninitialized. + // Proceed with mild caution. + + LOGGER.info("This software is made with love by a queer trans person."); + + Registry.register( + Registry.ITEM, + new Identifier("chewstuff", "silicone"), + SILICONE + ); + Registry.register( + Registry.ITEM, + new Identifier("chewstuff", "soft_chew"), + SOFT_CHEW + ); + Registry.register( + Registry.ITEM, + new Identifier("chewstuff", "medium_chew"), + MEDIUM_CHEW + ); + Registry.register( + Registry.ITEM, + new Identifier("chewstuff", "hard_chew"), + HARD_CHEW + ); +// Registry.register(Registry.CUSTOM_STAT, CHEW_EFFECTS, CHEW_EFFECTS); +// Stats.CUSTOM.getOrCreateStat(CHEW_EFFECTS, StatFormatter.DEFAULT); + } +} |