Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more accepting; also stop using Tags for modid/name #27

Merged
merged 3 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ developmentEnvironmentUserName = Developer
# version in @Mod([...], version = VERSION, [...])
# Leave these properties empty to skip individual token replacements
replaceGradleTokenInFile = Tags.java
gradleTokenModId = GRADLETOKEN_MODID
gradleTokenModName = GRADLETOKEN_MODNAME
gradleTokenModId =
gradleTokenModName =
gradleTokenVersion = GRADLETOKEN_VERSION
gradleTokenGroupName = GRADLETOKEN_GROUPNAME
gradleTokenGroupName =

# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
Expand Down
14 changes: 11 additions & 3 deletions src/main/java/com/gtnewhorizon/gtnhlib/GTNHLib.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.*;

@Mod(modid = Tags.MODID, version = Tags.VERSION, name = Tags.MODNAME, acceptedMinecraftVersions = "[1.7.10]")
@Mod(
modid = GTNHLib.MODID,
version = Tags.VERSION,
name = GTNHLib.MODNAME,
acceptedMinecraftVersions = "[1.7.10]",
acceptableRemoteVersions = "[0.0.13,)")
public class GTNHLib {

private static final Logger LOG = LogManager.getLogger(Tags.MODID);
public static final String MODID = "gtnhlib";
public static final String MODNAME = "GTNH Lib";
public static final String GROUPNAME = "com.gtnewhorizon.gtnhlib";
private static final Logger LOG = LogManager.getLogger(GTNHLib.MODID);

@SidedProxy(clientSide = Tags.GROUPNAME + ".ClientProxy", serverSide = Tags.GROUPNAME + ".CommonProxy")
@SidedProxy(clientSide = GTNHLib.GROUPNAME + ".ClientProxy", serverSide = GTNHLib.GROUPNAME + ".CommonProxy")
public static CommonProxy proxy;

@Mod.EventHandler
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/gtnewhorizon/gtnhlib/Tags.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,5 @@
public class Tags {

// GRADLETOKEN_* will be replaced by your configuration values at build time
public static final String MODID = "GRADLETOKEN_MODID";
public static final String MODNAME = "GRADLETOKEN_MODNAME";
public static final String VERSION = "GRADLETOKEN_VERSION";
public static final String GROUPNAME = "GRADLETOKEN_GROUPNAME";
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.gtnewhorizon.gtnhlib.network;

import com.gtnewhorizon.gtnhlib.Tags;
import com.gtnewhorizon.gtnhlib.GTNHLib;

import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import cpw.mods.fml.relauncher.Side;

public class NetworkHandler {

public static final SimpleNetworkWrapper instance = NetworkRegistry.INSTANCE.newSimpleChannel(Tags.MODID);
public static final SimpleNetworkWrapper instance = NetworkRegistry.INSTANCE.newSimpleChannel(GTNHLib.MODID);

public static void init() {
instance.registerMessage(
Expand Down
Loading