Skip to content

Commit c476381

Browse files
committed
feat: change creative tab icon
1 parent 14a03db commit c476381

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

src/datagen/java/com/github/elenterius/biomancy/datagen/models/ModItemModelProvider.java

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ private static ResourceLocation registryKey(Item item) {
3636

3737
@Override
3838
protected void registerModels() {
39+
basicItem(ModItems.TAB_ICON);
40+
3941
lootItem(ModItems.MOB_FANG);
4042
lootItem(ModItems.MOB_CLAW);
4143
lootItem(ModItems.MOB_SINEW);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"parent": "minecraft:item/generated",
3+
"textures": {
4+
"layer0": "biomancy:item/tab_icon"
5+
}
6+
}

src/main/java/com/github/elenterius/biomancy/BiomancyMod.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,10 @@ public static String createRLString(String path) {
8282
public static final DeferredRegister<CreativeModeTab> CREATIVE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, BiomancyMod.MOD_ID);
8383
public static final RegistryObject<CreativeModeTab> CREATIVE_TAB = CREATIVE_TABS.register("example", () -> CreativeModeTab.builder()
8484
.title(ComponentUtil.translatable("item_group." + MOD_ID))
85-
.icon(() -> new ItemStack(ModItems.LIVING_FLESH.get()))
85+
.icon(() -> new ItemStack(ModItems.TAB_ICON.get()))
8686
.displayItems((params, output) -> {
8787
Set<RegistryObject<? extends Item>> hiddenItems = Set.of(
88+
ModItems.TAB_ICON,
8889
ModItems.ESSENCE,
8990
ModItems.GUIDE_BOOK,
9091
ModItems.DEV_ARM_CANNON

src/main/java/com/github/elenterius/biomancy/init/ModItems.java

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ public final class ModItems {
123123
public static final RegistryObject<MaykerBannerPatternItem> MASCOT_BANNER_PATTERNS = registerItem("mascot_patterns", props -> new MaykerBannerPatternItem(ModBannerPatterns.TAG_MASCOT, props));
124124

125125
//## Dev
126+
public static final RegistryObject<SimpleItem> TAB_ICON = registerSimpleItem("tab_icon");
126127
public static final RegistryObject<DevArmCannonItem> DEV_ARM_CANNON = registerItem("dev_arm_cannon", props -> new DevArmCannonItem(props.stacksTo(1).durability(ModTiers.BIOFLESH.getUses()).rarity(ModRarities.ULTRA_RARE)));
127128

128129
//# Block Items
Loading

0 commit comments

Comments
 (0)