Jump to content

'Mod Resources' for variant: 'normal'


poalqo

Recommended Posts

Hey guys, I'm just starting out to learn Minecraft modding and for some reason my block isn't loading.

I'm going through the errors and it seems that these errors tell me why:

[m[33m[17:49:38] [Worker-Main-11/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'testmod:blockstates/ruby_ore.json' in resourcepack: 'Mod Resources' for variant: 'normal': Unknown blockstate property: 'normal'
[m[33m[17:49:38] [Worker-Main-11/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'testmod:blockstates/ruby_ore.json' missing model for variant: 'testmod:ruby_ore#'
[m[33m[17:49:39] [Worker-Main-11/WARN] [minecraft/ModelBakery]: Unable to load model: 'testmod:ruby_ore#inventory' referenced from: testmod:ruby_ore#inventory: java.io.FileNotFoundException: testmod:models/item/ruby_ore.js

As you can tell, I am trying to add "ruby's" to the game and have succeeded in just adding rubies but am not having much luck on the block side.

Here is the code for how I registered the block,

	@SubscribeEvent
	public static void onRegisterBlocks(RegistryEvent.Register<Block> event) {
		Block ruby_ore = new Block(Block.Properties.create(Material.IRON).hardnessAndResistance(
				0.6F, 6.0F).sound(SoundType.STONE));
		
		event.getRegistry().registerAll(
				setup(ruby_ore, "ruby_ore")
		);
		// new BlockItem(
		//		ruby_ore, new Item.Properties().group(ModItemGroups.MOD_ITEM_GROUP)).setRegistryName(ruby_ore.getRegistryName());
	}
	@SubscribeEvent
	public static void onRegisterBlockItem(RegistryEvent.Register<Item> event) {
		BlockItem ruby_ore = new BlockItem(
				ModBlocks.RUBY_ORE, new Item.Properties().group(ModItemGroups.MOD_ITEM_GROUP));
		event.getRegistry().registerAll(
				setup(ruby_ore, "ruby_ore"));
	}
	public static <T extends IForgeRegistryEntry<T>> T setup(final T entry, final String name) {
		return setup(entry, new ResourceLocation(testmod.MODID, name));
	}
	
	public static <T extends IForgeRegistryEntry<T>> T setup(final T entry, final ResourceLocation registryName) {
		entry.setRegistryName(registryName);
		return entry;	
	}

My ObjectHolder class for all my blocks:

@ObjectHolder(testmod.MODID)
public class ModBlocks {
	public static final Block RUBY_ORE = null;
}

and my file structure:

image.png.ae18e95fa3fc9473ed342ed001f07b74.png

From the error it seems simply that my variants object is off because it seems to have "normal" as its key, but that isn't true.

Here is my testmod.blockstates.ruby_ore.json

{
    "variants": {
        "": { "model": "testmod:block/ruby_ore" }
    }
}

My testmod.models.block.ruby_ore.json

{
    "parent": "block/cube_all",
    "textures": {
        "all": "testmod:blocks/ruby_ore"
    }
}

and of course my testmod.item.ruby_ore.json

{
    "parent": "testmod:block/ruby_ore"
}

 Anyways hoping anyone can help me find the cause of my error! :D

Link to comment
Share on other sites

18 minutes ago, poalqo said:

"variants": { "": { "model": "testmod:block/ruby_ore" } }

I'm bad at JSONs, but as far as I see, here is no

 

18 minutes ago, poalqo said:

'testmod:blockstates/ruby_ore.json' in resourcepack: 'Mod Resources' for variant: 'normal'

 

Everything said above may be absolutely wrong. No rights reserved.

Link to comment
Share on other sites

1 minute ago, poopoodice said:

I don't think you can (beside gists), but you can always remove the link here or make the repo private afterwards.

 

I can't guarantee that I can fix your problem tho.

Ok I might create a repo and make it private afterwards

Link to comment
Share on other sites

2 minutes ago, poalqo said:

What do you mean "here is no"?

I'm not sure, but it looks like minecraft is searching for modelblockstate variant "normal", but you do not specify it.

Edited by Dzuchun

Everything said above may be absolutely wrong. No rights reserved.

Link to comment
Share on other sites

3 minutes ago, poalqo said:

But then why would it say:


Unknown blockstate property: 'normal'

?

https://minecraft.gamepedia.com/Model#Block_states

this may help you

 

"A block with just one variant uses "" as a name for its variant."

Ok, I got it, your file is fine

Edited by Dzuchun

Everything said above may be absolutely wrong. No rights reserved.

Link to comment
Share on other sites

1 minute ago, poopoodice said:

 

It works totally fine in my dev environment. There must be something messed up with yours, you may want to recreate all folders...etc.

image.png.3d829dc5c0eb0d97a04907cc074b33cf.png

 

Wow...I might just redownload my own repo, and rebuild my thing lmaooo. thanks!

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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • https://pastebin.com/VwpAW6PX My game crashes upon launch when trying to implement the Oculus mod to this mod compilation, above is the crash report, I do not know where to begin to attempt to fix this issue and require assistance.
    • https://youtube.com/shorts/gqLTSMymgUg?si=5QOeSvA4TTs-bL46
    • CubeHaven is a SMP server with unique features that can't be found on the majority of other servers! Java: MC.CUBEHAVEN.NET Bedrock: MC.CUBEHAVEN.NET:19132 3 different stores: - CubeHaven Store: Our store to purchase using real money. - Bitcoin Store: Store for Bitcoin. Bitcoin can be earned from playing the server. Giving options for players if they want to spend real money or grind to obtain exclusive packages. - Black Market: A hidden store for trading that operates outside our traditional stores, like custom enchantments, exclusive items and more. Some of our features include: Rank Up: Progress through different ranks to unlock new privileges and perks. 📈 Skills: RPG-style skill system that enhances your gaming experience! 🎮 Leaderboards: Compete and shine! Top players are rewarded weekly! 🏆 Random Teleporter: Travel instantly across different worlds with a click! 🌐 Custom World Generation: Beautifully generated world. 🌍 Dungeons: Explore challenging and rewarding dungeons filled with treasures and monsters. 🏰 Kits: Unlock ranks and gain access to various kits. 🛠️ Fishing Tournament: Compete in a friendly fishing tournament! 🎣 Chat Games: Enjoy games right within the chat! 🎲 Minions: Get some help from your loyal minions. 👥 Piñata Party: Enjoy a festive party with Piñatas! 🎉 Quests: Over 1000 quests that you can complete! 📜 Bounty Hunter: Set a bounty on a player's head. 💰 Tags: Displayed on nametags, in the tab list, and in chat. 🏷️ Coinflip: Bet with other players on coin toss outcomes, victory, or defeat! 🟢 Invisible & Glowing Frames: Hide your frames for a cleaner look or apply a glow to it for a beautiful look. 🔲✨[ Player Warp: Set your own warp points for other players to teleport to. 🌟 Display Shop: Create your own shop and sell to other players! 🛒 Item Skins: Customize your items with unique skins. 🎨 Pets: Your cute loyal companion to follow you wherever you go! 🐾 Cosmetics: Enhance the look of your character with beautiful cosmetics! 💄 XP-Bottle: Store your exp safely in a bottle for later use! 🍶 Chest & Inventory Sorting: Keep your items neatly sorted in your inventory or chest! 📦 Glowing: Stand out from other players with a colorful glow! ✨ Player Particles: Over 100 unique particle effects to show off. 🎇 Portable Inventories: Over virtual inventories with ease. 🧳 And a lot more! Become part of our growing community today! Discord: https://cubehaven.net/discord Java: MC.CUBEHAVEN.NET Bedrock: MC.CUBEHAVEN.NET:19132
    • # Problematic frame: # C [libopenal.so+0x9fb4d] It is always the same issue - this refers to the Linux OS - so your system may prevent Java from working   I am not familiar with Linux - check for similar/related issues  
  • Topics

×
×
  • Create New...

Important Information

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