net.minecraft.world.MinecraftException Java Examples

The following examples show how to use net.minecraft.world.MinecraftException. 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: BlockUtils.java    From GriefPrevention with MIT License 6 votes vote down vote up
private static void saveChunkData(ChunkProviderServer chunkProviderServer, Chunk chunkIn)
{
    try
    {
        chunkIn.setLastSaveTime(chunkIn.getWorld().getTotalWorldTime());
        chunkProviderServer.chunkLoader.saveChunk(chunkIn.getWorld(), chunkIn);
    }
    catch (IOException ioexception)
    {
        //LOGGER.error((String)"Couldn\'t save chunk", (Throwable)ioexception);
    }
    catch (MinecraftException minecraftexception)
    {
        //LOGGER.error((String)"Couldn\'t save chunk; already in use by another instance of Minecraft?", (Throwable)minecraftexception);
    }
    try
    {
        chunkProviderServer.chunkLoader.saveExtraChunkData(chunkIn.getWorld(), chunkIn);
    }
    catch (Exception exception)
    {
        //LOGGER.error((String)"Couldn\'t save entities", (Throwable)exception);
    }
}
 
Example #2
Source File: CraftWorld.java    From Kettle with GNU General Public License v3.0 5 votes vote down vote up
public void save(boolean forceSave) {
    this.server.checkSaveState();
    try {
        boolean oldSave = world.disableLevelSaving;

        world.disableLevelSaving = false;
        world.saveAllChunks(forceSave, null);

        world.disableLevelSaving = oldSave;
    } catch (MinecraftException ex) {
        ex.printStackTrace();
    }
}
 
Example #3
Source File: ServerShutdownThread.java    From Kettle with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void run() {
    try {
        server.stopServer();
    } catch (MinecraftException ex) {
        ex.printStackTrace();
    } /*finally {
        try {
            server.reader.getTerminal().restore();
        } catch (Exception e) {
        }
    }*/
}
 
Example #4
Source File: ServerShutdownThread.java    From Thermos with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void run() {
    try {
        server.stopServer();
    } catch (MinecraftException ex) {
        ex.printStackTrace();
    } finally {
        try {
            server.reader.getTerminal().restore();
        } catch (Exception e) {
        }
    }
}
 
Example #5
Source File: WrapperWorld.java    From ClientBase with MIT License 4 votes vote down vote up
public void checkSessionLock() throws MinecraftException {
    this.real.checkSessionLock();
}
 
Example #6
Source File: FakeWorld.java    From Gadomancy with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public void checkSessionLock() throws MinecraftException {
}
 
Example #7
Source File: DummySaveHandler.java    From AdvancedRocketry with MIT License 2 votes vote down vote up
@Override
public void checkSessionLock() throws MinecraftException {
	
}
 
Example #8
Source File: FakeWorldServer.java    From Framez with GNU General Public License v3.0 2 votes vote down vote up
@Override
public void saveAllChunks(boolean p_73044_1_, IProgressUpdate p_73044_2_) throws MinecraftException {

}
 
Example #9
Source File: FakeWorldServer.java    From Framez with GNU General Public License v3.0 2 votes vote down vote up
@Override
protected void saveLevel() throws MinecraftException {

}
 
Example #10
Source File: GuiEntityRender.java    From WearableBackpacks with MIT License votes vote down vote up
public void checkSessionLock() throws MinecraftException {  }