Fabric Shield Lib

Fabric Shield Lib

3M Downloads

error: cannot access class_1792(1.4.5-1.18)

Inpaladin opened this issue ยท 11 comments

commented

Working on porting my mod to 1.18, got fabric shield lib(seemingly) working and it's now giving me these errors when I try to build. Every other FabricShieldItem also appears to be giving me the same errors.

E:\ModDev\Minecraft\Mods\WarhammerFantasyWeaponsGit\src\main\java\com\inpaladin\warhammerfantasyweapons\registry\ModItems.java:19: error: cannot access class_1792
    public static final Item SWORD_BREAKER_WOOD = new FabricShieldItem(new Item.Settings().maxDamage(36).group(ItemGroup.COMBAT), 10, 0, ItemTags.PLANKS);
                                                  ^
  class file for net.minecraft.class_1792 not found
commented

okay, I am becoming less and less sure this is an issue with this mod, I'll reopen it if I can confirm it's not something bizarre on my end.

commented

okay, I'm like 90% sure this is an issue with this mod and not my client.

commented

try replacing
public static final Item SWORD_BREAKER_WOOD
with

public static final FabricShieldItem SWORD_BREAKER_WOOD

commented

that does not appear to have done anything.

commented

This is a really strange issue because class_1792 is the net.minecraft.item.Item class.

commented

yeah that is extremely bizarre. It might be something with my IDE, I could send you the repo if you want?

commented

sure

commented

Sorry I never got around to looking at that branch but is this issue still persisting?

commented

I looked at this more & it seemed to be an issue with the mod being based on an old copy of the fabric example mod. After modernizing Gradle and switching to the latest version of loom, fabric, & yarn it seemed to work.

commented

Also, you were implementing the mod incorrectly. You had it under implementation not modImplementation.