Jump to content

Recommended Posts

Posted

So i just started making a mimecraft mod, and i've run into this problem while trying to make an item, Item.Properties().tab is missing.
All the other properties are there except for .tab.   ".tab" and "TAB_MISC" are marked as errors.

 

public static final RegistryObject<Item> ASTRUM = ITEMS.register("astrum",
            () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC)));


 This is the whole Item script
 

package net.davax.testmod.item;

import com.google.common.util.concurrent.ClosingFuture;
import net.davax.testmod.TestMod;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.Item;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.RegistryObject;
import org.apache.commons.io.output.DeferredFileOutputStream;

public class ModItems {
    public static final DeferredRegister<Item> ITEMS =
            DeferredRegister.create(ForgeRegistries.ITEMS, TestMod.MOD_ID);

    public static final RegistryObject<Item> ASTRUM = ITEMS.register("astrum",
            () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC)));

    public static void register(IEventBus eventBus) {
        ITEMS.register(eventBus);
    }
}


I dont know what im missing or i've missed. Hope you can help me

Posted

This happens after i try running the client

 

Test_Mod-1.19.4\src\main\java\net\davax\testmod\item\ModItems.java:18: error: cannot find symbol
            () -> new Item(new Item.Properties().tab(CreativeModeTab.TAB_MISC)));
                                                                    ^
  symbol:   variable TAB_MISC
  location: class CreativeModeTab

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.