use of net.minecraft.world.storage.MapStorage in project Tale-of-Kingdoms by Ivasik78.
the class WorldProvider method get.
public static WorldProvider get(World world) {
MapStorage storage = world.mapStorage;
WorldProvider instance = (WorldProvider) storage.loadData(WorldProvider.class, "tokWorld");
if (instance == null) {
instance = new WorldProvider("tokWorld");
instance.markDirty();
storage.setData("tokWorld", instance);
}
return instance;
}
use of net.minecraft.world.storage.MapStorage in project Solar by ArekkuusuJerii.
the class WorldAlternatorData method get.
public static WorldAlternatorData get(World world) {
MapStorage storage = world.getMapStorage();
// noinspection ConstantConditions
WorldAlternatorData data = (WorldAlternatorData) storage.getOrLoadData(WorldAlternatorData.class, NAME);
if (data == null) {
data = new WorldAlternatorData(NAME);
storage.setData(NAME, data);
}
return data;
}
use of net.minecraft.world.storage.MapStorage in project Solar by ArekkuusuJerii.
the class WorldQuantumData method get.
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;
}
use of net.minecraft.world.storage.MapStorage in project Solar by ArekkuusuJerii.
the class WorldMonolithData method get.
@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;
}
use of net.minecraft.world.storage.MapStorage in project TecTech by Technus.
the class EnderWorldSavedData method loadInstance.
private static void loadInstance() {
if (INSTANCE == null) {
MapStorage storage = DimensionManager.getWorld(0).mapStorage;
INSTANCE = (EnderWorldSavedData) storage.loadData(EnderWorldSavedData.class, DATA_NAME);
if (INSTANCE == null) {
INSTANCE = new EnderWorldSavedData();
storage.setData(DATA_NAME, INSTANCE);
}
}
INSTANCE.markDirty();
}
Aggregations