Made level save more often

This commit is contained in:
PeytonPlayz595 2023-12-17 13:30:21 -05:00
parent 59d0da40f0
commit 7175af2aa5
5 changed files with 2637 additions and 2624 deletions

5246
js/app.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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;
}
}

View File

@ -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) {

View File

@ -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();
}
}