Project now supports 1.19.2
This commit is contained in:
parent
63b62f5305
commit
cc5f40a9e7
12 changed files with 62 additions and 74 deletions
|
|
@ -1,40 +1,26 @@
|
|||
package com.therealm18studios.lc.common.item;
|
||||
|
||||
import com.therealm18studios.lc.LibreComponents;
|
||||
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.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
public final class ItemGroup {
|
||||
public static final DeferredRegister<CreativeModeTab> TAB_REGISTER = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, LibreComponents.MOD_ID);
|
||||
public static final CreativeModeTab COMMON = new CreativeModeTab(LibreComponents.MOD_ID + ".common")
|
||||
{
|
||||
@Override
|
||||
public ItemStack makeIcon() {
|
||||
return new ItemStack(Items.HARD_DRIVE_EXTRA_LARGE.get());
|
||||
}
|
||||
};
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public static final RegistryObject<CreativeModeTab> COMMON_TAB = TAB_REGISTER.register("common", () -> CreativeModeTab.builder()
|
||||
// Set name of tab to display
|
||||
.title(Component.translatable("item_group." + LibreComponents.MOD_ID + ".common"))
|
||||
// Set icon of creative tab
|
||||
.icon(() -> new ItemStack(Items.HARD_DRIVE_EXTRA_LARGE.get()))
|
||||
// Add default items to tab
|
||||
.displayItems((params, output) -> {
|
||||
// Items
|
||||
output.accept(Items.MEMORY_SMALL.get());
|
||||
output.accept(Items.MEMORY_MEDIUM.get());
|
||||
output.accept(Items.MEMORY_LARGE.get());
|
||||
output.accept(Items.MEMORY_EXTRA_LARGE.get());
|
||||
output.accept(Items.HARD_DRIVE_SMALL.get());
|
||||
output.accept(Items.HARD_DRIVE_MEDIUM.get());
|
||||
output.accept(Items.HARD_DRIVE_LARGE.get());
|
||||
output.accept(Items.HARD_DRIVE_EXTRA_LARGE.get());
|
||||
output.accept(Items.CPU_TIER_1.get());
|
||||
output.accept(Items.CPU_TIER_2.get());
|
||||
output.accept(Items.CPU_TIER_3.get());
|
||||
output.accept(Items.CPU_TIER_4.get());
|
||||
output.accept(Items.FLOPPY.get());
|
||||
output.accept(Items.FLOPPY_MODERN.get());
|
||||
})
|
||||
.build()
|
||||
);
|
||||
// public ItemGroup getInstance(ItemGroup){
|
||||
// ItemGroup.TAB_REGISTER.getDisplayName().contains(
|
||||
// Items.MEMORY_SMALL.get(), Items.MEMORY_MEDIUM.get(), Items.MEMORY_LARGE.get(), Items.MEMORY_EXTRA_LARGE.get(),
|
||||
// Items.HARD_DRIVE_SMALL.get(), Items.HARD_DRIVE_MEDIUM.get(), Items.HARD_DRIVE_LARGE.get(), Items.HARD_DRIVE_EXTRA_LARGE.get(),
|
||||
// Items.FLOPPY.get(), Items.FLOPPY_MODERN.get())
|
||||
// output.accept(Items.CPU_TIER_1.get());
|
||||
// output.accept(Items.CPU_TIER_2.get());
|
||||
// output.accept(Items.CPU_TIER_3.get());
|
||||
// output.accept(Items.CPU_TIER_4.get()););
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue