Java Code Examples for net.minecraft.world.storage.IPlayerFileData

The following examples show how to use net.minecraft.world.storage.IPlayerFileData. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
private void loadResearch(EntityPlayer fakePlayer) {
    boolean online = false;
    for(String username : MinecraftServer.getServer().getAllUsernames()) {
        if(username.equals(player)) {
            online = true;
            break;
        }
    }

    if(online) {
        this.research = ResearchManager.getResearchForPlayer(player);
    } else {
        if(research == null) {
            Thaumcraft.proxy.getCompletedResearch().put(fakePlayer.getCommandSenderName(), new ArrayList<String>());

            IPlayerFileData playerNBTManagerObj = MinecraftServer.getServer().worldServerForDimension(0).getSaveHandler().getSaveHandler();
            SaveHandler sh = (SaveHandler)playerNBTManagerObj;
            File dir = ObfuscationReflectionHelper.getPrivateValue(SaveHandler.class, sh, "playersDirectory", "field_75771_c");
            File file1 = new File(dir, player + ".thaum");
            File file2 = new File(dir, player + ".thaumbak");
            ResearchManager.loadPlayerData(fakePlayer, file1, file2, false);

            this.research = ResearchManager.getResearchForPlayerSafe(fakePlayer.getCommandSenderName());
        }
    }

    Thaumcraft.proxy.getCompletedResearch().put(fakePlayer.getCommandSenderName(), research == null ? new ArrayList<String>() : research);
}
 
Example 2
@Override
public IPlayerFileData getPlayerNBTManager() {
    return this;
}
 
Example 3
Source Project: Gadomancy   Source File: FakeWorld.java    License: GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public IPlayerFileData getSaveHandler() {
    return null;
}
 
Example 4
Source Project: AdvancedRocketry   Source File: DummySaveHandler.java    License: MIT License 4 votes vote down vote up
@Override
public IPlayerFileData getPlayerNBTManager() {
	return null;
}
 
Example 5
Source Project: Framez   Source File: FakeWorldServer.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Override
public IPlayerFileData getSaveHandler() {

    return null;
}
 
Example 6
Source Project: WearableBackpacks   Source File: GuiEntityRender.java    License: MIT License votes vote down vote up
public IPlayerFileData getPlayerNBTManager() { return null; }