blob: fa43d6180ac2ff1e2e487c33100b9a7d587421ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright (C) 2024 Tomasz Kramkowski <tomasz@kramkow.ski>
// SPDX-License-Identifier: LGPL-3.0-or-later
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));
}
}
|