Jump to content

[1.15.2] Deferred Registry Blocks Not Loading - Forge 31.2.0


jaxbymc42

Recommended Posts

Since moving everything to deferred registries, my mod's blocks are not in the game.  The ore gen generates the ores underground and the blocks appear with textures and all but there is no possible way of obtaining the blocks (not in creative menu, /give doesn't work, middle clicking the ore doesn't work).  The blocks can't even be crafted.  The only leading bit of information I have is the log says this for every one of my mod's blocks when loading a world:

"[Server thread/ERROR] [minecraft/LootTableManager]: Couldn't parse loot table chrispymod:blocks/cyan_redstone_lamp

com.google.gson.JsonSyntaxException: Expected name to be an item, was unknown string 'chrispymod:cyan_redstone_lamp'"

There are also parsing errors when loading recipes.

My loot tables have not been moved and I did not encounter this issue before switching to deferred registries.

I have attached ChrispyMod.java (Main), BlockInit.java, and my latest.log.  If something will not load or you need more info, let me know.

I am genuinely stuck and have no idea what is wrong.

Any help is appreciated.  Thank you for your time.

 

ChrispyMod.java BlockInit.java latest.log

Link to comment
Share on other sites

Have you registered the item form of the blocks?

Some tips:

Spoiler

Modder Support:

Spoiler

1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code.

2. Always post your code.

3. Never copy and paste code. You won't learn anything from doing that.

4. 

Quote

Programming via Eclipse's hotfixes will get you nowhere

5. Learn to use your IDE, especially the debugger.

6.

Quote

The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it.

Support & Bug Reports:

Spoiler

1. Read the EAQ before asking for help. Remember to provide the appropriate log(s).

2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.

 

 

Link to comment
Share on other sites

I thought that the lines below did that in my main class:

@SubscribeEvent
    public static void onRegisterItems(final RegistryEvent.Register<Item> event) {
        final IForgeRegistry<Item> registry = event.getRegistry();

        BlockInit.BLOCKS.getEntries().stream().map(RegistryObject::get).forEach(block -> {
                    final Item.Properties properties = new Item.Properties().group(ChrispyModItemGroup.instance);
                    final BlockItem blockItem = new BlockItem(block, properties);
                    blockItem.setRegistryName(block.getRegistryName());
                    registry.register(blockItem);
                });

        LOGGER.debug("Registered BlockItems!");
    }

Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.