Made level save more often
This commit is contained in:
parent
59d0da40f0
commit
7175af2aa5
File diff suppressed because one or more lines are too long
|
@ -1268,16 +1268,16 @@ public final class Minecraft implements Runnable {
|
|||
|
||||
}
|
||||
|
||||
public int ticksUntilSave = 6000;
|
||||
public int ticksUntilSave = 600;
|
||||
|
||||
private void levelSave() {
|
||||
if(this.level == null) {
|
||||
ticksUntilSave = this.hud.ticks + 6000;
|
||||
ticksUntilSave = this.hud.ticks + 600;
|
||||
}
|
||||
|
||||
if(this.hud.ticks >= this.ticksUntilSave) {
|
||||
new LevelUtils().save();
|
||||
ticksUntilSave = this.hud.ticks + 6000;
|
||||
ticksUntilSave = this.hud.ticks + 600;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,9 @@ import com.mojang.minecraft.gui.Button;
|
|||
import com.mojang.minecraft.gui.GenerateLevelScreen;
|
||||
import com.mojang.minecraft.gui.GuiScreen;
|
||||
import com.mojang.minecraft.gui.OptionsScreen;
|
||||
|
||||
import net.PeytonPlayz585.level.LevelUtils;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public final class GameOverScreen extends GuiScreen {
|
||||
|
@ -15,7 +18,7 @@ public final class GameOverScreen extends GuiScreen {
|
|||
if(this.minecraft.session == null) {
|
||||
((Button)this.buttons.get(2)).active = false;
|
||||
}
|
||||
|
||||
new LevelUtils().save();
|
||||
}
|
||||
|
||||
protected final void onButtonClick(Button var1) {
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.mojang.minecraft.player.Player;
|
|||
import com.mojang.minecraft.render.RenderEngine;
|
||||
import com.mojang.minecraft.render.TextureLocation;
|
||||
|
||||
import net.PeytonPlayz585.level.LevelUtils;
|
||||
import net.PeytonPlayz585.math.MathHelper;
|
||||
import net.PeytonPlayz595.nbt.NBTTagCompound;
|
||||
import net.PeytonPlayz595.nbt.NBTTagFloat;
|
||||
|
@ -413,6 +414,7 @@ public class Mob extends Entity {
|
|||
}
|
||||
|
||||
this.dead = true;
|
||||
new LevelUtils().save();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user