Jump to content

Recommended Posts

Posted (edited)

I'm trying to override existing armor using the following:

public static final RegistryObject<Item> LEATHER_HELMET = ITEMS.register("minecraft:leather_helmet", () -> new ModArmor(ArmorMaterials.LEATHER, EquipmentSlot.HEAD, (new Item.Properties()).tab(CreativeModeTab.TAB_COMBAT)));

This causes the game client to crash, and the only other examples of alias usage I can find are from 1.16 or earlier.

What's the correct implementation for 1.18?

Edited by CrackedScreen
Marking thread as solved.
Posted

ResourceLocationException: net.minecraft.ResourceLocationException: Non [a-z0-9/._-] character in path of location

  Reveal hidden contents

I'll need the correct syntax for alias usage since registering the item as minecraft:leather_helmet is causing this.

Posted

Does this mean I need to use a different method of registering, or that the full resource location of vanilla leather armor needs to be provided? I have tried setting the name to item.minecraft.leather_helmet, but this still generates a separate item. Using setRegistryname will cause a different crash as well.

Posted

What part of my code would I need to change in my original post in order for this to work? An example would help here, and if I need the full path of blocks/items to override then where can I find this?

  • CrackedScreen changed the title to [1.18.2] [SOLVED] Override basegame/vanilla items

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.