Jump to content

Profinger

Members
  • Posts

    2
  • Joined

  • Last visited

Profinger's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Good lord.. That was the ticket lol Thank you so much! I hadn't actually seen any examples anywhere of the proper give command and I'm only really familiar with using /give in vanilla since I've never modded or really played with mods before. Minecraft kept autocompleting with /give Dev minecraft: things and just leaving the minecraft: designation off didn't help. I didn't realize I access them directly through my modid! Thank you!
  2. Hey all. I finally got everything working and building with this tutorial (https://cadiboo.github.io/tutorials/1.14.4/forge/) however I can't get an item to appear. From what I can tell, I've followed the tutorial exactly save for a few things I modified to match someone else's code a bit who was asking the same question I was but his problem was that he was registering to the wrong eventbus. Anyone have any thoughts? Main.java: import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import net.minecraftforge.fml.common.Mod; @Mod(Main.MODID) public final class Main { public static final String MODID = "itemtest1"; public static final Logger LOGGER = LogManager.getLogger(); public Main() { LOGGER.debug("TEST TEST"); } } ModEventSubscriber.java: 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; import net.minecraftforge.registries.IForgeRegistryEntry; @Mod.EventBusSubscriber(modid = Main.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()), "testitem") ); } public static <T extends IForgeRegistryEntry<T>> T setup(final T entry, final String name) { return setup(entry, new ResourceLocation(Main.MODID, name)); } public static <T extends IForgeRegistryEntry<T>> T setup(final T entry, final ResourceLocation registryName) { entry.setRegistryName(registryName); return entry; } } From what I can tell, everything here should be accurate and correct. However, when I load into a newly created world and try to type /give Dev testitem I get an error that it's not found.
×
×
  • Create New...

Important Information

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