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


Java World.getMapStorage方法代码示例

本文整理汇总了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;
}
 
开发者ID:Randores,项目名称:Randores2,代码行数:11,代码来源:RandoresWorldData.java

示例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;
}
 
开发者ID:ArekkuusuJerii,项目名称:Solar,代码行数:13,代码来源:WorldMonolithData.java

示例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;
}
 
开发者ID:ArekkuusuJerii,项目名称:Solar,代码行数:11,代码来源:WorldQuantumData.java

示例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;
}
 
开发者ID:stuebz88,项目名称:modName,代码行数:16,代码来源:TileList.java

示例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;
}
 
开发者ID:stuebz88,项目名称:modName,代码行数:16,代码来源:WorldTurn.java

示例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;
}
 
开发者ID:stuebz88,项目名称:modName,代码行数:16,代码来源:EmpireList.java

示例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;
}
 
开发者ID:Lumaceon,项目名称:CraftingParadiseMod,代码行数:14,代码来源:CraftingParadiseSaveData.java

示例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;
}
 
开发者ID:Randores,项目名称:Randores2,代码行数:5,代码来源:RandoresWorldData.java


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