Jump to content

Recommended Posts

Posted (edited)

Figured it out, nothing was wrong with the code, the file that contains the bus registry needed to have the same name as the directory it was in. Whoops.

================================================

Hey there!

I'm trying to create a simple mod for 1.20.1 that adds a few custom banner patterns that don't require any banner pattern items. To be completely honest, this is my first time modding for Minecraft, so after setting up the project in Intellij, I copied the parts of the source code from this mod on CurseForge that dealt with adding and registering banner patterns, including the asset_id and translation_key registry .json files.

From what I understand, to add a banner pattern that doesn't require a banner pattern item, I only needed to create the registries for each pattern like in here and then register it in the main java class like here on Line 54. Additionally, in the lang/en_us.json file, add in the names for each respective banner color, and in the data/minecraft/tags/banner_pattern/no_items_required.json file, add each banner pattern that does not require a banner pattern item to make a banner.

The project is able to compile when loading in Forge which makes me assume that the file structure I have is correct, and checking the docs, I believe I did everything correctly. However, on loading a Minecraft world, this error appears in console and the loom is subsequently blank.

[Worker-Main-1/ERROR] [minecraft/TagLoader]: Couldn't load tag minecraft:no_item_required as it is missing following references: *lists every added entry in no_item_required.json*

The message clearly states something went wrong regarding when trying to load in the registries from the mod, but I have no clue what could be wrong with the code I have. Attached below are screenshots of what I currently have.

spacer.png

Java Main Class

spacer.png

Banner Registry Class

spacer.png


spacer.png

File Structure

spacer.png

Error in Console upon loading a Minecraft world

spacer.png

What the loom shows without minecraft:no_item_required 

 

The original mod I copied still functions completely, so if anyone can figure out why the registries for the mod I'm making isn't working, that would be greatly appreciated!


 

 

Edited by General_Gunner
Solution found
  • General_Gunner changed the title to (SOLVED) [1.20.1, Forge 47.4.0] Registering Banner Patterns

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.