本文整理匯總了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;
}