Your First LabyMod 4 Addon (2024)

All you need to do to start your Addon is done. You should be able to start your Addon with LabyMod 4 right after you've imported the Gradle project, but there are a few things left that you shouldn't forget.

To name a few of them:

  • Basic Information: not only those who will test your Addon would benefit from providing some information, but we do too. Some information is crucial to guarantee a seamless experience
  • Understanding the Example: you could start with coding stuff for your Addon, but we've written an example addon to show you the basics of how LabyMod 4 addons work.

Provide information about your Addon

Head inside the build.gradle.kts and search for the block called labyMod.
Inside this block is an assignment to the field defaultPackageName, change the assigned value to the main package you're using in all modules (for example net.labymod.addons.voicechat). This allows us to generate important files to the right package.
Now search for the addonInfo segment and edit the following fields:

  • namespace: this attribute has to be unique for everything to work without complications. If you want to publish your Addon, we will check if this namespace is already taken by any other published addon, so nothing to worry about
  • displayName: the display name users will see when they view their installed addons
  • author: the name of your organization or you
  • description: a description that fits your Addon
  • minecraftVersion: the version combatibility of the addon

After you have changed these attributes, reload the Gradle project, and you're good to go.

Understanding the Basics

Head to core/src/main/java in your root project folder. You'll find some examples, starting with the main addon class: ExampleAddon.

The Main Class

The most important thing about the main addon class is the AddonMain annotation. This annotation allows us to automatically generate the addon.json, basically the identifier of your Addon. That means without this file, LabyMod can't recognize your Addon, and thus it won't start.

Now there are two ways to use this main class:

  • With a Superclass that handles the necessary stuff for you (this is what we used in the example)
  • Without anything in the background. Just a bare class, you have to handle almost everything yourself (logic-wise)

The Main with the Superclass

We've written a Superclass for an easier and more convenient way to develop addons. By inheriting the class LabyAddon, everything is more straightforward. All you have to do is specify your configuration class (in our example, the class ExampleConfiguration, but more about that later) in 3 different places (the parts you need to replace are written in CAPS):

  1. after declaring your main class by appending extends LabyAddon<CONFIGURATION>. After doing that, your IDE should either mark the other two places as errors or replace them automatically, but we'll show you anyhow
  2. in the head of the getter configurationClass by changing it to Class<CONFIGURATION>
  3. in the body of the same getter configuraionClass by changing the returned value to CONFIGURATION.class

Looking at the method enable, you'll see we used a method called registerSettingCategory. This method registers a new category in the LabyMod Settings, allowing users to enable/disable or configure other things regarding your Addon.

Registering commands and listeners can be done by calling registerListener and registerCommand and providing the already initialized object.

Now the final method we called here is this.logger(), a logger to print information to the console/log. This is nicer than System.out.println() because it is integrated with the Minecraft log. You can print information with .info(), warnings with .warn() or errors with .error().

The Main without the Superclass

As already mentioned, you can inherit the class LabyAddon, but you can also do it without it.

Important Note

While this is possible, we highly recommend creating Addons with our LabyAddon class as it implements some things that make creating addons easier, especially for beginners.

This section stays empty for now, it would take too long to describe it, and we have an easier way.

The Configuration

Now navigate to the class ExampleConfiguration. You'll see that this class inherits AddonConfig. This is necessary for the main configuration, as it requires you to inherit the enabled ConfigProperty.

Looking at the class body, you will find a field called enabled with the SwitchSetting annotation.The annotation declares the Widget that you'll find in your settings. In this case, the Widget is a SwitchSettingWidget, which toggles a boolean between on and off.

You can find more about configurations here.

The Listener

Looking into the package org.example.core.listener, you'll find the class ExampleGameTickListener; it does what it says. It listens to the GameTickListener event. You can find a complete guide to our eventshere.

First, we declared a field with our addon main class as type. Then we created a constructor with our main class instance as a parameter.

Basically, what this class does is, as already mentioned, listen to the GameTickEvent, which is called twice every tick (first one with phase PRE & the second one with phase POST). In this case, we only listen to the PRE phase because we only want the rest called once.Inside the event, we access the field with our addon main instance; with this instance, we are gaining access to the logger we mentioned a few sections above and printing if the Addon is enabled or disabled.

