-
Recently Browsing
No registered users viewing this page.
-
Posts
-
Go through line by line, and tell me what each does, and why you put it there.
-
By JetCobblestone · Posted
I want to have it out of my main programme, so it's easier to find when I want to add a new items. If I move it out of the main programme, then forge won't look at it by default, so I have to call it from my main to load the items, right? -
Why are you calling item registration from anywhere?
-
By JetCobblestone · Posted
There are so many to keep track of I getting confusedd ARGGGG 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.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; public class ItemsLoader { public static final String modid = "first_mod"; @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 works fine? I don't know where I need to put the method to be able to call the item registration into my main. -
You have a lambda, inside a function, inside a class, inside a function, inside a class. Think there may be a problem with that?
-
-
Topics
-
Who's Online (See full list)