net.minecraft.world.storage.IPlayerFileData Java Examples

The following examples show how to use net.minecraft.world.storage.IPlayerFileData. 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
Source File: TileInfusionClaw.java    From Gadomancy with GNU Lesser General Public License v3.0 5 votes vote down vote up
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
Source File: DummySaveHandler.java    From GregTech with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public IPlayerFileData getPlayerNBTManager() {
    return this;
}
 
Example #3
Source File: FakeWorld.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public IPlayerFileData getSaveHandler() {
    return null;
}
 
Example #4
Source File: DummySaveHandler.java    From AdvancedRocketry with MIT License 4 votes vote down vote up
@Override
public IPlayerFileData getPlayerNBTManager() {
	return null;
}
 
Example #5
Source File: FakeWorldServer.java    From Framez with GNU General Public License v3.0 4 votes vote down vote up
@Override
public IPlayerFileData getSaveHandler() {

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