There is an false error output on @Override. How do I fix it?

72 Views Asked by At

So yeah, I have an issue where I can't test my Minecraft mod, and it does not explain what's the cause. I've done it correctly, yet I can't get over this error. Its a toilet mod. IDE I use is IntelliJ. It's also on fabric, if you are a forge modder. There's no further explanation.

The error

This is the output I get. The output just shows me the error, and I've tried the suggestions, but it seems to worsen

@Override
    public void onInitialize() {

        Registry.register(Registry.BLOCK, new Identifier("toilet", "ceramic_toilet"), CERAMIC_TOILET);
        Registry.register(new Identifier("toilet", "ceramic_toilet"), new BlockItem(CERAMIC_TOILET, new Item.Settings().group((ItemGroup.MISC)));

    }
}
1

There are 1 best solutions below

0
Max Rune On

Given the information you provide, as Joseph Sible-Reinstate Monica suggests: it's a syntax error. The @Override annotation should not have a semicolon after it.

Also your second register method is missing a closing bracket, add another one like so:

Registry.register(new Identifier("toilet", "ceramic_toilet"), new BlockItem(CERAMIC_TOILET, new Item.Settings().group((ItemGroup.MISC))));