I’m trying to create an item in minecraft, using intellij and it says that the identifier is abstract, check the code below
(File: Polonium.java)
package me.DMEGA1O5.polonium;
import net.fabricmc.api.ModInitializer;
import net.minecraft.item.Item;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import org.intellij.lang.annotations.Identifier;
public class Polonium implements ModInitializer {
public static final Item STICKPOOP = new Item(new Item.Settings());
@Override
public void onInitialize() {
Registry.register(Registries.ITEM, new Identifier("polonium", "STICKPOOP"), STICKPOOP);
}
}
I’ve already tried lowercasing the Identifier, and i couldn’t really think of anything else, btw im new to java
New contributor
DMEGA1O5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.