Skip to content

Commit

Permalink
Added creative mode tab
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterJulsen committed Feb 27, 2024
1 parent 947cec4 commit f6fa80a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/de/mrjulsen/crn/item/NavigatorItem.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package de.mrjulsen.crn.item;

import com.simibubi.create.AllCreativeModeTabs;

import de.mrjulsen.crn.client.ClientWrapper;
import de.mrjulsen.crn.client.ModCreativeModeTab;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.entity.player.Player;
Expand All @@ -13,7 +12,7 @@
public class NavigatorItem extends Item {

public NavigatorItem() {
super(new Properties().tab(AllCreativeModeTabs.BASE_CREATIVE_TAB).stacksTo(1));
super(new Properties().tab(ModCreativeModeTab.MOD_TAB).stacksTo(1));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package de.mrjulsen.crn.item.creativemodetab;

import de.mrjulsen.crn.item.ModItems;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;

public class ModCreativeModeTab {

public static final CreativeModeTab MOD_TAB = new CreativeModeTab("createrailwaysnavigatortab") {
@Override
public ItemStack makeIcon() {
return new ItemStack(ModItems.NAVIGATOR.get());
};
};

}

0 comments on commit f6fa80a

Please sign in to comment.