/**
* Basic version checker, support having different build number on each side
* @param mods the data sent from FML handshake packet
* @param remoteParty the side that sent this data
* @return true if we allow this to run
*/
@NetworkCheckHandler
public boolean checkRemote(Map<String,String> mods, Side remoteParty){
if(mods.containsKey(MODID)){
String remoteVersion = mods.get(MODID);
if(remoteVersion!=null) {
String internalVersion = FMLCommonHandler.instance().findContainerFor(this).getVersion();
if(remoteVersion.equals(internalVersion))
return true;
else{
internalVersion = internalVersion.substring(0, internalVersion.lastIndexOf("."));
remoteVersion = remoteVersion.substring(0, remoteVersion.lastIndexOf("."));
return remoteVersion.equals(internalVersion);
}
}
}
return false;
}
Battlegear.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:Battlegear2
作者:
评论列表
文章目录