Jump to content

MrBendelScrolls

Members
  • Posts

    115
  • Joined

  • Last visited

Posts posted by MrBendelScrolls

  1. Yes, pretty simple:
    You mine a block... and it mines 3x3 area!


    STOP ASKING STUPID QUESTIONS WITH THE HEL OF AN ANNOYING FONT!!!!

     

    If you're not paying, we won't think for you.
    Also, wrong forum.
     

  2. Just replace the old

    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, meta, loc);

     

    But it's highly recommended to start using registry events. They're not so hard to understand. Read the docs first, and here's some simple information:

     

  3. Thank you for ultimate experience of downloading a zipped project via mediafire...
     

    Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, meta, loc);

    Don't use ModelMesher. Use ModelLoader::setCustomResourceLocation().
    Also, you should be using register events if you want to be able to update to 1.11+.

    What kind of crappy tutorials does everyone watch? Why is there so many ModelMesher threads on the forum?

    • Like 1
  4. Tutorials that you're using are outdated. You should use registry events now.

     

    Complicated things simple:

    • Items must be registered inside RegistryEvent.Register<IForgeRegistryEntry> with event::getRegistry()::register()
      public static void registerItems(RegistryEvent.Register<Item> event) {
        event.getRegistry().register(item);
      }

       

    • Models must be registered inside ModelRegistryEvent with ModelLoader::setCustomResourceLocation()
      public static void registerModels(ModelRegistryEvent event) {
        ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
      }

       

    Don't forget to separate event subscribers with common RegistryEvent and client ModelRegistryEvent, otherwise crashes may happen.

  5. MrCrayfish's tutorials are outdated. I suggest reading event docs and searching for similar threads on the forum. There are probably some good new tutorials, but I personally haven't seen one.
    You should post your code on github. However, just uploading it is a bad idea. Learn how to use git, it'll help managing projects a lot.

    Another way, you can upload separate files on gist, but I'd be a terrible idea for the whole project.

  6. I suddenly decided to play some old minecraft maps, which require older versions. However, for some reason there is no sound in everything under 1.6.4.

    It appears that the new launcher doesn't download required libs for old mc versions. I had to use the old one (god, it's a way more comfortable), which reset all of my settings.

    Now everything works fine with the new launcher, but what if I need to reinstall minecraft? Is there a way to fix it?
    %ultimate_imnonativespeaker_sign%

  7. I will make it simple.
    To save changes made from GUI, subscribe to ConfigChangedEvent.OnConfigChangedEvent. Check if event's modid is the modid of your mod, then call ConfigManager#sync(). I don't have access to sources right now, but the code looks like this:

    @EventBusSubscriber
    public class ConfigEventHandler {
    /* I prefer to make it inner class of my config class,
       but it doesn't have to be, it just needs to be registered.
       Read docs about events if you don't understand. */
      
      @SubscribeEvent
      public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent event) {
        if (event.getModid().equals(modid) {
          ConfigManager.sync(modid, Config.Type.INSTANCE);
        }
      }
    }

     

    I believe,ConfigManager#sync() also saves changes made to fields to your config file, but as I said, I don't know much about configs .

    • Like 1
×
×
  • Create New...

Important Information

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