Skip to content

Commit

Permalink
additional creative tab constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
EternalBlueFlame committed Sep 26, 2024
1 parent b4d428a commit 45d696f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/train/common/core/CreativeTabTraincraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import train.common.library.ItemIDs;
import train.common.library.TraincraftRegistry;

import java.util.List;
Expand All @@ -27,6 +26,11 @@ public CreativeTabTraincraft(String name, String MODID, String textureName) {
tabItem= TraincraftRegistry.RegisterItem(new Item(),MODID,textureName,null);
}

public CreativeTabTraincraft(String name, Item itm) {
super(CreativeTabs.getNextID(), name);
tabItem= itm;
}

@Override
public ItemStack getIconItemStack() {
return new ItemStack(tabItem);
Expand Down

0 comments on commit 45d696f

Please sign in to comment.