Jump to content

Recommended Posts

Posted

I've just started modding, and I'm trying to make custom swords. When I try to import SwordItem, I get the error: 

  Quote

The import net.minecraft.world.item.SwordItem cannot be resolvedJava(268435846)

Expand  

What confuses me is that other item classes work fine:

package io.github.xxx.denseswords.item;

import io.github.xxx.denseswords.DenseSwords;
import net.minecraft.world.item.Item; // works fine
import net.minecraft.world.item.ShovelItem; // works fine
import net.minecraft.world.item.SwordItem; // Error: The import cannot be resolved
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.registries.RegistryObject;

Forge MDK v55.0.15 - Minecraft 1.21.5

Java v24.0.1

Windows 11

IDE: Visual Studio Code

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.