I cannot for the love of me figure out how the new objectregister system works. Been scratching my head at this for a week.
The above error hi-lites:
JemPickaxe::new
in the 3rd method.
public class JemPickaxes {
public static final JemRegistry<Item> PICKAXE = new JemRegistry<>(ForgeRegistries.ITEMS, JemCore.MOD_ID);
public static void init()
{
PICKAXE.register(FMLJavaModLoadingContext.get().getModEventBus());
}
public static RegistryObject<Item> OBSIDIAN = PICKAXE.register("obsidian_pickaxe", JemPickaxe::new);;
/**public static <OBSIDIAN extends PickaxeItem> OBSIDIAN PickaxeProperties(String item, IItemTier tier, int damage, float speed, Properties properties)
*{
* PickaxeProperties("obsidian_pickaxe", ItemTier.NETHERITE, 1, -2.8F, new Item.Properties().group(JemPickaxe.TOOLS));
*
* return JemPickaxes.OBSIDIAN = PickaxeProperties("obsidian_pickaxe", ItemTier.NETHERITE, 1, -2.8F, properties);
*}
*
*public static RegistryObject<Item> TEST()
*{
* return PICKAXE.register("test_pickaxe", JemPickaxe::new);
*}
*/
}
This is what my JemPickaxe class looks like:
public class JemPickaxe extends PickaxeItem {
public static final ItemGroup TOOLS = new ItemGroup("tools") {
@Override
public ItemStack createIcon() {
return new ItemStack(JemPickaxes.OBSIDIAN.get());
}
};
public JemPickaxe(IItemTier tier, int attackDamage, float attackSpeedIn) {
super(tier, attackDamage, attackSpeedIn, new Item.Properties().group(TOOLS));
//JemPickaxe.PickaxeProperties(tier, attackDamage, attackSpeedIn, new Item.Properties().group(TOOLS));
}
/**public static void PickaxeProperties(String string, ItemTier netherite, int i, float f, Properties group) {
*
*}
*
*
* public static void OBSIDIAN(IItemTier tier, int attackDamage, float attackSpeedIn) {
* super(ItemTier.NETHERITE, 1, -2.8F, new Item.Properties().group(TOOLS));
* JemPickaxe.PickaxeProperties(ItemTier.NETHERITE, 1, -2.8F, new Item.Properties().group(TOOLS));
* }
*/
}
The error only resolves when I remove the parameters from
public JemPickaxe(...)
so that the brackets are empty and when I change the extend from "Pickaxeitem" to just "Item".
Am I completely wrong about how I'm going about this or am I just adding the parameters incorrectly to the new object (Obsidian pickaxe) itself?