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() {
|
private void levelSave() {
|
||||||
if(this.level == null) {
|
if(this.level == null) {
|
||||||
ticksUntilSave = this.hud.ticks + 6000;
|
ticksUntilSave = this.hud.ticks + 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.hud.ticks >= this.ticksUntilSave) {
|
if(this.hud.ticks >= this.ticksUntilSave) {
|
||||||
new LevelUtils().save();
|
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.GenerateLevelScreen;
|
||||||
import com.mojang.minecraft.gui.GuiScreen;
|
import com.mojang.minecraft.gui.GuiScreen;
|
||||||
import com.mojang.minecraft.gui.OptionsScreen;
|
import com.mojang.minecraft.gui.OptionsScreen;
|
||||||
|
|
||||||
|
import net.PeytonPlayz585.level.LevelUtils;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
public final class GameOverScreen extends GuiScreen {
|
public final class GameOverScreen extends GuiScreen {
|
||||||
|
@ -15,7 +18,7 @@ public final class GameOverScreen extends GuiScreen {
|
||||||
if(this.minecraft.session == null) {
|
if(this.minecraft.session == null) {
|
||||||
((Button)this.buttons.get(2)).active = false;
|
((Button)this.buttons.get(2)).active = false;
|
||||||
}
|
}
|
||||||
|
new LevelUtils().save();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected final void onButtonClick(Button var1) {
|
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.RenderEngine;
|
||||||
import com.mojang.minecraft.render.TextureLocation;
|
import com.mojang.minecraft.render.TextureLocation;
|
||||||
|
|
||||||
|
import net.PeytonPlayz585.level.LevelUtils;
|
||||||
import net.PeytonPlayz585.math.MathHelper;
|
import net.PeytonPlayz585.math.MathHelper;
|
||||||
import net.PeytonPlayz595.nbt.NBTTagCompound;
|
import net.PeytonPlayz595.nbt.NBTTagCompound;
|
||||||
import net.PeytonPlayz595.nbt.NBTTagFloat;
|
import net.PeytonPlayz595.nbt.NBTTagFloat;
|
||||||
|
@ -413,6 +414,7 @@ public class Mob extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dead = true;
|
this.dead = true;
|
||||||
|
new LevelUtils().save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user