Jump to content

Recommended Posts

Posted

Hello, I am following the tutorial at this link https://cadiboo.github.io/tutorials/1.15.2/forge/1.6-item-model/. I am using eclipse and this tutorial has been working so far. However, my Src/main is empty and does not contain a /resource. I am supposed to add a .json file in src/main/resources/assets/examplemod/models/item/. It also shows a resources folder in the file explorer under src/main, but it does not contain an assets folder. What do I do?

Posted

Make the folder yourself?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

Hey, I get this error when I run it now :

 [Server-Worker-7/WARN] [minecraft/ModelBakery]: Unable to load model: 'minecraft:first_mod#inventory' referenced from: minecraft:first_mod#inventory: java.io.FileNotFoundException: minecraft:models/item/first_mod.json

. In my ModEventSubscriber class this is the code

package com.gmail.yoshifan100000.first_mod;

import net.minecraft.item.Item;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.registries.IForgeRegistryEntry;

@EventBusSubscriber(modid = Main.MODID, bus = EventBusSubscriber.Bus.MOD)
public final class ModEventSubscriber {


	@SubscribeEvent
	public static void onRegisterItems(RegistryEvent.Register<Item> event) {
		event.getRegistry().registerAll(
				setup(new Item(new Item.Properties()), "example_ingot")
			);
	}
	public static <T extends IForgeRegistryEntry<T>> Item setup(final Item item, final String string) {
		return setup(item, new ResourceLocation(Main.MODID));
	}
	
	public static <T extends IForgeRegistryEntry<T>> T setup(final T entry, final ResourceLocation registryName) {
		entry.setRegistryName(registryName);
		return entry;
	}


}

And my main contains : 

package com.gmail.yoshifan100000.first_mod;


import net.minecraftforge.fml.common.Mod;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

@Mod(Main.MODID)
public final class Main {
	public static final String MODID = "first_mod";

	private static final Logger LOGGER = LogManager.getLogger();

	public void ExampleMod() {
		LOGGER.debug("Hello from Example Mod!");
	}
}

 

Posted

There is absolutely no reason for those setup() methods, what tutorial are you following?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

Oh right, you already pointed it out.

Toss everything and try McJty's tutorial

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

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.