Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ugdhar

Moderators
  • Joined

  • Last visited

Everything posted by Ugdhar

  1. I hate bumping topics, but I'm genuinely curious about this. No input from anyone huh?
  2. Make sure it's the latest Java 8, and not the latest version of Java (Which I believe is Java 13)
  3. Old versions are no longer supported, see the LTS link at the top of every page for more information.
  4. Does it work if you use vanilla? Please post logs as described in the EAQ (pinned post in support forums index)
  5. 1.12.2 is no longer supported on these forums due to age. Please update to a modern version to receive support. See the LTS link at the top of every page for more information.
  6. 1.11.2 is no longer supported on these forums due to age. Please update to a modern version to receive support. See the LTS link at the top of every page for more information.
  7. Can you post the output of ./gradlew eclipse Hopefully it will contain some information of use in solving your issue!
  8. Since you already have a github, you should post your code there. Much easier to read on there than pasted here, and as long as you keep updating it, no need to post updated code here. Making a guess based on the crash without seeing code, you're trying to register something that has not been initialized, so it's trying to register something that is null. *edit: Pretty sure it's an item, since the crash looks to be coming from ModItems.
  9. In the Referenced Libraries within your IDE, there should be a forge jarfile that you can browse the Forge and Vanilla classes, many of them have comments/javadocs to peruse. Sorry that I haven't got an answer for the first question, not something I've ever tried to do!
  10. You need Java installed to run the forge installer. I believe Java 8-10 will work for the supported versions of Forge. https://adoptopenjdk.net/
  11. Just in case anyone doesn't feel like opening the MDK to check out the example, this is the one packaged with 1.15.1-30.0.41): package com.example.examplemod; import net.minecraft.block.Block; import net.minecraft.block.Blocks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.InterModComms; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent; import net.minecraftforge.fml.event.lifecycle.InterModProcessEvent; import net.minecraftforge.fml.event.server.FMLServerStartingEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.util.stream.Collectors; // The value here should match an entry in the META-INF/mods.toml file @Mod("examplemod") public class ExampleMod { // Directly reference a log4j logger. private static final Logger LOGGER = LogManager.getLogger(); public ExampleMod() { // Register the setup method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); // Register the enqueueIMC method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::enqueueIMC); // Register the processIMC method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::processIMC); // Register the doClientStuff method for modloading FMLJavaModLoadingContext.get().getModEventBus().addListener(this::doClientStuff); // Register ourselves for server and other game events we are interested in MinecraftForge.EVENT_BUS.register(this); } private void setup(final FMLCommonSetupEvent event) { // some preinit code LOGGER.info("HELLO FROM PREINIT"); LOGGER.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName()); } private void doClientStuff(final FMLClientSetupEvent event) { // do something that can only be done on the client LOGGER.info("Got game settings {}", event.getMinecraftSupplier().get().gameSettings); } private void enqueueIMC(final InterModEnqueueEvent event) { // some example code to dispatch IMC to another mod InterModComms.sendTo("examplemod", "helloworld", () -> { LOGGER.info("Hello world from the MDK"); return "Hello world";}); } private void processIMC(final InterModProcessEvent event) { // some example code to receive and process InterModComms from other mods LOGGER.info("Got IMC {}", event.getIMCStream(). map(m->m.getMessageSupplier().get()). collect(Collectors.toList())); } // You can use SubscribeEvent and let the Event Bus discover methods to call @SubscribeEvent public void onServerStarting(FMLServerStartingEvent event) { // do something when the server starts LOGGER.info("HELLO from server starting"); } // You can use EventBusSubscriber to automatically subscribe events on the contained class (this is subscribing to the MOD // Event bus for receiving Registry Events) @Mod.EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) public static class RegistryEvents { @SubscribeEvent public static void onBlocksRegistry(final RegistryEvent.Register<Block> blockRegistryEvent) { // register a new block here LOGGER.info("HELLO from Register Block"); } } }
  12. Just out of curiosity, what happens if you change the icon in your FlatTilesItemGroup to a vanilla item, instead of one of your modded items? I'm just curious if the issue is arising because your item is not registered yet, therefore does not exist, so your tab isn't getting setup? Check out https://mcforge.readthedocs.io/en/1.14.x/concepts/registries/#injecting-registry-values-into-fields for info on ObjectHolders. Also. . . . .
  13. Then I would question if the items are even being registered. I guess post logs?
  14. Ugdhar replied to hannesa2's topic in Modder Support
    You missed that part!
  15. Well, given the information I have, I would have to say there's something wrong with it if it's not working. Just for grins, if you change FLAT_TILES to ItemGroup.MISC does it add your items to the Miscellaneous tab? If that works, then your custom tab is broken.
  16. You may have Java 8, but you're not using it to run Forge.
  17. You should really post your entire codebase as a github repository, because not seeing everything makes it so much harder to see what's wrong. What is FLAT_TILES?
  18. Ugdhar replied to hannesa2's topic in Modder Support
    You don't want the MinecraftForge repository if you are making mods, that would be for devloping/contributing patches to forge itself. Go to files.minecraftforge.net and download the MDK for the version you want to make mods for (only 1.14+ are supported on the forums), and the forge Docs (link at the top of every page) should help you get started.
  19. 1.12.2 is no longer supported due to how old it is. Please update to a modern version to receive support. See the LTS link at the top of every page for more information.
  20. 1.8.9 is no longer supported due to how old it is. Please update to a modern version to receive support. See the LTS link at the top of every page for more information.
  21. 1.7.10 is no longer supported due to how old it is. Please update to a modern version to receive support. See the LTS link at the top of every page for more information.
  22. Please show where you assign the item to the ItemGroup
  23. Your code is super hard to read with all of those method calls chained together, but I don't see anything that sets the creative tab (called ItemGroup I believe in the current supported versions) anywhere.
  24. 1.12.2 is no longer supported on these forums due to age. Please update to a modern version to receive support. See the LTS link at the top of every forum page for more information on supported versions.
  25. You need to set the registry name of your stuff before you register them.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.