The Command

With the LabyMod 4 API, you can add your own commands with a simple-to-use command system. More on how to create own commands here.

What we do in this class is as simple and basic as the command system in general. We are inheriting the class Command, creating the constructor of our class, and calling the constructor of the superclass with the main prefix of the command (in our case, ping) and the aliases (in this case, just pong).

Now to the execute method. It is called when, as the name says, the command is executed, and we can handle it.

FINISH AFTER THE COMMAND SYSTEM IS FINISHED

The Internationalization File

Go to the module called core and then navigate down to src/main/resources/assets/example/i18n/ (the example folder has to be named after the namespace you set in your build.gradle.kts) and you should see a file with the name en_us.json. This is the default file for internationalization, as English is the default language. To dive deeper in the internationalization of LabyMod go to this article.

First, we created a new JSON Object called settings, which implies that the following lines are for the settings; after that, we created another Json Object called example, this has to reflect the namespace that you set in your build.gradle.kts. In said Json Object we declared a String with the key name; this ends up being the name of the Addon, which you'll see on the category button linking to the settings of your Addon in the LabyMod Settings. Now we created another JSON Object with the key enabled, as this is the name of the field in our configuration; you will find another String with the key name. This is the name of the Setting Widget enabled.

Your First LabyMod 4 Addon (2024)

FAQs

How to add mods on LabyMod 4? ›

Click on the desired version and select the modloader (Fabric/Forge). Once you've created the modpack, navigate to either the Fabric or Forge Mods tab depending on which modloader and Minecraft version you want to play on. You can also add LabyMod addons to your modpack through its own tab.

Is the LabyMod launcher safe? ›

Description. LabyMod 4 Launcher is detected as a malicious program by Bitdenfender and as a dangerous program by Microsoft Defender.

Does LabyMod have Optifine? ›

Optifine & Shaders

Another important addon that many have asked for is Optifine. We are pleased to announce that Optifine, including shaders, is now available with LabyMod 4.

Do you need to buy Minecraft to use LabyMod? ›

After installing the LabyMod Launcher, you can start LabyMod 4 with your desired Minecraft version. You need an official Minecraft: Java Edition account to use LabyMod!

Is LabyMod bannable? ›

If you got banned by watchdog for cheating and you were only using labymod, then labymod is bannable.

Is LabyMod cracked? ›

LABYMOD: Labymod was not meant to be a cracked client, but it works very well with tlauncher. The mods are great and it is very popular.

Is LabyMod legal in Hypixel? ›

Dedicated Member

Labymod is use at your own risk just like other people have mentioned above. You may use Badlion Client which is a Hypixel Certified Client, meaning it's completely allowed.

Is LabyMod a hack client? ›

Labymod has had a number of really serious issues in the past, including stealing your session token and acting like a hack client. As of now, I don't think anyone's getting banned using it, but no promises for the future. I would avoid it like the plague, and find other mods with the same features.

Does LabyMod boost FPS? ›

Description. I discovered labymod because of its reputation for being a client that increases fps and makes your gameplay smoother. But labymod 4, compared to labymod 3, doesn't come close in terms of fps. labymod 3 is far superior for stable gameplay.

Is Optifine banned on Hypixel? ›

is it safe on hypixel? yes.

Does LabyMod have AntiCheat? ›

Shadow (AntiCheat) - LabyMod developer documentation.

Which is better LabyMod or Lunar? ›

Lunar client lags all of the time for me, whereas with LabyMod I get over 100 fps when i normally get around 60. Allocate more or less ram (I can allocate 8gb of ram but I only have 4gb this is possible thanks to virtual memory, but if I allocate 3gb and turn virtual memory off i get better overall performance).

Can you play 1.19 on LabyMod? ›

LabyMod 4 supports every new Minecraft version within a few minutes and therefore we also offer Minecraft 1.19.

Is LabyMod client free? ›

Now available for free - for everyone! Is LabyMod a hack client now? No!

Does LabyMod use fabric? ›

We have now also released a Fabric Loader Addon! This allows you to use Fabric mods together with LabyMod 4. To view and configure the mods, you can use Mod Menu, which can be opened directly from the LabyMod settings.

How do you add custom mods to Sims 4? ›

