I try to add multiple Itemgroups to my mod but I can't give every Itemgroup an individual item as icon.
Is it possible, to give every Itemgroup an individual icon?
This is the code I currently have
I tried different variations of this code so this is just an example
public class CustomItemGroups extends ItemGroup {
public static final CustomItemGroups UNO = new CustomItemGroups(ItemGroup.GROUPS.length,"uno");
/* public static final CustomItemGroups DOS = new CustomItemGroups(ItemGroup.GROUPS.length,"dos"); */ with this extra line i could get another itemgroup
public CustomItemGroups(int index, String label) {super(index, label);}
@Override
public ItemStack createIcon() {return new ItemStack(Uno.CRYSTAL.get()); if I double and change this line it always says, that it is already have been defined
};
}
I use IntelliJ IDEA to make the mod with these versions Forge 36.2.35, Minecraft 1.16.5, SDK Amazon Corretto version 1.8.0_332, snapshot_20210309
Hi.
I try to add multiple Itemgroups to my mod but I can't give every Itemgroup an individual item as icon.
Is it possible, to give every Itemgroup an individual icon?
This is the code I currently have
I tried different variations of this code so this is just an example
public class CustomItemGroups extends ItemGroup {
public static final CustomItemGroups UNO = new CustomItemGroups(ItemGroup.GROUPS.length,"uno");
/* public static final CustomItemGroups DOS = new CustomItemGroups(ItemGroup.GROUPS.length,"dos"); */ with this extra line i could get another itemgroup
public CustomItemGroups(int index, String label) {super(index, label);}
@Override
public ItemStack createIcon() {return new ItemStack(Uno.CRYSTAL.get()); if I double and change this line it always says, that it is already have been defined
};
}
I use IntelliJ IDEA to make the mod with these versions Forge 36.2.35, Minecraft 1.16.5, SDK Amazon Corretto version 1.8.0_332, snapshot_20210309