-
-
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
Omar Rahman
authored and
Omar Rahman
committed
Sep 7, 2024
1 parent
2e2ad56
commit 858f2fb
Showing
6 changed files
with
35 additions
and
5 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
3 changes: 2 additions & 1 deletion
3
src/generated/resources/assets/advancedgrindstone/lang/en_us.json
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"block.advancedgrindstone.advanced_grindstone": "Advanced Grindstone", | ||
"container.advancedgrindstone.advanced_grindstone_title": "Advanced Grindstone" | ||
"container.advancedgrindstone.advanced_grindstone_title": "Advanced Grindstone", | ||
"itemgroup.advancedgrindstone.advanced_grindstone_tab": "Ramen's Additions" | ||
} |
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
28 changes: 28 additions & 0 deletions
28
src/main/java/net/ramen5914/advancedgrindstone/ModCreativeModeTabs.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,28 @@ | ||
package net.ramen5914.advancedgrindstone; | ||
|
||
import net.minecraft.core.registries.Registries; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.world.item.CreativeModeTab; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.neoforged.bus.api.IEventBus; | ||
import net.neoforged.neoforge.registries.DeferredRegister; | ||
import net.ramen5914.advancedgrindstone.block.ModBlocks; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public class ModCreativeModeTabs { | ||
public static DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = | ||
DeferredRegister.create(Registries.CREATIVE_MODE_TAB, AdvancedGrindstone.MOD_ID); | ||
|
||
public static final Supplier<CreativeModeTab> ADVANCED_GRINDSTONE_TAB = | ||
CREATIVE_MODE_TABS.register("advanced_grindstone_tab", () -> CreativeModeTab.builder() | ||
.title(Component.translatable(String.format("itemgroup.%s.advanced_grindstone_tab", AdvancedGrindstone.MOD_ID))) | ||
.icon(() -> new ItemStack(ModBlocks.ADVANCED_GRINDSTONE.get())) | ||
.displayItems((parameters, output) -> { | ||
output.accept(ModBlocks.ADVANCED_GRINDSTONE); | ||
}).build()); | ||
|
||
public static void register(IEventBus eventBus) { | ||
CREATIVE_MODE_TABS.register(eventBus); | ||
} | ||
} |
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