Java 类net.minecraft.world.storage.WorldSavedData 实例源码

项目:UniversalRemote    文件:WorldServerProxy.java   
@Override
public void setData(String dataID, WorldSavedData worldSavedDataIn) {
    if (m_proxyWorld != null && Util.isPrefixInCallStack(m_modPrefix)) {
        m_proxyWorld.setData(dataID, worldSavedDataIn);
    } else if (m_realWorld != null) {
        m_realWorld.setData(dataID, worldSavedDataIn);
    } else {
        super.setData(dataID, worldSavedDataIn);
    }
}
项目:UniversalRemote    文件:WorldServerProxy.java   
@Override
public WorldSavedData loadData(Class<? extends WorldSavedData> clazz, String dataID) {
    if (m_proxyWorld != null && Util.isPrefixInCallStack(m_modPrefix)) {
        return m_proxyWorld.loadData(clazz, dataID);
    } else if (m_realWorld != null) {
        return m_realWorld.loadData(clazz, dataID);
    } else {
        return super.loadData(clazz, dataID);
    }
}
项目:ChickenChunks    文件:PlayerLoginTracker.java   
public static ILoginTracker getTracker(World world) {
    WorldSavedData data = world.getMapStorage().getOrLoadData(SavedData.class, SAVED_DATA_NAME);
    if (data == null) {
        data = new SavedData(SAVED_DATA_NAME);
        world.getMapStorage().setData(SAVED_DATA_NAME, data);
    }
    return ((ILoginTracker) data);
}
项目:ChickenChunks    文件:OrganiserStorage.java   
public static IOrganiserStorage getStorage(World world) {
    WorldSavedData data = world.getMapStorage().getOrLoadData(SavedData.class, SAVED_DATA_NAME);
    if (data == null) {
        data = new SavedData(SAVED_DATA_NAME);
        world.getMapStorage().setData(SAVED_DATA_NAME, data);
    }
    return ((IOrganiserStorage) data);
}
项目:placementpreview    文件:FakeWorld.java   
@Override
public void setData(String dataID, WorldSavedData worldSavedDataIn)
{
    // NO-OP
}
项目:placementpreview    文件:FakeWorld.java   
@Override
@Nullable
public WorldSavedData loadData(Class <? extends WorldSavedData > clazz, String dataID)
{
    return null;
}