Jump to content

LixNew

Members
  • Posts

    1
  • Joined

  • Last visited

LixNew's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello, I am creating a mod in 1.20 There are some methods I don't have such as the tab method. When I create my item and in the properties I try to call the tab method, the IDE doesn't propose it and if I force it, it doesn't exist. However, I installed the forge MDK for Minecraft version 1.20. It also did it for me on earlier versions, I didn't have the SetRequiresTools method and so on. I don't understand why it's doing this to me. I've made my code available to you. I'd like to have a way to put my items in Itemgroup and above all to understand why I can't access certain functions like tab. Thank you for your answers in advance ^^. Click to open Screenshoot ModItems : package fr.lixnew.noidea.init; import fr.lixnew.noidea.NoIdea; import net.minecraft.world.item.Item; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; public class ModItems { public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, NoIdea.MODID); public static final RegistryObject<Item> ENERGIZER_CRYSTAL = ITEMS.register("energizer_crystal", () -> new Item(new Item.Properties())); } NoIdea (Main) : package fr.lixnew.noidea; import fr.lixnew.noidea.init.ModItems; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; @Mod(NoIdea.MODID) public class NoIdea { public static final String MODID = "noidea"; public NoIdea() { var modBus = FMLJavaModLoadingContext.get().getModEventBus(); ModItems.ITEMS.register(modBus); } }
×
×
  • Create New...

Important Information

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