Jump to content

llamacorn1921

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by llamacorn1921

  1. ell ive just written over each one. and besides im starting a new tutorial so a new mod
  2. what loot tables? the current one? ive had like 13 versions for the same(only) block because i dont know i multiple pools or use item or alternatives
  3. no. im using a generator to make the loot table
  4. so the mod im making has an ore in it that i want to make drop certain things depending on tool used. all works but it drops the iron pickaxe item on some of the others but not for the diamond ones. i cant really post a code since ive used about 12 different/new ones i want it to drop paper for wood, stone and golden with each pick having its own paper name. for iron it drops one item, with diamond it drops 3 of that item, for diamond loot 2 ikt drops 25 and diamond loot 3 drops 64 i dont know if i need to use 1 pool or 2, group, item or alternatives or what. ive tried every one and it doesn't work generator: https://misode.github.io/loot-table/
  5. so......i forgot the maker of the tutorial had a github so i looked through it....my problem was that "public static final ItemGroup MOD_ITEM_GROUP = new ModItemGroup([REDACTED].MODID, () -> new ItemStack(ModItems.EXAMPLE_ITEM));" needed to be at the top and not at the bottom. i. atleast i know how to read gradle logs now. sorry for the trouble
  6. ok, i removed 'class' from "public static class ModItemGroup extends ItemGroup {" and now the "error: invalid method declaration; return type required" doesn't show with "public static final ItemGroup MOD_ITEM_GROUP = new ModItemGroup(ExampleMod.MODID, () -> new ItemStack(Items.LIGHT_BLUE_BANNER));" being underlined but now im getting :\Users\dwzki\Desktop\minecraft mod making\mods\llamaMod\src\main\java\com\llama\llcstuff\init\ModItemGroups.java:10: error: class, interface, or enum expected public static ModItemGroup extends ItemGroup { ^ C:\Users\===\Desktop\minecraft mod making\mods\===\src\main\java\com\===\====\init\ModItemGroups.java:12: error: class, interface, or enum expected private final Supplier<ItemStack> iconSupplier; ^ C:\Users\===\Desktop\minecraft mod making\mods\===\src\main\java\com\===\====\init\ModItemGroups.java:13: error: class, interface, or enum expected public ModItemGroup(final String name, final Supplier<ItemStack> iconSupplier) { ^ C:\Users\===\Desktop\minecraft mod making\mods\===\src\main\java\com\===\====\init\ModItemGroups. java:13: error: class, interface, or enum expected public ModItemGroup(final String name, final Supplier<ItemStack> iconSupplier) { ^ C:\Users\===\Desktop\minecraft mod making\mods\===\src\main\java\com\===\====\init\ModItemGroups.java:13: error: class, interface, or enum expected public ModItemGroup(final String name, final Supplier<ItemStack> iconSupplier) { ^ C:\Users\dwzki\Desktop\minecraft mod making\mods\llamaMod\src\main\java\com\llama\llcstuff\init\ModItemGroups.java:15: error: class, interface, or enum expected return this.iconSupplier = iconSupplier; ^ C:\Users\===\Desktop\minecraft mod making\mods\===\src\main\java\com\===\====\init\ModItemGroups. java:16: error: class, interface, or enum expected } ^ C:\Users\===\Desktop\minecraft mod making\mods\===\src\main\java\com\===\====\init\ModItemGroups.java:18: error: class, interface, or enum expected public ItemStack createIcon() { ^ C:\Users\===\Desktop\minecraft mod making\mods\===\src\main\java\com\===\====\init\ModItemGroups.java:20: error: class, interface, or enum expected } ^ C:\Users\===\Desktop\minecraft mod making\mods\===\src\main\java\com\===\====\init\ModItemGroups.java:21: error: class, interface, or enum expected public static final ItemGroup MOD_ITEM_GROUP = new ModItemGroup(LlamasMod.MODID, () -> new ItemStack(ModItems.EXAMPLE_ITEM)); ^ C:\Users\===\Desktop\minecraft mod making\mods\===\src\main\java\com\===\====\init\ModItemGroups.java:22: error: class, interface, or enum expected } ^ 11 errors
  7. so im following this tutorial [https://cadiboo.github.io/tutorials/1.15.2/forge/1.7-itemgroup/] and I'm completely new to all of this. I'm literally copy and pasting while adding stuff so some lines are colored and styled like the site says but noting is working. This is what the log says: error: invalid method declaration; return type required public ModItemGroup(final String name, final Supplier<ItemStack> iconSupplier) { ^ 1 error this is the code package com.[REDACTED].[REDACTED].init; import java.util.function.Supplier; import com.[REDACTED].[REDACTED].[REDACTED]; import net.minecraft.item.ItemGroup; import net.minecraft.item.Items; [File: ModItemGroups.java] public static class ModItemGroup extends ItemGroup { private final Supplier<ItemStack> iconSupplier; public ModItemGroup(final String name, final Supplier<ItemStack> iconSupplier) { super(name); this.iconSupplier = iconSupplier; } @Override public ItemStack createIcon() { return iconSupplier.get(); } public static final ItemGroup MOD_ITEM_GROUP = new ModItemGroup([REDACTED].MODID, () -> new ItemStack(ModItems.EXAMPLE_ITEM)); } [File: ModItems.java] package com.[REDACTED].[REDACTED].init; import com.[REDACTED].[REDACTED].[REDACTED]; //Main File for the ModName.MODID so its colored and styled import net.minecraftforge.registries.ObjectHolder; @ObjectHolder([REDACTED].MODID) public class ModItems { public static final Item EXAMPLE_ITEM = null; } [FIle: MOdEventSubscriber.java] package com.[REDACTED].[REDACTED]; import com.[REDACTED].[REDACTED].init.ModItemGroup; // for stuff to be colored and styled import net.minecraft.item.Items;//part of this i took from another post from the same problem I had eariler since I know nothing for inports and just barley started to understand gradle errors import net.minecraft.util.ResourceLocation; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.registries.IForgeRegistry; import net.minecraftforge.registries.IForgeRegistryEntry; @Mod.EventBusSubscriber(modid = [REDACTED].MODID, bus = Mod.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().group(ModItemGroup.MOD_ITEM_GROUP)), "mega_cookie") ); } public static <T extends IForgeRegistryEntry<T>> T setup(final T entry, final String name) { return setup(entry, new ResourceLocation([REDACTED].MODID, name)); } public static <T extends IForgeRegistryEntry<T>> T setup(final T entry, final ResourceLocation registryName) { entry.setRegistryName(registryName); return entry; } } if anyone knows what the problem is or could give hints or something then please tell me email is: dwzkitty@gmail.com [yea i know. made it when i was like 14 or something so about 4 years ago] thanks
  8. nvm. i added all that stuff back. it works now!
  9. also having trouble with that same tutorial. the picture he has dose not help at all. do i need the example mod? because i moved it out of my project folder and changed all the "examplemod" stuff to my mod name
×
×
  • Create New...

Important Information

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