Addon Documentation - MigaMiDev/Just-Enough-Guns GitHub Wiki

Creating an Addon for JEG may seem confusing, but it's somewhat simple! This guide will go over the steps to creating an Addon, and adding your own Guns!

IMPORTANT NOTE! This Guide does not go over how to set up a Mod itself, there are Videos on how to do that already.

Setting up the Dependencies!

The thing that makes an Addon, an Addon are the Dependencies!

Inside of your "build.gradle" file, under the dependencies section add:

implementation fg.deobf('curse.maven:framework-549225:5911986')
implementation fg.deobf('curse.maven:just-enough-guns-820727:6405150')
implementation fg.deobf('curse.maven:geckolib-388172:6333474')

Inside of your "mods.toml" file, add in the following:

[dependencies.modid](/MigaMiDev/Just-Enough-Guns/wiki/dependencies.modid)
modId="jeg"
mandatory=true
versionRange="[0.12.0,)"
ordering="NONE"
side="BOTH"

[dependencies.modid](/MigaMiDev/Just-Enough-Guns/wiki/dependencies.modid)
modId="framework"
mandatory=true
versionRange="[0.7.12,)"
ordering="NONE"
side="BOTH"

[dependencies.modid](/MigaMiDev/Just-Enough-Guns/wiki/dependencies.modid)
modId="geckolib"
mandatory=true
versionRange="[4.7,)"
ordering="NONE"
side="BOTH"

Adding in a Gun!

After you add in the correct dependencies, and reload the gradle, you are set to start adding Guns!

In your ModItems Class, this is how you register a Gun:

public static final RegistryObject<AnimatedGunItem> HYPERSONIC_CANNON = REGISTER.register("hypersonic_cannon",
        () -> new AnimatedMakeshiftGunItem(new Item.Properties()
                .stacksTo(1)
                .durability(100)
                .rarity(Rarity.EPIC),
                "hypersonic_cannon",
                ModSounds.HYPERSONIC_CANNON_CHARGE.get(), SoundEvents.ITEM_PICKUP, SoundEvents.ITEM_FRAME_REMOVE_ITEM, 
ModSounds.AR_EJECTOR_PULL.get(), ModSounds.AR_EJECTOR_RELEASE.get()
        ));

Gun Assets!

Your Model File (gunname.geo.json) will go into the directory of:

assets/modid/geo/item/gun/

Your Animations File will go into the directory of:

assets/modid/animations/item/

Your Textures File will go into the directory of:

assets/modid/textures/animated/gun/