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


Java DataGroup.getString方法代码示例

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


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

示例1: readPlayer

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
public Player readPlayer(UUID uuid, ClientIdentifier clientIdentifier) {
	if (fileHandle == null)
		return null;
	FileHandle folder = folderPlayer();
	FileHandle file = folder.child(uuid.toString());
	if (!file.exists())
		return null;
	try {
		DataGroup data = (DataGroup) Data.input(file.file());
		Player player = new Player(data.getString("username"), uuid, clientIdentifier);
		player.read(data);
		return player;
	} catch (Exception e) {
		Log.warning("Failed to read player", e);
		return null;
	}
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:18,代码来源:Save.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: 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

示例4: read

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup data) {
	this.position.set(VectorUtil.array(data.getArray("pos", Float.class)));
	this.motion.set(VectorUtil.array(data.getArray("motion", Float.class)));
	this.angle.set(VectorUtil.array(data.getArray("ang", Float.class)));
	this.uuid = (UUID) data.get("uuid");
	if (!this.id.equals(data.getString("id")))
		throw new IllegalArgumentException(this.id + "!=" + data.getString("id"));
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:10,代码来源:Entity.java

示例5: readPlayer

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
public Player readPlayer(UUID uuid, ClientIdentifier clientIdentifier) {
  if (fileHandle == null) return null;
  FileHandle folder = folderPlayer();
  FileHandle file = folder.child(uuid.toString());
  if (!file.exists()) return null;
  try {
    DataGroup data = (DataGroup) Data.input(file.file());
    Player player = new Player(data.getString("username"), uuid, clientIdentifier);
    player.read(data);
    return player;
  } catch (Exception e) {
    Log.warning("Failed to read player", e);
    return null;
  }
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:16,代码来源:Save.java

示例6: read

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup data) {
  this.position.set(VectorUtil.array(data.getArray("pos", Float.class)));
  this.motion.set(VectorUtil.array(data.getArray("motion", Float.class)));
  this.angle.set(VectorUtil.array(data.getArray("ang", Float.class)));
  this.uuid = (UUID) data.get("uuid");
  if (!this.id.equals(data.getString("id")))
    throw new IllegalArgumentException(this.id + "!=" + data.getString("id"));
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:10,代码来源:Entity.java

示例7: read

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup dataGroup) {
  uuid = (UUID) dataGroup.get("uuid");
  usname = dataGroup.getString("username");
  renderDistance = dataGroup.getInteger("renderDistance");
}
 
开发者ID:RedTroop,项目名称:Cubes_2,代码行数:7,代码来源:PacketConnect.java

示例8: read

import ethanjones.data.DataGroup; //导入方法依赖的package包/类
@Override
public void read(DataGroup dataGroup) {
  uuid = (UUID) dataGroup.get("uuid");
  username = dataGroup.getString("username");
  renderDistance = dataGroup.getInteger("renderDistance");
}
 
开发者ID:RedTroop,项目名称:Cubes,代码行数:7,代码来源:PacketConnect.java


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