当前位置: 首页>>代码示例>>Java>>正文


Java DataGroup.getGroup方法代码示例

本文整理汇总了Java中ethanjones.data.DataGroup.getGroup方法的典型用法代码示例。如果您正苦于以下问题:Java DataGroup.getGroup方法的具体用法?Java DataGroup.getGroup怎么用?Java DataGroup.getGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ethanjones.data.DataGroup的用法示例。


在下文中一共展示了DataGroup.getGroup方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: write

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public DataGroup write() {
	DataGroup dataGroup = new DataGroup();
	dataGroup.put("saveVersion", 0);
	dataGroup.put("worldSeed", worldSeed);
	dataGroup.put("worldSeedStr", worldSeedString);
	dataGroup.put("worldTime", worldTime);
	dataGroup.put("worldType", worldType);
	dataGroup.put("worldGamemode", worldGamemode.name());
	dataGroup.put("idManager", idManager);

	dataGroup.put("lastOpenedTime", System.currentTimeMillis());

	DataGroup version = dataGroup.getGroup("lastVersion");
	version.put("major", Branding.VERSION_MAJOR);
	version.put("minor", Branding.VERSION_MINOR);
	version.put("point", Branding.VERSION_POINT);
	version.put("build", Branding.VERSION_BUILD);
	version.put("hash", Branding.VERSION_HASH);

	return dataGroup;
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:23,代码来源:SaveOptions.java

示例2: read

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup dataGroup) {
	if (dataGroup.getInteger("saveVersion") != 0)
		throw new CubesException("Invalid save version");
	worldSeed = dataGroup.getLong("worldSeed");
	worldSeedString = dataGroup.getString("worldSeedStr");
	worldTime = dataGroup.getInteger("worldTime");
	worldType = dataGroup.getString("worldType");
	worldGamemode = Gamemode.valueOf(dataGroup.getString("worldGamemode"));
	idManager = dataGroup.getGroup("idManager");

	lastOpenedTime = dataGroup.getLong("lastOpenedTime");

	DataGroup version = dataGroup.getGroup("lastVersion");
	lastVersionMajor = version.getInteger("major");
	lastVersionMinor = version.getInteger("minor");
	lastVersionPoint = version.getInteger("point");
	lastVersionBuild = version.getInteger("build");
	lastVersionHash = version.getString("hash");
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:21,代码来源:SaveOptions.java

示例3: write

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public DataGroup write() {
  DataGroup dataGroup = new DataGroup();
  dataGroup.put("saveVersion", 0);
  dataGroup.put("worldSeed", worldSeed);
  dataGroup.put("worldSeedStr", worldSeedString);
  dataGroup.put("worldTime", worldTime);
  dataGroup.put("worldType", worldType);
  dataGroup.put("worldGamemode", worldGamemode.name());
  dataGroup.put("idManager", idManager);

  dataGroup.put("lastOpenedTime", System.currentTimeMillis());

  DataGroup version = dataGroup.getGroup("lastVersion");
  version.put("major", Branding.VERSION_MAJOR);
  version.put("minor", Branding.VERSION_MINOR);
  version.put("point", Branding.VERSION_POINT);
  version.put("build", Branding.VERSION_BUILD);
  version.put("hash", Branding.VERSION_HASH);
  
  return dataGroup;
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:23,代码来源:SaveOptions.java

示例4: read

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup dataGroup) {
  if (dataGroup.getInteger("saveVersion") != 0) throw new CubesException("Invalid save version");
  worldSeed = dataGroup.getLong("worldSeed");
  worldSeedString = dataGroup.getString("worldSeedStr");
  worldTime = dataGroup.getInteger("worldTime");
  worldType = dataGroup.getString("worldType");
  worldGamemode = Gamemode.valueOf(dataGroup.getString("worldGamemode"));
  idManager = dataGroup.getGroup("idManager");

  lastOpenedTime = dataGroup.getLong("lastOpenedTime");

  DataGroup version = dataGroup.getGroup("lastVersion");
  lastVersionMajor = version.getInteger("major");
  lastVersionMinor = version.getInteger("minor");
  lastVersionPoint = version.getInteger("point");
  lastVersionBuild = version.getInteger("build");
  lastVersionHash = version.getString("hash");
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:20,代码来源:SaveOptions.java

示例5: read

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup dataGroup) {
	idManager = dataGroup.getGroup("idManager");
	player = (UUID) dataGroup.get("player");
	worldTime = dataGroup.getInteger("worldTime");
	gamemode = Gamemode.valueOf(dataGroup.getString("worldGamemode"));
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:8,代码来源:PacketConnected.java

示例6: read

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup data) {
  areaX = data.getInteger("areaX");
  areaZ = data.getInteger("areaZ");
  blockX = data.getInteger("blockX");
  blockY = data.getInteger("blockY");
  blockZ = data.getInteger("blockZ");
  dataGroup = data.getGroup("data");
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:10,代码来源:PacketBlockData.java

示例7: read

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup dataGroup) {
  idManager = dataGroup.getGroup("idManager");
  player = (UUID) dataGroup.get("player");
  worldTime = dataGroup.getInteger("worldTime");
  gamemode = Gamemode.valueOf(dataGroup.getString("worldGamemode"));
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:8,代码来源:PacketConnected.java


注:本文中的ethanjones.data.DataGroup.getGroup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。