• 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!
    • Hi, a exemple: i just installed Tabula and i see, that i should install a Library or a API, iChunc or something else, else the mod wont work. Question: What is a Library/API and how to make a own?
    • Where do I find it? and i copy paste here or in other web and link here?
    • I just realized what I've done. I forgot to make the BeeNestGenerator method static. I'll check if that fixes it.
  • Topics

  • Who's Online (See full list)