-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95d3d9b
commit d5cbcfa
Showing
4 changed files
with
45 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
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
39 changes: 39 additions & 0 deletions
39
src/main/java/top/offsetmonkey538/compactmobfarms/item/group/ModItemGroups.java
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 top.offsetmonkey538.compactmobfarms.item.group; | ||
|
||
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; | ||
import net.minecraft.item.ItemGroup; | ||
import net.minecraft.registry.Registries; | ||
import net.minecraft.registry.Registry; | ||
import net.minecraft.text.Text; | ||
import top.offsetmonkey538.compactmobfarms.item.ModItems; | ||
|
||
import static top.offsetmonkey538.compactmobfarms.CompactMobFarms.*; | ||
|
||
public final class ModItemGroups { | ||
private ModItemGroups() { | ||
|
||
} | ||
|
||
public static final ItemGroup COMPACT_MOB_FARMS_ITEM_GROUP = register("compact_mob_farms_item_group", | ||
FabricItemGroup.builder() | ||
.icon(ModItems.SPAWNER_SHARD::getDefaultStack) | ||
.displayName(Text.translatable("itemGroup.compact_mob_farms.main_group")) | ||
.entries((displayContext, entries) -> { | ||
entries.add(ModItems.SPIRIT_BOTTLE); | ||
entries.add(ModItems.SPAWNER_SHARD); | ||
entries.add(ModItems.COMPACT_MOB_FARM); | ||
entries.add(ModItems.SAMPLE_TAKER); | ||
}) | ||
.build() | ||
); | ||
|
||
|
||
private static <T extends ItemGroup> T register(String name, T group) { | ||
return Registry.register(Registries.ITEM_GROUP, id(name), group); | ||
} | ||
|
||
@SuppressWarnings("EmptyMethod") | ||
public static void register() { | ||
// Registers item groups by loading the class. | ||
} | ||
} |