How to install mods and CC on Windows
  1. Download your mod or CC of choice.
  2. Unzip the download, if it's a .rar or .zip file.
  3. Move the unzipped files to the mods folder. ...
  4. Open The Sims 4.
  5. Open the options, and then select the “game options” tab.
  6. Select the “other” tab.
  7. Make sure “enable custom content and mods” is checked.
Oct 10, 2021

Can you use other mods with LabyMod? ›

Use all your favorite mods easily together with LabyMod! Stay connected with your friends using the LabyMod chat! We added a server independent chat to Minecraft, so you can find your friends and communicate with other players anywhere and at any time.

How do I add custom mods to Fallout 4? ›

Open Fallout 4 and select Mods from the main menu. Find the mod you wish to install. You can also add mods from the Bethesda.net site here and select the "Add to Library" option. Make sure to read description of the mod to verify if it has load order requirements.

How do I add custom mods? ›

Adding Mods

Hover over your Forge installation, then press the Open Folder icon to the right. In the new window, locate or create the mods folder, then enter it. Paste the mod .jar file(s) from earlier into this location. Once done, return to the MC launcher and press Play .

References

Top Articles
Spaghetti Aglio e Olio ( Stove top | Instant Pot) - Sandhya's Kitchen
Spaghetti with Olive Oil and Garlic (Aglio e Olio)
11 beste sites voor Word-labelsjablonen (2024) [GRATIS]
$4,500,000 - 645 Matanzas CT, Fort Myers Beach, FL, 33931, William Raveis Real Estate, Mortgage, and Insurance
Christian McCaffrey loses fumble to open Super Bowl LVIII
Bleak Faith: Forsaken – im Test (PS5)
Zabor Funeral Home Inc
Http://N14.Ultipro.com
Do you need a masters to work in private equity?
Fnv Turbo
Weather In Moon Township 10 Days
Toonily The Carry
Simple Steamed Purple Sweet Potatoes
Hmr Properties
David Turner Evangelist Net Worth
Pretend Newlyweds Nikubou Maranoshin
TBM 910 | Turboprop Aircraft - DAHER TBM 960, TBM 910
ABCproxy | World-Leading Provider of Residential IP Proxies
Morristown Daily Record Obituary
What Channel Is Court Tv On Verizon Fios
Www.craigslist.com Savannah Ga
Sussyclassroom
Sunset Time November 5 2022
LCS Saturday: Both Phillies and Astros one game from World Series
Aliciabibs
Cb2 South Coast Plaza
The Banshees Of Inisherin Showtimes Near Broadway Metro
Generator Supercenter Heartland
My Dog Ate A 5Mg Flexeril
Ugly Daughter From Grown Ups
Tas Restaurant Fall River Ma
Ni Hao Kai Lan Rule 34
Appraisalport Com Dashboard /# Orders
Property Skipper Bermuda
Pokemon Reborn Locations
1v1.LOL Game [Unblocked] | Play Online
Saline Inmate Roster
Jamesbonchai
Luciane Buchanan Bio, Wiki, Age, Husband, Net Worth, Actress
Foxxequeen
فیلم گارد ساحلی زیرنویس فارسی بدون سانسور تاینی موویز
Does Target Have Slime Lickers
Why Are The French So Google Feud Answers
Cleveland Save 25% - Lighthouse Immersive Studios | Buy Tickets
Iman Fashion Clearance
Tyco Forums
Devotion Showtimes Near Showplace Icon At Valley Fair
2000 Ford F-150 for sale - Scottsdale, AZ - craigslist
Ronnie Mcnu*t Uncensored
Nfsd Web Portal
Buildapc Deals
Nkey rollover - Hitta bästa priset på Prisjakt
Latest Posts
Article information

Author: Barbera Armstrong

Last Updated:

Views: 5343

Rating: 4.9 / 5 (59 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Barbera Armstrong

Birthday: 1992-09-12

Address: Suite 993 99852 Daugherty Causeway, Ritchiehaven, VT 49630

Phone: +5026838435397

Job: National Engineer

Hobby: Listening to music, Board games, Photography, Ice skating, LARPing, Kite flying, Rugby

Introduction: My name is Barbera Armstrong, I am a lovely, delightful, cooperative, funny, enchanting, vivacious, tender person who loves writing and wants to share my knowledge and understanding with you.