Jump to content

[1.14] layout of a modpack


JetCobblestone

Recommended Posts

Hello everyone!

 

I started to make a mod a few days ago. Upon watching some java tutorials and some episodes of Harry talks 1.14 mod tutorial, I've managed to create a food item. However, after brief looks at other tutorials, I've seen some big differences in the layout of the mods. Everything seems to be a lot more broken down into sections, and I've been finding it a bit overwhelming as I haven't really found a good tutorial which explains in detail everything whic his going on, only, copy this. What I'm really asking is, could somebody explain to me how to correctly layout a modpack and how do I network it?

 

package jetcobblestone.firstmod;

import jetcobblestone.firstmod.lists.itemList;
import net.minecraft.item.Foods;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@Mod("first_mod")
public class FirstMod 
{
	public static FirstMod instance;
	public static final String modid = "first_mod";
	
	public FirstMod()
	{
		instance = this;

		FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
		FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientRegistries);
		
		MinecraftForge.EVENT_BUS.register(this);
	}
	
	private void setup(final FMLCommonSetupEvent event)
	{

		}
	private void clientRegistries(final FMLClientSetupEvent event)	
	{

	}
	
	@Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD)
	public static class RegistryEvents
	{
		@SubscribeEvent
		public static void registerItems(final RegistryEvent.Register<Item> event)
		{
			event.getRegistry().registerAll
			(
					itemList.hair_fibre = new Item(new Item.Properties().food(Foods.COOKIE).group(ItemGroup.FOOD).maxStackSize(1)).setRegistryName(location("hair_fibre"))
			);
		}
	}
	private static ResourceLocation location(String name)
	{
		return new ResourceLocation(modid, name);
	}
	
}

 

 

This is what I have so far, please do not question why I have added in an edible hair. This is pretty much the only code stuff, though obviously I have an item list extra. Also, the tutorial I watching atm gives very specific ways of doing things, e.g. names and places. Do I have to have the item list in a folder called lists for example? How much freedom do I have with the position of files as long as I call on them correctly. I know this is quite a big question, but any guidance would be fantastic! Thank you!

Link to comment
Share on other sites

1 hour ago, diesieben07 said:

Forge mods are just normal Java programs. Forge provides an API through events and interfaces. How you structure your code doesn't really matter, what matters is that you do things during the correct event.

One thing though: I don't recommend using Harry Talks' tutorials. He has no idea what he's doing.

Right. Can you please explain to me the things he does wrong in an easy to understand manner? If I shouldn't use Harry Talks, who should I use then? He's seems to have one of the only 1.14 tutorials. Thanks!

Link to comment
Share on other sites

1 hour ago, diesieben07 said:

I haven't watched his videos. I only see people who say they used him produce terrible code and I've seen him on the Forge Discord asking stupid questions and proving has no idea what he's doing.

I'm pretty sure I've left some comments on his videos about the mistakes he's perpetuating, but its not like anyone reads those.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

11 hours ago, diesieben07 said:

I haven't watched his videos. I only see people who say they used him produce terrible code and I've seen him on the Forge Discord asking stupid questions and proving has no idea what he's doing.

As for other tutorials: I prefer to just look at the code and figure things out that way. But I have heard good thing's about Cadiboo's tutorials: https://cadiboo.github.io/tutorials/1.14.4/forge/.

  •  

Right. I'mt not good enough at java yet to be able to just look at the source and figure out what I can do yet, and I don't know all the commands I can use, but I'm sure I'll learn. The tutorials you sent me look really good!

Link to comment
Share on other sites

 

8 hours ago, Draco18s said:

I'm pretty sure I've left some comments on his videos about the mistakes he's perpetuating, but its not like anyone reads those.

I try to read the comments, but 95% are just people going on about how great and fantastic his tutorials are, which are of course the only ones he replies and likes. He doesn't bother helping people who can't it to work.

Link to comment
Share on other sites

7 hours ago, JetCobblestone said:

I try to read the comments, but 95% are just people going on about how great and fantastic his tutorials are, which are of course the only ones he replies and likes. He doesn't bother helping people who can't it to work.

Classic sign of someone who isn't interested in producing content that actually works.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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



×
×
  • Create New...

Important Information

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