Posted September 6, 20214 yr I'm trying to register a new item, however compilation tells me that the Symbol ItemGroup.TAB_MISC cannot be found. I am using the latest MDK (36.2.4) for Minecraft 1.16.5 and I have it setup in VSCode public static final RegistryObject<Item> BandageItem = ITEMS.register("bandage", () -> new Item( new Item.Properties().tab( ItemGroup.TAB_MISC ) ) ); Hard_Knock_Life\src\main\java\com\rad_poseidon\hardknocklife\item\ModItems.java:16: error: cannot find symbol new Item.Properties().tab( ItemGroup.TAB_FOOD ) ^ symbol: variable TAB_FOOD location: class net.minecraft.item.ItemGroup 1 error I've considered changing to a Java Dedicated IDE, but it should still work with VSCode, which is what I would prefer to keep using. I have imported net.minecraft.item.ItemGroup as well. Peeking the definition of TAB_MISC shows it fine Edited September 6, 20214 yr by Rad Poseidon Mentioned Minecraft Version
September 6, 20214 yr look into the ItemGroup class, check if the variable TAB_MISC exists, if not look what's the new name for it (iirc it's MISC)
September 6, 20214 yr Author I used VSCode's peek definition feature. I can see ItemGroup.class and TAB_MISC exists as TAB_MISC
September 6, 20214 yr Author Just as I was booting up VS Code to double check, VSCode stopped saying TAB_MISC and just said MISC. I'm not sure why it is just now doing it though because I reloaded VSCode several times and even rebuild the project from scratch. Sorry for the trouble, I guess it had something to do with my mappings setting.
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.