Skip to content

Commit

Permalink
Force client and server to have matching versions
Browse files Browse the repository at this point in the history
  • Loading branch information
mDiyo committed Aug 2, 2014
1 parent cb51f1e commit 8d2e3cc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main/java/tconstruct/TConstruct.java
@@ -1,5 +1,6 @@
package tconstruct;

import java.util.Map;
import java.util.Random;

import mantle.pulsar.config.ForgeCFG;
Expand Down Expand Up @@ -43,6 +44,7 @@
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkCheckHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.VillagerRegistry;
Expand All @@ -55,10 +57,11 @@
* @author mDiyo
*/

@Mod(modid = "TConstruct", name = "TConstruct", version = "${version}",
@Mod(modid = "TConstruct", name = "TConstruct", version = "1.6.0d37",
dependencies = "required-after:Forge@[10.13,);required-after:Mantle;after:MineFactoryReloaded;after:NotEnoughItems;after:Waila;after:ThermalExpansion")
public class TConstruct
{
public static final String modVersion = "1.6.0d37";
/** The value of one ingot in millibuckets */
public static final int ingotLiquidValue = 144;
public static final int oreLiquidValue = ingotLiquidValue * 2;
Expand Down Expand Up @@ -97,6 +100,13 @@ public TConstruct()
EnvironmentChecks.verifyEnvironmentSanity();
}

//Force the client and server to have or not have this mod
@NetworkCheckHandler()
public boolean matchModVersions (Map<String, String> remoteVersions, Side side)
{
return remoteVersions.containsKey("TConstruct") && modVersion.equals(remoteVersions.get("TConstruct"));
}

@EventHandler
public void preInit (FMLPreInitializationEvent event)
{
Expand Down

0 comments on commit 8d2e3cc

Please sign in to comment.