Skip to content

SwordItem class not found? #325

@youkononame

Description

@youkononame

I was reading the guide for creating custom tools (https://docs.fabricmc.net/develop/items/custom-tools) and I noticed the use of the "SwordItem" class. IntelliJ could not automatically find a package to import it from and it didn't seem to appear in anywhere. I know this is written for 1.21.4 and I was on 1.21.5 but I can't imagine any drastic changes being made between those two versions.

Any way of fixing this? The ToolMaterial for Stone being passed to .applySwordSettings with 1f attackDamage and attackSpeed gave me the attack speed and damage of a pickaxe, and I couldn't find any alternatives. Help would be appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    correctionSomething isn't right on a pagenew-versionRelated to a newer version of Minecraftpriority:highThis should be addressed before anything else

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions