Jump to content
  • Home
  • Files
  • Docs
  • Merch
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • What is and isn't the "right way" to make mods?
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 2
NarwhelZhu

What is and isn't the "right way" to make mods?

By NarwhelZhu, January 9 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

NarwhelZhu    0

NarwhelZhu

NarwhelZhu    0

  • Tree Puncher
  • NarwhelZhu
  • Members
  • 0
  • 7 posts
Posted January 9

I'm very new to Forge modding and have only been learning it for a few days, so I've been going through dozens of tutorials to try to understand how all the setup works. Right now I'm using Loremaster's 1.12.2 tutorials, but there are a lot of things I'm confused about that he doesn't explain, and I've seen a lot of people saying that the way he does it is highly inefficient, so I'm afraid he's teaching me bad coding practices, so I'm hoping someone can clear this up a bit more for me.

 

Loremaster uses proxy classes in his tutorials, the ClientProxy and the CommonProxy, and from what I understand, the proxy classes are there to tell Forge what side to run that code in. But I've heard so many people say that using a "common proxy" is stupid because everything is common code except the actual designated client proxy and server proxy. If that's so universally true and known, why does every recent Youtube tutorial I find use the CommonProxy?? Are they all just stupid or something?

 

And second, in his tutorials, he puts the ModelLoader method in the ClientProxy class, and I can only GUESS that the reason is because the ModelLoader method can only be run on the client side (because "models" are the 3D images the player interacts with, right? Maybe? I have no idea, I can't find a straight answer as to what a "model" actually is). That seems to make sense to me, but I tried using the ModelLoader method outside the ClientProxy class, and it seemed to work just fine. Nothing crashed, no exceptions, everything worked. If it worked, then why did it even need to go in the ClientProxy to begin with?? Is that an example of "reaching across sides" as the Forge docs put it?

 

I can't seem to find a good tutorial that goes through this stuff so you actually know what things do and why so you know what you need to do and what's redundant. No tutorial I've seen ever really explains these things in depth, they just tell you to do what they do because, "well you wanted to make a mod right?? Of course I'm not actually going to go in depth on how to be efficient and only do things when you need to do them, just blindly follow what I do and you got yourself a probably badly-designed mod that will break with anything else except very basic stuff." It's kind of frustrating.

  • Quote

Share this post


Link to post
Share on other sites

Eiachh    2

Eiachh

Eiachh    2

  • Tree Puncher
  • Eiachh
  • Members
  • 2
  • 36 posts
Posted January 9

Well if you really want a tutorial then read and ignore youtbe videos. I have a feeling that all the guys who make youtube videos can only do thoose basic stuff and nothing else. They even use the exact same example.

What I did i used this tutorial: This

Then start to read the documentation. If you dont like to do it like nobody in the world just read the getting started and the Concepts exspecially this. (About the proxies)

Then i watched his videos.


Now maybe some will say this is "hand feading and exspecially don't watch guides" but to start this was kinda ok for me (but really dont watch guides on youtube). Thoose videos are really helpfull if you have the base concept.
Sadly to answer your exact question idk what "ModLoader" method do you mean exactly?

  • Quote

Share this post


Link to post
Share on other sites

NarwhelZhu    0

NarwhelZhu

NarwhelZhu    0

  • Tree Puncher
  • NarwhelZhu
  • Members
  • 0
  • 7 posts
Posted January 9 (edited)

Thanks for the reply, I'll look into those resources, although the videos you linked are outdated by now I think. And what I mean by the ModelLoader method is this thing: "ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(item.getRegistryName(), id));". I only have a basic grasp on what it means, but in Loremaster's videos, he put that method in another method called registerItemRenderer inside the ClientProxy class, and then called that method in a RegistryHandler class using the subscribe events. And I don't understand why he did it that way, he kind of just expects you to either intuitively know why he did it somehow, or he expects you to just not care. Either way I didn't learn much from it. If you watch his video on custom items you'll see what I mean, I don't know how to describe it well.

 

I'm not necessarily looking for a "tutorial" or a "guide," but I'm looking for ways to find information that I'll need to make mods on my own.

 

For example, if certain methods can only run on client side or run differently on server side and client side, how will I know? In tutorials they say "you use the proxy classes for methods that can only run on either side," but how will I know when that's the case for any given method? Is there some metaphorical giant flashing sign for every method somewhere saying "yo, this method can only be run in the client proxy or else it will break everything, just a heads up"?

 

Edit: Just realized ModelLoader is a class not a method, I'm an idiot sometimes lol

Edited January 9 by NarwhelZhu
  • Quote

Share this post


Link to post
Share on other sites

larsgerrits    510

larsgerrits

larsgerrits    510

  • Reality Controller
  • larsgerrits
  • Members
  • 510
  • 3455 posts
Posted January 9
45 minutes ago, NarwhelZhu said:

Loremaster uses proxy classes in his tutorials, the ClientProxy and the CommonProxy, and from what I understand, the proxy classes are there to tell Forge what side to run that code in. But I've heard so many people say that using a "common proxy" is stupid because everything is common code except the actual designated client proxy and server proxy. If that's so universally true and known, why does every recent Youtube tutorial I find use the CommonProxy?? Are they all just stupid or something?

It's called "cargo cult programming".  Basically, because someone did it that way once, other people started copying it because that's the only way the

 

51 minutes ago, NarwhelZhu said:

I tried using the ModelLoader method outside the ClientProxy class, and it seemed to work just fine. Nothing crashed, no exceptions, everything worked. If it worked, then why did it even need to go in the ClientProxy to begin with?? Is that an example of "reaching across sides" as the Forge docs put it?

That's because in your development environment both the client and server code is available. When you install your mod on the client, you also have both client and server code available. However, when your mods get installed on the server, the client code is missing and your mod will crash the server because it cannot find those files. (Docs)

 

59 minutes ago, NarwhelZhu said:

I can't seem to find a good tutorial that goes through this stuff so you actually know what things do and why so you know what you need to do and what's redundant. No tutorial I've seen ever really explains these things in depth

There's no single tutorial that does everything correctly, because there's more than 1 way to do something correctly. However, there are some things (like CommonProxy) which are fundamentally wrong and shouldn't be used at all.

 

57 minutes ago, NarwhelZhu said:

they just tell you to do what they do because, "well you wanted to make a mod right?? Of course I'm not actually going to go in depth on how to be efficient and only do things when you need to do them, just blindly follow what I do and you got yourself a probably badly-designed mod that will break with anything else except very basic stuff." It's kind of frustrating.

That's the problem with YouTube tutorials.

  • Quote

Share this post


Link to post
Share on other sites

theishiopian    1

theishiopian

theishiopian    1

  • Creeper Killer
  • theishiopian
  • Members
  • 1
  • 141 posts
Posted January 9

You can't find a good explanation of a model, well heres one: A model is 3D geometry that a texture is wrapped around. It's not so much an "image", but a model, as in a toy model. Think of it like a christmas present, with the texture as the wrapping paper.

  • Quote

Share this post


Link to post
Share on other sites

FlordiaDucky    0

FlordiaDucky

FlordiaDucky    0

  • Tree Puncher
  • FlordiaDucky
  • Members
  • 0
  • 16 posts
Posted January 10

I use the same tutorials

  • Quote

Share this post


Link to post
Share on other sites

Cadiboo    277

Cadiboo

Cadiboo    277

  • Reality Controller
  • Cadiboo
  • Members
  • 277
  • 3303 posts
Posted January 21

To try and help avoid these problems and people making bad mods, I’ve made a Modding skeleton for people to download and get straight into modding with https://github.com/Cadiboo/Example-Mod

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 2
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • darkgreenminer
      [1.12.2] Multiple Structure Generation

      By darkgreenminer · Posted 14 minutes ago

      Someone else had that same problem of their mod only spawning the last structure added to WorldGenCustomStructures, and I remembered that the solution I found was what a commentor named Redstone Tim mentioned, that in WorldGenStructure you have to remove 'static'.  I'm happy to email my version of these two classes to you if you want to have a look.  It took me hours and hours to get them working.  I have no idea what might cause the cascading gen lag, but fixing the multiple structure problem might help.    
    • troyvs
      problems starting with modding

      By troyvs · Posted 58 minutes ago

      what command did you run to set up?  
    • MightyAhmed
      Immediate Crash On Any Version Of Forge

      By MightyAhmed · Posted 1 hour ago

      ok so its been a while but it was workling fine before somehow but now minecraft still works it just freezes and lagspikes every 5 seconds please help me on this issue i cant find anything on the internet also ihave 4GB ram total in my computer and i have dedicated 2gb ram to minecraft in the JVM arguments section also i have 125 mods installed.
    • deanvangreunen
      Custom Armor Item - Help - MC/Forge 1.14.4/1.14.3

      By deanvangreunen · Posted 2 hours ago

      Hello, I'm in progress of making a Minecraft 1.14.4 Mod using Forge. Needing some help, Could you please look at the following Class File and Explain what I'm doing wrong or what I should be doing?.   The "OnArmorTick" and other ".....Tick" functions don't work.   My intent: - if water is below and near player by 1 block while the boots are on then turn the water into ice. I'm trying to implement "Frost Walking Boots"   Code: - FrostBootsItem.java <- File I need help with - My Project Repo  <- Repo, So if you want to see how my mod is setup. (includes my world saves, etc)   Dev Details: - Minecraft Version: 1.14.4 - Minecraft Snapshot: 20191020-1.14.3 - Forge Version: 1.14.4-28.1.61   Notes: - I've followed a tutorial for 1.14.4 modding by MCJty on youtube (The author of RFTools) - I'm new to minecraft modding. I have expeirenced as a software developer/engineer.   ❤️❤️❤️❤️❤️❤️❤️❤️❤️  ❤️  .Thanks in advance. ❤️  ❤️❤️❤️❤️❤️❤️❤️❤️❤️ 
    • DragonITA
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA · Posted 2 hours ago

      please see the screenshoot above.
  • Topics

    • Merthew
      8
      [1.12.2] Multiple Structure Generation

      By Merthew
      Started November 7, 2018

    • coolian
      1
      problems starting with modding

      By coolian
      Started October 9

    • MightyAhmed
      83
      Immediate Crash On Any Version Of Forge

      By MightyAhmed
      Started November 10

    • deanvangreunen
      0
      Custom Armor Item - Help - MC/Forge 1.14.4/1.14.3

      By deanvangreunen
      Started 2 hours ago

    • DragonITA
      48
      [1.14.4] How to get Minecraft Horse model/texture to make a custom unicorn?

      By DragonITA
      Started December 9

  • Who's Online (See full list)

    • bitman
    • LTNightshade
    • GttiqwT
    • ricoc90
    • darkgreenminer
    • Choonster
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • What is and isn't the "right way" to make mods?
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community