use of net.minecraft.world.storage.MapStorage in project Kingdom-Keys-Re-Coded by Wehavecookies56.
the class WorldSavedDataKingdomKeys method get.
public static WorldSavedDataKingdomKeys get(World world) {
MapStorage storage = world.getPerWorldStorage();
WorldSavedDataKingdomKeys instance = (WorldSavedDataKingdomKeys) storage.getOrLoadData(WorldSavedDataKingdomKeys.class, DATA_NAME);
if (instance == null) {
instance = new WorldSavedDataKingdomKeys();
storage.setData(DATA_NAME, instance);
}
return instance;
}
use of net.minecraft.world.storage.MapStorage in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.
the class ChunkKeysWorldData method get.
public static ChunkKeysWorldData get(World world) {
MapStorage storage = world.getPerWorldStorage();
ChunkKeysWorldData data = (ChunkKeysWorldData) storage.getOrLoadData(ChunkKeysWorldData.class, key);
if (data == null) {
data = new ChunkKeysWorldData();
world.setItemData(key, data);
}
return data;
}
use of net.minecraft.world.storage.MapStorage in project Valkyrien-Warfare-Revamped by ValkyrienWarfare.
the class ShipUUIDToPosData method get.
public static ShipUUIDToPosData get(World world) {
MapStorage storage = world.getPerWorldStorage();
ShipUUIDToPosData data = (ShipUUIDToPosData) storage.getOrLoadData(ShipUUIDToPosData.class, key);
if (data == null) {
data = new ShipUUIDToPosData();
world.setItemData(key, data);
}
return data;
}
use of net.minecraft.world.storage.MapStorage in project Railcraft by Railcraft.
the class BatterySaveData method forWorld.
public static BatterySaveData forWorld(World world) {
MapStorage storage = world.getPerWorldStorage();
BatterySaveData result = (BatterySaveData) storage.getOrLoadData(BatterySaveData.class, NAME);
if (result == null) {
result = new BatterySaveData(NAME);
storage.setData(NAME, result);
}
return result;
}
use of net.minecraft.world.storage.MapStorage in project BuildCraft by BuildCraft.
the class WorldSavedDataWireSystems method get.
public static WorldSavedDataWireSystems get(World world) {
if (world.isRemote) {
throw new UnsupportedOperationException("Attempted to get WorldSavedDataWireSystems on the client!");
}
MapStorage storage = world.getPerWorldStorage();
WorldSavedDataWireSystems instance = (WorldSavedDataWireSystems) storage.getOrLoadData(WorldSavedDataWireSystems.class, DATA_NAME);
if (instance == null) {
instance = new WorldSavedDataWireSystems();
storage.setData(DATA_NAME, instance);
}
instance.world = world;
return instance;
}
Aggregations