Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package dev.mff.modtutorial; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import net.minecraftforge.fml.common.Mod; | ||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; | ||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; | ||
import net.minecraftforge.fml.event.lifecycle.FMLDedicatedServerSetupEvent; | ||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; | ||
|
||
@Mod(ModTutorial.MOD_ID) | ||
public class ModTutorial { | ||
|
||
// la constante avec l'identifiant du mod | ||
public static final String MOD_ID = "modtutorial"; | ||
|
||
// le logger du mod | ||
public static final Logger LOGGER = LogManager.getLogger(MOD_ID); | ||
|
||
// constructeur de la classe principale, on enregistre ici nos events | ||
public ModTutorial() { | ||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); | ||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientSetup); | ||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::serverSetup); | ||
} | ||
|
||
private void setup(final FMLCommonSetupEvent event) { | ||
LOGGER.info("Mod tutorial setup"); | ||
} | ||
|
||
private void clientSetup(final FMLClientSetupEvent event) { | ||
LOGGER.info("Mod tutorial client setup"); | ||
} | ||
|
||
private void serverSetup(final FMLDedicatedServerSetupEvent event) { | ||
LOGGER.info("Mod tutorial server setup"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
modLoader="javafml" | ||
loaderVersion="[25,)" | ||
#issueTrackerURL="" | ||
|
||
[[mods]] | ||
modId="modtutorial" | ||
version="${file.jarVersion}" | ||
displayName="Mod Tutorial" | ||
#updateJSONURL="" | ||
displayURL="https://www.minecraftforgefrance.fr/" | ||
#logoFile="examplemod.png" | ||
credits="Thanks to the mff staff" | ||
authors="robin4002, superloup10, brokenswing, elias54" | ||
description=''' | ||
A mod to explain to other people how to make a mod | ||
''' | ||
|
||
[[dependencies.modtutorial]] #optional | ||
modId="forge" | ||
mandatory=true | ||
versionRange="[25,)" | ||
ordering="NONE" | ||
side="BOTH" | ||
[[dependencies.modtutorial]] | ||
modId="minecraft" | ||
mandatory=true | ||
versionRange="[1.13.2]" | ||
ordering="NONE" | ||
side="BOTH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"pack": { | ||
"description": "examplemod resources", | ||
"pack_format": 4, | ||
"_comment": "A pack_format of 4 requires json lang files. Note: we require v4 pack meta for all mods." | ||
} | ||
} |