Jump to content

Register method not applicable (1.16.5)


djofox

Recommended Posts

I keep on getting this error when trying to register tools "The method register(String, Supplier<? extends I>) in the type DeferredRegister<Item> is not applicable for the arguments (String, CustomPickaxeItem)"

I cant find a fix without my game crashing, is there another way I should be trying to register tools/armour?

	//Armor & Tools
	public static final RegistryObject<Item> PICKAXERUBY = ITEMS.register("beryl_pickaxe", new CustomPickaxeItem(ToolMaterialList.berylT, -1, 0.6F, new Item.Properties().tab(Main.GEMSTONES_GROUP)));

And here's my deferred registry code

	public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, Main.MODID);

Heres my custom pickaxe code

package djofox.gemstones.items;

import net.minecraft.item.IItemTier;
import net.minecraft.item.PickaxeItem;

public class CustomPickaxeItem extends PickaxeItem {

	
	
	public CustomPickaxeItem(IItemTier tier, int attackDamageIn, float attackSpeedIn, Properties builder) {
		super(tier, attackDamageIn, attackSpeedIn, builder);

	}
}

 

Link to comment
Share on other sites

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.