Introduction and Setup - Swackyy/Ohmega GitHub Wiki
About the mod
The mod was created because other accessory mods felt lacking of features or didn't feel "vanilla" much. Ohmega aims to be the API to fix that; for newer versions of Minecraft, being constantly renovated with new, exciting features which don't break mod functionality and the mod's style.
Accessories were made to be easily implemented and to have a broad range of built-in functionality, such as the key-bind system which can be optionally used for the higher-end accessories.
Using the API
The API is open source and even-though it is de-obfuscated during development, it loses the commenting left on most essential API functions. You can visit the. You can see all of the open source API code here.
For a general rule of thumb, knowing Java or at least the core mechanics of it and the Forge API is recommended for building any mod, but using an API means that a lot of functionality has been created by others for your free use. Do not think that this means that using the API is easy and doesn't require Java knowledge. This Wiki is tailored to those with at least an intermediate understanding of Java and Forge.
Adding the mod as a dependency
Adding the mod as a dependency is simple and uses a curse maven. Documentation on how to do this is here. The project ID is 889368 by the way however your developer environment file will need to be chosen from here
This however does not add it as a dependency and just lets you create your mod with the API loaded as well, with its files free to use. To add it as a dependency, navigate to your src/main/resources/META-INF/mods.toml
file (this is the usual location) and it will most likely look like this (after formatting):
loaderVersion="[38,)" #mandatory
license="All rights reserved"
[mods](/Swackyy/Ohmega/wiki/mods) #mandatory
modId="ohmega" #mandatory
version="${file.jarVersion}" #mandatory
displayName="Ohmega" #mandatory
logoFile="ohmega.png" #optional
credits="" #optional
authors="Developer: Swacky_" #optional
description='''
A modernized and lightweight accessories mod for Minecraft
For API usage and reference code info, visit https://github.com/Swackyy/ohmega and view the readme.md file
'''
[dependencies.ohmega](/Swackyy/Ohmega/wiki/dependencies.ohmega)
modId="forge"
mandatory=true
versionRange="[38,)"
ordering="NONE"
side="BOTH"
[dependencies.ohmega](/Swackyy/Ohmega/wiki/dependencies.ohmega)
modId="minecraft"
mandatory=true
versionRange="[1.18,1.19)"
ordering="NONE"
side="BOTH"
This is Ohmega's mods.toml
as the example.
To add a dependency, go to your last dependency, in this case it is for Minecraft, and paste this:
[dependencies.modid](/Swackyy/Ohmega/wiki/dependencies.modid)
modId="ohmega"
mandatory=true
versionRange="[1.0]"
ordering="NONE"
side="BOTH"
Switch out the mod ID for yours and the version range for what you need, but for this it will be just 1.0 meaning it will be [1.0] in square brackets.
This makes it mandatory for Ohmega to be present when running your own mod, otherwise Forge will not load and display an error.