本文整理汇总了Java中net.minecraft.world.World.getMapStorage方法的典型用法代码示例。如果您正苦于以下问题:Java World.getMapStorage方法的具体用法?Java World.getMapStorage怎么用?Java World.getMapStorage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.world.World
的用法示例。
在下文中一共展示了World.getMapStorage方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSimply
import net.minecraft.world.World; //导入方法依赖的package包/类
public static RandoresWorldData getSimply(World world) {
MapStorage storage = world.getMapStorage();
RandoresWorldData data = (RandoresWorldData) storage.getOrLoadData(RandoresWorldData.class, NAME);
if (data == null) {
data = new RandoresWorldData();
data.setSeed(genSeed(world));
storage.setData(NAME, data);
}
return data;
}
示例2: get
import net.minecraft.world.World; //导入方法依赖的package包/类
@SuppressWarnings("ConstantConditions")
public static WorldMonolithData get(World world) {
MapStorage storage = world.getMapStorage();
WorldMonolithData data = (WorldMonolithData) storage.getOrLoadData(WorldMonolithData.class, NAME);
if(data == null) {
data = new WorldMonolithData(NAME);
storage.setData(NAME, data);
}
return data;
}
示例3: get
import net.minecraft.world.World; //导入方法依赖的package包/类
public static WorldQuantumData get(World world) {
MapStorage storage = world.getMapStorage();
//noinspection ConstantConditions
WorldQuantumData data = (WorldQuantumData) storage.getOrLoadData(WorldQuantumData.class, NAME);
if(data == null) {
data = new WorldQuantumData(NAME);
storage.setData(NAME, data);
}
return data;
}
示例4: get
import net.minecraft.world.World; //导入方法依赖的package包/类
public static TileList get(World world)
{
MapStorage storage = world.getMapStorage();
TileList instance = (TileList)storage.getOrLoadData(TileList.class, DATA_NAME);
TileList.world = world;
if (instance == null)
{
System.out.println("It was null");
instance = new TileList();
storage.setData(DATA_NAME, instance);
}
return instance;
}
示例5: get
import net.minecraft.world.World; //导入方法依赖的package包/类
public static WorldTurn get(World world)
{
MapStorage storage = world.getMapStorage();
System.out.println(storage);
WorldTurn instance = (WorldTurn)storage.getOrLoadData(WorldTurn.class, DATA_NAME);
if (instance == null)
{
System.out.println("It was null");
instance = new WorldTurn();
storage.setData(DATA_NAME, instance);
}
return instance;
}
示例6: get
import net.minecraft.world.World; //导入方法依赖的package包/类
public static EmpireList get(World world)
{
EmpireList.world = world;
MapStorage storage = world.getMapStorage();
EmpireList instance = (EmpireList)storage.getOrLoadData(EmpireList.class, DATA_NAME);
if (instance == null)
{
System.out.println("It was null");
instance = new EmpireList();
storage.setData(DATA_NAME, instance);
}
return instance;
}
示例7: get
import net.minecraft.world.World; //导入方法依赖的package包/类
public static CraftingParadiseSaveData get(World world)
{
MapStorage storage = world.getMapStorage();
CraftingParadiseSaveData instance = (CraftingParadiseSaveData) storage.getOrLoadData(CraftingParadiseSaveData.class, KEY);
if(instance == null)
{
instance = new CraftingParadiseSaveData();
storage.setData(KEY, instance);
}
return instance;
}
示例8: hasData
import net.minecraft.world.World; //导入方法依赖的package包/类
public static boolean hasData(World world) {
MapStorage storage = world.getMapStorage();
return storage.getOrLoadData(RandoresWorldData.class, NAME) != null;
}