當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。