diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2024-08-29 20:16:09 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2024-08-29 20:16:09 +0100 |
commit | a243923a3f4c9a6ff2b87a04c14b3e305866521d (patch) | |
tree | 4092183ff71f76e20bfcc0d87c2282e0a0ee1866 /src/main/java/ski/kramkow/mcmod/eyeofnether/EyeOfNether.java | |
parent | 9a90ba748f11fc06662ceeb83c6a8e3efcae668e (diff) | |
download | eye-of-nether-a243923a3f4c9a6ff2b87a04c14b3e305866521d.tar.gz eye-of-nether-a243923a3f4c9a6ff2b87a04c14b3e305866521d.tar.xz eye-of-nether-a243923a3f4c9a6ff2b87a04c14b3e305866521d.zip |
Version 1.20.1+0
Diffstat (limited to 'src/main/java/ski/kramkow/mcmod/eyeofnether/EyeOfNether.java')
-rw-r--r-- | src/main/java/ski/kramkow/mcmod/eyeofnether/EyeOfNether.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main/java/ski/kramkow/mcmod/eyeofnether/EyeOfNether.java b/src/main/java/ski/kramkow/mcmod/eyeofnether/EyeOfNether.java new file mode 100644 index 0000000..efc5b89 --- /dev/null +++ b/src/main/java/ski/kramkow/mcmod/eyeofnether/EyeOfNether.java @@ -0,0 +1,32 @@ +package ski.kramkow.mcmod.eyeofnether; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import net.fabricmc.api.ModInitializer; +import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroups; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.util.Identifier; + +public class EyeOfNether implements ModInitializer { + public static final String MOD_ID = "eye_of_nether"; + + public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID); + + public static final Item EYE_OF_NETHER = Registry.register( + Registries.ITEM, + Identifier.of(EyeOfNether.MOD_ID, "eye_of_nether"), + new EyeOfNetherItem(new Item.Settings())); + + @Override + public void onInitialize() { + LOGGER.info("Initializing"); + ItemGroupEvents.modifyEntriesEvent(ItemGroups.FUNCTIONAL) + .register((group) -> group.add(EyeOfNether.EYE_OF_NETHER)); + ItemGroupEvents.modifyEntriesEvent(ItemGroups.TOOLS) + .register((group) -> group.add(EyeOfNether.EYE_OF_NETHER)); + } +} |