-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from EpimorphicPioneers/update
Update MonoLib
- Loading branch information
Showing
13 changed files
with
94 additions
and
125 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
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
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
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 |
---|---|---|
@@ -1,16 +1,22 @@ | ||
package com.example.examplemod; | ||
|
||
import com.epimorphismmc.monomorphism.MOGTAddon; | ||
|
||
import com.gregtechceu.gtceu.api.addon.GTAddon; | ||
import com.gregtechceu.gtceu.api.addon.IGTAddon; | ||
import com.gregtechceu.gtceu.api.registry.registrate.GTRegistrate; | ||
|
||
@GTAddon | ||
public class ExampleGTAddon extends MOGTAddon { | ||
public class ExampleGTAddon implements IGTAddon { | ||
|
||
public ExampleGTAddon() { | ||
super(ExampleMod.MODID); | ||
@Override | ||
public GTRegistrate getRegistrate() { | ||
return ExampleMod.REGISTRATE; | ||
} | ||
|
||
@Override | ||
public void initializeAddon() {} | ||
|
||
@Override | ||
public String addonModId() { | ||
return ExampleMod.MODID; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,88 +1,29 @@ | ||
package com.example.examplemod; | ||
|
||
import com.example.examplemod.client.ClientProxy; | ||
import com.example.examplemod.common.CommonProxy; | ||
import com.example.examplemod.config.ExampleConfigHolder; | ||
import com.example.examplemod.data.ExampleLangHandler; | ||
|
||
import com.epimorphismmc.monomorphism.MOMod; | ||
import com.epimorphismmc.monomorphism.datagen.MOProviderTypes; | ||
import com.epimorphismmc.monomorphism.registry.registrate.MORegistrate; | ||
import com.epimorphismmc.monomorphism.integration.registrate.MORegistrate; | ||
import com.epimorphismmc.monomorphism.utility.DistLogger; | ||
|
||
import com.gregtechceu.gtceu.utils.FormattingUtil; | ||
|
||
import com.lowdragmc.lowdraglib.networking.INetworking; | ||
|
||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraftforge.api.distmarker.Dist; | ||
import net.minecraftforge.api.distmarker.OnlyIn; | ||
import net.minecraftforge.fml.common.Mod; | ||
|
||
import org.slf4j.Logger; | ||
|
||
// The value here should match an entry in the META-INF/mods.toml file | ||
@Mod(ExampleMod.MODID) | ||
public class ExampleMod extends MOMod<CommonProxy> { | ||
public interface ExampleMod { | ||
// Define mod id in a common place for everything to reference | ||
public static final String MODID = "examplemod"; | ||
public static final String NAME = "Example Mod"; | ||
|
||
public static ExampleMod instance; | ||
|
||
public ExampleMod() { | ||
super(); | ||
} | ||
String MODID = "examplemod"; | ||
|
||
@Override | ||
public String getModId() { | ||
return MODID; | ||
} | ||
|
||
@Override | ||
public String getModName() { | ||
return NAME; | ||
} | ||
|
||
@Override | ||
protected void onModConstructed() { | ||
instance = this; | ||
ExampleConfigHolder.init(); | ||
} | ||
String NAME = "Example Mod"; | ||
|
||
@Override | ||
@OnlyIn(Dist.CLIENT) | ||
protected CommonProxy createClientProxy() { | ||
return new ClientProxy(); | ||
} | ||
Logger LOGGER = new DistLogger(NAME); | ||
|
||
@Override | ||
@OnlyIn(Dist.DEDICATED_SERVER) | ||
protected CommonProxy createServerProxy() { | ||
return new CommonProxy(); | ||
} | ||
MORegistrate REGISTRATE = MORegistrate.create(MODID); | ||
|
||
@Override | ||
public void addDataGenerator(MORegistrate registrate) { | ||
registrate.addDataGenerator(MOProviderTypes.MO_LANG, ExampleLangHandler::init); | ||
static ExampleMod instance() { | ||
return ExampleModCommon.instance; | ||
} | ||
|
||
public static ResourceLocation id(String path) { | ||
static ResourceLocation id(String path) { | ||
return new ResourceLocation(MODID, FormattingUtil.toLowerCaseUnder(path)); | ||
} | ||
|
||
public static Logger logger() { | ||
return instance.getLogger(); | ||
} | ||
|
||
public static CommonProxy proxy() { | ||
return instance.getProxy(); | ||
} | ||
|
||
public static MORegistrate registrate() { | ||
return instance.getRegistrate(); | ||
} | ||
|
||
public static INetworking network() { | ||
return instance.getNetwork(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/example/examplemod/ExampleModBootstrap.java
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,14 @@ | ||
package com.example.examplemod; | ||
|
||
import com.example.examplemod.client.ExampleModClient; | ||
|
||
import net.minecraftforge.fml.DistExecutor; | ||
import net.minecraftforge.fml.common.Mod; | ||
|
||
// The value here should match an entry in the META-INF/mods.toml file | ||
@Mod(ExampleModCommon.MODID) | ||
public class ExampleModBootstrap { | ||
public ExampleModBootstrap() { | ||
DistExecutor.unsafeRunForDist(() -> ExampleModClient::new, () -> ExampleModServer::new); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/example/examplemod/ExampleModCommon.java
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,20 @@ | ||
package com.example.examplemod; | ||
|
||
import com.example.examplemod.config.ExampleConfigHolder; | ||
import com.example.examplemod.data.ExampleLangHandler; | ||
|
||
import com.epimorphismmc.monomorphism.integration.registrate.providers.MOProviderTypes; | ||
|
||
public class ExampleModCommon implements ExampleMod { | ||
|
||
public static ExampleModCommon instance; | ||
|
||
public ExampleModCommon() { | ||
super(); | ||
instance = this; | ||
ExampleConfigHolder.init(); | ||
REGISTRATE.addDataGenerator(MOProviderTypes.MO_LANG, ExampleLangHandler::init); | ||
|
||
LOGGER.info("ExampleMod's Initialization Completed!"); | ||
} | ||
} |
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,8 @@ | ||
package com.example.examplemod; | ||
|
||
public class ExampleModServer extends ExampleModCommon { | ||
|
||
public ExampleModServer() { | ||
super(); | ||
} | ||
} |
15 changes: 0 additions & 15 deletions
15
src/main/java/com/example/examplemod/client/ClientProxy.java
This file was deleted.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
src/main/java/com/example/examplemod/client/ExampleModClient.java
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,13 @@ | ||
package com.example.examplemod.client; | ||
|
||
import com.example.examplemod.ExampleModCommon; | ||
|
||
import net.minecraftforge.api.distmarker.Dist; | ||
import net.minecraftforge.api.distmarker.OnlyIn; | ||
|
||
@OnlyIn(Dist.CLIENT) | ||
public class ExampleModClient extends ExampleModCommon { | ||
public ExampleModClient() { | ||
super(); | ||
} | ||
} |
18 changes: 0 additions & 18 deletions
18
src/main/java/com/example/examplemod/common/CommonProxy.java
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
src/main/java/com/example/examplemod/config/ExampleConfigHolder.java
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
2 changes: 1 addition & 1 deletion
2
src/main/java/com/example/examplemod/data/ExampleLangHandler.java
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