Jump to content

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


NarwhelZhu

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 by NarwhelZhu
Link to comment
Share on other sites

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.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

  • 2 weeks later...

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

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Selamat datang di OLXTOTO, situs slot gacor terpanas yang sedang booming di industri perjudian online. Jika Anda mencari pengalaman bermain yang luar biasa, maka OLXTOTO adalah tempat yang tepat untuk Anda. Dapatkan sensasi tidak biasa dengan variasi slot online terlengkap dan peluang memenangkan jackpot slot maxwin yang sering. Di sini, Anda akan merasakan keseruan yang luar biasa dalam bermain judi slot. DAFTAR OLXTOTO DISINI LOGIN OLXTOTO DISINI AKUN PRO OLXTOTO DISINI   Jackpot Slot Maxwin Sering Untuk Peluang Besar Di OLXTOTO, kami tidak hanya memberikan hadiah slot biasa, tapi juga memberikan kesempatan kepada pemain untuk memenangkan jackpot slot maxwin yang sering. Dengan demikian, Anda dapat meraih keberuntungan besar dan memenangkan ribuan rupiah sebagai hadiah jackpot slot maxwin kami. Jackpot slot maxwin merupakan peluang besar bagi para pemain judi slot untuk meraih keuntungan yang lebih besar. Dalam permainan kami, Anda tidak harus terpaku pada kemenangan biasa saja. Kami hadir dengan jackpot slot maxwin yang sering, sehingga Anda memiliki peluang yang lebih besar untuk meraih kemenangan besar dengan hadiah yang menggiurkan. Dalam permainan judi slot, pengalaman bermain bukan hanya tentang keseruan dan hiburan semata. Kami memahami bahwa para pemain juga menginginkan kesempatan untuk meraih keberuntungan besar. Oleh karena itu, OLXTOTO hadir dengan jackpot slot maxwin yang sering untuk memberikan peluang besar kepada para pemain kami. Peluang Besar Menang Jackpot Slot Maxwin Peluang menang jackpot slot maxwin di OLXTOTO sangatlah besar. Anda tidak perlu khawatir tentang batasan atau pembatasan dalam meraih jackpot tersebut. Kami ingin memberikan kesempatan kepada semua pemain kami untuk merasakan sensasi menang dalam jumlah yang luar biasa. Jackpot slot maxwin kami dibuka untuk semua pemain judi slot di OLXTOTO. Anda memiliki peluang yang sama dengan pemain lainnya untuk memenangkan hadiah jackpot yang besar. Kami percaya bahwa semua orang memiliki kesempatan untuk meraih keberuntungan besar, dan itulah mengapa kami menyediakan jackpot slot maxwin yang sering untuk memenuhi harapan dan keinginan Anda.   Kesimpulan OLXTOTO adalah situs slot gacor terbaik yang memberikan pengalaman bermain judi slot online yang tak terlupakan. Dengan variasi slot online terlengkap dan peluang memenangkan jackpot slot maxwin yang sering, OLXTOTO menjadi pilihan terbaik bagi para pemain yang mencari kesenangan dan kemenangan besar dalam perjudian online. Di samping itu, OLXTOTO juga menawarkan layanan pelanggan yang ramah dan responsif, siap membantu setiap pemain dalam mengatasi masalah teknis atau pertanyaan seputar perjudian online. Kami menjaga integritas game dan memberikan lingkungan bermain yang adil serta menjalankan kebijakan perlindungan pelanggan yang cermat. Bergabunglah dengan OLXTOTO sekarang dan nikmati pengalaman bermain slot online yang luar biasa. Jadilah bagian dari komunitas perjudian yang mengagumkan ini dan raih kesempatan untuk meraih kemenangan besar. Dapatkan akses mudah dan praktis ke situs OLXTOTO dan rasakan sensasi bermain judi slot yang tak terlupakan.  
    • OLXTOTO: Platform Maxwin dan Gacor Terbesar Sepanjang Masa Di dunia perjudian online yang begitu kompetitif, mencari platform yang dapat memberikan kemenangan maksimal (Maxwin) dan hasil terbaik (Gacor) adalah prioritas bagi para penjudi yang cerdas. Dalam upaya ini, OLXTOTO telah muncul sebagai pemain kunci yang mengubah lanskap perjudian online dengan menawarkan pengalaman tanpa tandingan.     Sejak diluncurkan, OLXTOTO telah menjadi sorotan industri perjudian online. Dikenal sebagai "Platform Maxwin dan Gacor Terbesar Sepanjang Masa", OLXTOTO telah menarik perhatian pemain dari seluruh dunia dengan reputasinya yang solid dan kinerja yang luar biasa. Salah satu fitur utama yang membedakan OLXTOTO dari pesaingnya adalah komitmen mereka untuk memberikan pengalaman berjudi yang unik dan memuaskan. Dengan koleksi game yang luas dan beragam, termasuk togel, slot online, live casino, dan banyak lagi, OLXTOTO menawarkan sesuatu untuk semua orang. Dibangun dengan teknologi terkini dan didukung oleh tim ahli yang berdedikasi, platform ini memastikan bahwa setiap pengalaman berjudi di OLXTOTO tidak hanya menghibur, tetapi juga menguntungkan. Namun, keunggulan OLXTOTO tidak hanya terletak pada permainan yang mereka tawarkan. Mereka juga terkenal karena keamanan dan keadilan yang mereka berikan kepada para pemain mereka. Dengan sistem keamanan tingkat tinggi dan audit rutin yang dilakukan oleh otoritas regulasi independen, para pemain dapat yakin bahwa setiap putaran permainan di OLXTOTO adalah adil dan transparan. Tidak hanya itu, OLXTOTO juga dikenal karena layanan pelanggan yang luar biasa. Dengan tim dukungan yang ramah dan responsif, para pemain dapat yakin bahwa setiap pertanyaan atau masalah mereka akan ditangani dengan cepat dan efisien. Dengan semua fitur dan keunggulan yang ditawarkannya, tidak mengherankan bahwa OLXTOTO telah menjadi platform pilihan bagi para penjudi online yang mencari kemenangan maksimal dan hasil terbaik. Jadi, jika Anda ingin bergabung dengan jutaan pemain yang telah merasakan keajaiban OLXTOTO, jangan ragu untuk mendaftar dan mulai bermain hari ini!  
    • OLXTOTO adalah bandar slot yang terkenal dan terpercaya di Indonesia. Mereka menawarkan berbagai jenis permainan slot yang menarik dan menghibur. Dengan tampilan yang menarik dan grafis yang berkualitas tinggi, pemain akan merasa seperti berada di kasino sungguhan. OLXTOTO juga menyediakan layanan pelanggan yang ramah dan responsif, siap membantu pemain dengan segala pertanyaan atau masalah yang mereka hadapi. Daftar =  https://surkale.me/Olxtotodotcom1
    • DAFTAR & LOGIN BIGO4D   Bigo4D adalah situs slot online yang populer dan menarik perhatian banyak pemain slot di Indonesia. Dengan berbagai game slot yang unik dan menarik, Bigo4D menjadi tempat yang ideal untuk pemula dan pahlawan slot yang berpengalaman. Dalam artikel ini, kami akan membahas tentang Bigo4D sebagai situs slot terbesar dan menarik yang saat ini banyak dijajaki oleh pemain slot online.
    • DAFTAR & LOGIN BIGO4D Bigo4D adalah situs togel online yang menjadi pilihan banyak pemain di Indonesia. Dengan berbagai keunggulan yang dimilikinya, Bigo4D mampu menjadi situs togel terbesar di pasaran saat ini. Dalam artikel ini, kami akan membahas secara lengkap tentang Bigo4d dan alasan-alasannya menjadi situs togel favorit banyak pemain.
  • Topics

×
×
  • Create New...

Important Information

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