loading gui + converter
This commit is contained in:
parent
9df6406a93
commit
90de256e04
7 changed files with 259 additions and 178 deletions
|
@ -63,6 +63,7 @@ import game.gui.Gui;
|
|||
import game.gui.GuiConsole;
|
||||
import game.gui.GuiGameOver;
|
||||
import game.gui.GuiInfo;
|
||||
import game.gui.GuiLoading;
|
||||
import game.gui.GuiMenu;
|
||||
import game.gui.Style;
|
||||
import game.gui.container.GuiContainer;
|
||||
|
@ -933,6 +934,8 @@ public class Game implements IThreadListener {
|
|||
}
|
||||
if(this.open != null)
|
||||
this.open.render();
|
||||
else if(this.theWorld == null || this.theWorld.hasNoChunks())
|
||||
Drawing.drawScaledBackground(this, Gui.DIRT_BACKGROUND);
|
||||
if(Bind.INFO.isDown() && (this.open == null || !(this.open.selected instanceof Textbox)))
|
||||
this.drawInfo();
|
||||
if(this.hudOverlay && !(this.open instanceof GuiConsole))
|
||||
|
@ -958,7 +961,7 @@ public class Game implements IThreadListener {
|
|||
int y1 = 0;
|
||||
int y2 = this.fb_y;
|
||||
// int pos = 0;
|
||||
String str = this.getldebug();
|
||||
String str = this.getLeft(this.server);
|
||||
// if(jstr)
|
||||
// str = (*jsys.env)->GetStringUTFChars(jsys.env, jstr, NULL);
|
||||
// elem->r_dirty = 1;
|
||||
|
@ -2118,6 +2121,7 @@ public class Game implements IThreadListener {
|
|||
if(Bind.FULLSCREEN.isPressed()) {
|
||||
this.full(!this.fullscreen);
|
||||
}
|
||||
if(!(this.open instanceof GuiLoading)) {
|
||||
if(!(this.open instanceof GuiConsole) && Bind.COMMAND.isPressed()) {
|
||||
this.displayGuiScreen(GuiConsole.INSTANCE);
|
||||
}
|
||||
|
@ -2144,6 +2148,7 @@ public class Game implements IThreadListener {
|
|||
this.displayGuiScreen(/* this.itemCheat ? new GuiCheat() : */ new GuiInventory(this.thePlayer));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Bind.SHOW.isPressed()) {
|
||||
if(this.drawDebug) {
|
||||
this.drawDebug = this.drawFps = false;
|
||||
|
@ -2328,19 +2333,11 @@ public class Game implements IThreadListener {
|
|||
return ((double)rtime()) / 1000000.0;
|
||||
}
|
||||
|
||||
public void convert(File folder, String user) {
|
||||
Converter.convertMapFormat(folder, user);
|
||||
}
|
||||
|
||||
public void bind(int port) {
|
||||
if(server != null)
|
||||
server.bind(port);
|
||||
}
|
||||
|
||||
public String getldebug() {
|
||||
return this.getLeft(server);
|
||||
}
|
||||
|
||||
public void distance(int distance) {
|
||||
if(this.renderGlobal != null)
|
||||
this.renderGlobal.setDisplayListEntitiesDirty();
|
||||
|
@ -2531,6 +2528,7 @@ public class Game implements IThreadListener {
|
|||
DebugFunction func = this.debug.get(key);
|
||||
if(func != null) {
|
||||
Bind.disableInput(key);
|
||||
if(!(this.open instanceof GuiLoading))
|
||||
func.runner.execute(key);
|
||||
}
|
||||
return func != null;
|
||||
|
|
|
@ -317,32 +317,10 @@ public abstract class Gui {
|
|||
Drawing.drawGradient(0, 0, this.gm.fb_x, this.gm.fb_y, 0xc0101010, 0xd0101010);
|
||||
}
|
||||
else {
|
||||
this.drawDirtBackground(0, 0, this.gm.fb_x, this.gm.fb_y);
|
||||
Drawing.drawScaledBackground(this.gm, DIRT_BACKGROUND);
|
||||
}
|
||||
}
|
||||
|
||||
public void drawDirtBackground(double x, double y, double width, double height) {
|
||||
GlState.enableTexture2D();
|
||||
GlState.disableLighting();
|
||||
GlState.disableFog();
|
||||
RenderBuffer buf = Tessellator.getBuffer();
|
||||
this.gm.getTextureManager().bindTexture(DIRT_BACKGROUND);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
double scale = 32.0;
|
||||
buf.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
buf.pos(x, y + height, 0.0D).tex(0.0D, height / scale)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
buf.pos(x + width, y + height, 0.0D)
|
||||
.tex(width / scale, height / scale)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
buf.pos(x + width, y, 0.0D).tex(width / scale, 0.0)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
buf.pos(x, y, 0.0D).tex(0.0D, 0.0)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
Tessellator.draw();
|
||||
GlState.disableTexture2D();
|
||||
}
|
||||
|
||||
public void render() {
|
||||
this.drawMainBackground();
|
||||
this.drawBackground();
|
||||
|
|
|
@ -75,7 +75,7 @@ public class GuiEdit extends Gui implements ActButton.Callback, Textbox.Callback
|
|||
public void init(int width, int height) {
|
||||
this.actionButton = this.add(new ActButton(width / 2 - 100, height / 4 + 96 + 12, 200, 20, (ActButton.Callback)this, this.action));
|
||||
this.cancelButton = this.add(new ActButton(width / 2 - 100, height / 4 + 120 + 12, 200, 20, (ActButton.Callback)this, "Abbrechen"));
|
||||
this.nameField = this.add(new Textbox(width / 2 - 100, 60, 200, 20, this.player ? NetHandlerPlayServer.MAX_USER_LENGTH : 256, true, this, this.player ? NetHandlerPlayServer.VALID_USER : GuiWorlds.VALID_FILE, this.original == null ? "" : this.original));
|
||||
this.nameField = this.add(new Textbox(width / 2 - 200, 60, 400, 20, this.player ? NetHandlerPlayServer.MAX_USER_LENGTH : 256, true, this, this.player ? NetHandlerPlayServer.VALID_USER : GuiWorlds.VALID_FILE, this.original == null ? "" : this.original));
|
||||
this.nameField.setSelected();
|
||||
// if(this.player) {
|
||||
// this.nameField.setMaxStringLength(16);
|
||||
|
@ -96,7 +96,7 @@ public class GuiEdit extends Gui implements ActButton.Callback, Textbox.Callback
|
|||
// }
|
||||
// });
|
||||
// }
|
||||
this.actionLabel = this.add(new Label(width / 2 - 100, 20, 200, 24, this.getLabelDesc()));
|
||||
this.actionLabel = this.add(new Label(width / 2 - 250, 20, 500, 24, this.getLabelDesc()));
|
||||
// this.shift();
|
||||
// this.nameField.setText();
|
||||
this.actionButton.enabled = false;
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.util.Set;
|
|||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import game.Game;
|
||||
import game.color.TextColor;
|
||||
import game.dimension.Dimension;
|
||||
import game.gui.GuiConfirm;
|
||||
|
@ -487,8 +488,8 @@ public class GuiWorlds extends GuiList<GuiWorlds.SaveInfo> implements ActButton.
|
|||
}
|
||||
else {
|
||||
if(this.getSelected().mustConvert()) {
|
||||
this.gm.convert(folder, user);
|
||||
this.gm.displayGuiScreen(this);
|
||||
Game r = this.gm;
|
||||
Converter.convertMapFormat(folder, user);
|
||||
this.starting = false;
|
||||
}
|
||||
else {
|
||||
|
@ -607,9 +608,10 @@ public class GuiWorlds extends GuiList<GuiWorlds.SaveInfo> implements ActButton.
|
|||
{
|
||||
super.drawOverlays();
|
||||
if(this.warningMessage != null) {
|
||||
drawRect(this.gm.fb_x / 2 - 191, this.gm.fb_y - 82, this.gm.fb_x / 2 + 191, this.gm.fb_y - 66, 0xff808080);
|
||||
drawRect(this.gm.fb_x / 2 - 190, this.gm.fb_y - 81, this.gm.fb_x / 2 + 190, this.gm.fb_y - 67, 0xff000000);
|
||||
Drawing.drawText(this.warningMessage, this.gm.fb_x / 2, this.gm.fb_y - 78, 0xffff0000);
|
||||
Drawing.drawRectBorder(this.gm.fb_x / 2 - 200, this.gm.fb_y - 84, 400, 18, 0xff000000, 0xff808080);
|
||||
// drawRect(this.gm.fb_x / 2 - 191, this.gm.fb_y - 82, this.gm.fb_x / 2 + 191, this.gm.fb_y - 66, 0xff808080);
|
||||
// drawRect(this.gm.fb_x / 2 - 190, this.gm.fb_y - 81, this.gm.fb_x / 2 + 190, this.gm.fb_y - 67, 0xff000000);
|
||||
Drawing.drawTextCentered(this.warningMessage, this.gm.fb_x / 2, this.gm.fb_y - 84, 0xffff0000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package game.renderer;
|
||||
|
||||
import game.Game;
|
||||
import game.color.TextColor;
|
||||
import game.gui.Font;
|
||||
import game.gui.FontChar;
|
||||
|
@ -531,6 +532,11 @@ public abstract class Drawing {
|
|||
txt_draw(x, y, x, y, Integer.MAX_VALUE, Integer.MAX_VALUE, color, str);
|
||||
}
|
||||
|
||||
public static void drawTextCentered(String str, int x, int y, int color) {
|
||||
Vec2i size = getSize(str);
|
||||
drawText(str, x - size.xpos / 2, y, color);
|
||||
}
|
||||
|
||||
public static void drawTextRight(String str, int x, int y, int color) {
|
||||
Vec2i size = getSize(str);
|
||||
drawText(str, x - size.xpos, y, color);
|
||||
|
@ -545,4 +551,30 @@ public abstract class Drawing {
|
|||
return ((((c1 >> 24 & 255) + (c2 >> 24 & 255)) / 2) << 24) | ((((c1 >> 16 & 255) + (c2 >> 16 & 255)) / 2) << 16) | ((((c1 >> 8 & 255) + (c2 >> 8 & 255)) / 2) << 8) |
|
||||
(((c1 & 255) + (c2 & 255)) / 2);
|
||||
}
|
||||
|
||||
public static void drawScaledBackground(Game gm, String texture) {
|
||||
drawScaledBackground(gm, texture, 0, 0, gm.fb_x, gm.fb_y);
|
||||
}
|
||||
|
||||
public static void drawScaledBackground(Game gm, String texture, double x, double y, double width, double height) {
|
||||
GlState.enableTexture2D();
|
||||
GlState.disableLighting();
|
||||
GlState.disableFog();
|
||||
RenderBuffer buf = Tessellator.getBuffer();
|
||||
gm.getTextureManager().bindTexture(texture);
|
||||
GlState.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
double scale = 32.0;
|
||||
buf.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
buf.pos(x, y + height, 0.0D).tex(0.0D, height / scale)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
buf.pos(x + width, y + height, 0.0D)
|
||||
.tex(width / scale, height / scale)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
buf.pos(x + width, y, 0.0D).tex(width / scale, 0.0)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
buf.pos(x, y, 0.0D).tex(0.0D, 0.0)
|
||||
.color(64, 64, 64, 255).endVertex();
|
||||
Tessellator.draw();
|
||||
GlState.disableTexture2D();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ import java.util.zip.InflaterInputStream;
|
|||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import game.Game;
|
||||
import game.biome.Biome;
|
||||
import game.block.Block;
|
||||
import game.block.BlockCactus;
|
||||
|
@ -57,6 +58,9 @@ import game.entity.animal.EntityWolf;
|
|||
import game.entity.item.EntityBoat;
|
||||
import game.entity.item.EntityMinecart;
|
||||
import game.entity.npc.EntityHuman;
|
||||
import game.gui.GuiLoading;
|
||||
import game.gui.GuiLoading.Callback;
|
||||
import game.gui.world.GuiWorlds;
|
||||
import game.init.BlockRegistry;
|
||||
import game.init.Blocks;
|
||||
import game.init.Config;
|
||||
|
@ -86,7 +90,7 @@ import game.tileentity.TileEntitySign;
|
|||
import game.tileentity.TileEntitySkull;
|
||||
import game.world.Region.FolderInfo;
|
||||
|
||||
public abstract class Converter {
|
||||
public final class Converter {
|
||||
public static enum SaveVersion {
|
||||
ALPHA_1_0("Alpha 1.0 - Beta 1.2"),
|
||||
BETA_1_3("Beta 1.3 - Release 1.8.9"),
|
||||
|
@ -190,7 +194,10 @@ public abstract class Converter {
|
|||
State getState(int id, int data);
|
||||
}
|
||||
|
||||
private static long postProgress(long start, int progress) {
|
||||
private Converter() {
|
||||
}
|
||||
|
||||
private long postProgress(long start, int progress) {
|
||||
// SKC.info("... " + progress + "%");
|
||||
if(System.currentTimeMillis() - start >= 500L) {
|
||||
start = System.currentTimeMillis();
|
||||
|
@ -206,6 +213,14 @@ public abstract class Converter {
|
|||
// private static final Map<Character, BlockFunction> BLOCK_FUNCS = Maps.newHashMap();
|
||||
private static final Map<String, String> OLD_GAMERULES = Maps.newHashMap();
|
||||
|
||||
private String action;
|
||||
private String task;
|
||||
private String file;
|
||||
private int totalRegions;
|
||||
private int doneRegions;
|
||||
private int totalChunks;
|
||||
private int doneChunks;
|
||||
|
||||
private static void mapEntity(Class<? extends Entity> clazz, String ... names) {
|
||||
String name = EntityRegistry.getEntityString(clazz);
|
||||
for(String oldname : names) {
|
||||
|
@ -1110,13 +1125,17 @@ public abstract class Converter {
|
|||
return tag;
|
||||
}
|
||||
|
||||
private static long convertChunks(File dir, File file, long start, int progress, int total) {
|
||||
private long convertChunks(File dir, File file, long start, int progress, int total) {
|
||||
String name = file.getName();
|
||||
this.file = name;
|
||||
this.totalChunks = 1024;
|
||||
boolean legacy = name.endsWith(".mcr");
|
||||
int rx, rz;
|
||||
String[] reg = name.split("\\.");
|
||||
if(reg.length != 4) {
|
||||
Log.JNI.warn("Unbekannte Region " + file);
|
||||
this.doneChunks = 0;
|
||||
this.file = null;
|
||||
return start;
|
||||
}
|
||||
try {
|
||||
|
@ -1125,6 +1144,8 @@ public abstract class Converter {
|
|||
}
|
||||
catch(NumberFormatException e) {
|
||||
Log.JNI.warn("Unbekannte Region " + file);
|
||||
this.doneChunks = 0;
|
||||
this.file = null;
|
||||
return start;
|
||||
}
|
||||
try {
|
||||
|
@ -1136,8 +1157,10 @@ public abstract class Converter {
|
|||
Region newreg;
|
||||
for(int bx = 0; bx < 4; bx++) {
|
||||
for(int bz = 0; bz < 4; bz++) {
|
||||
if(!oldreg.hasRegion(bx, bz))
|
||||
if(!oldreg.hasRegion(bx, bz)) {
|
||||
this.doneChunks += 64;
|
||||
continue;
|
||||
}
|
||||
areas++;
|
||||
newreg = new Region(dir, rx * 4 + bx, rz * 4 + bz);
|
||||
Log.JNI.info("Konvertiere " + file + " zu " + newreg.getFile() + " ...");
|
||||
|
@ -1150,6 +1173,7 @@ public abstract class Converter {
|
|||
DataInputStream in = oldreg.getInputStream(x, z);
|
||||
if(in == null) {
|
||||
Log.JNI.warn("Konnte " + file.getPath() + "@" + x + "," + z + " nicht lesen");
|
||||
this.doneChunks += 1;
|
||||
continue;
|
||||
}
|
||||
NBTTagCompound tag = NBTLoader.read(in);
|
||||
|
@ -1160,6 +1184,7 @@ public abstract class Converter {
|
|||
// out.close();
|
||||
newreg.writeTag(nx, nz, tag);
|
||||
}
|
||||
this.doneChunks += 1;
|
||||
}
|
||||
}
|
||||
newreg.close(false);
|
||||
|
@ -1168,6 +1193,7 @@ public abstract class Converter {
|
|||
if(percent > prev) {
|
||||
start = postProgress(start, percent);
|
||||
}
|
||||
// this.doneChunks += 1;
|
||||
}
|
||||
}
|
||||
oldreg.close();
|
||||
|
@ -1176,6 +1202,8 @@ public abstract class Converter {
|
|||
catch(IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
this.doneChunks = 0;
|
||||
this.file = null;
|
||||
return start;
|
||||
}
|
||||
|
||||
|
@ -1222,8 +1250,32 @@ public abstract class Converter {
|
|||
// NBTTagCompound nbt = getLegacyWorldInfo(dir);
|
||||
// if(nbt == null)
|
||||
// return false;
|
||||
final Converter conv = new Converter();
|
||||
Game.getGame().displayGuiScreen(new GuiLoading("Konvertiere Welt ...", new Callback() {
|
||||
public void poll(Game gm, GuiLoading gui) {
|
||||
if(conv.totalRegions > 0) {
|
||||
gui.setBar(conv.task, "Regionen", conv.totalRegions);
|
||||
gui.setProgress(conv.doneRegions);
|
||||
}
|
||||
else {
|
||||
gui.resetBar();
|
||||
}
|
||||
if(conv.totalChunks > 0) {
|
||||
gui.setSub(conv.file, "Chunks", conv.totalChunks);
|
||||
gui.setSubProgress(conv.doneChunks);
|
||||
}
|
||||
else {
|
||||
gui.resetSub();
|
||||
}
|
||||
gui.setTask(conv.action == null ? "" : conv.action);
|
||||
}
|
||||
}));
|
||||
final NBTTagCompound tag = nbt;
|
||||
new Thread(new Runnable() {
|
||||
public void run() {
|
||||
Log.IO.info("Version: %s", ver);
|
||||
if(ver != SaveVersion.RELEASE_1_13) {
|
||||
conv.action = "Suche nach Chunk-Daten";
|
||||
Log.JNI.info("Konvertiere Chunk-Daten von region/*.mca,*.mcr");
|
||||
File regionDir = new File(dir, "region");
|
||||
if(regionDir.exists()) {
|
||||
|
@ -1239,19 +1291,22 @@ public abstract class Converter {
|
|||
Log.JNI.info("Keine .mca- oder .mcr-Dateien gefunden.");
|
||||
}
|
||||
else {
|
||||
conv.task = "Konvertiere Chunkdaten";
|
||||
conv.totalRegions = files.length;
|
||||
Log.JNI.info("Ingesamt wurden " + files.length + " .mca-Dateien und .mcr-Dateien gefunden, konvertiere ...");
|
||||
if(ver == SaveVersion.RELEASE_1_9)
|
||||
Log.JNI.info("Konvertiere von neuerer Version, dies wird Blöcke entfernen ...");
|
||||
chunkDir.mkdirs();
|
||||
int progress = 0;
|
||||
long time = System.currentTimeMillis();
|
||||
long start = postProgress(time, 0);
|
||||
long start = conv.postProgress(time, 0);
|
||||
for(File file : files) {
|
||||
start = convertChunks(chunkDir, file, start, progress, files.length);
|
||||
++progress;
|
||||
int percent = (int)Math.round(100.0D * (double)progress / (double)files.length);
|
||||
Log.JNI.info("Konvertiere Chunk-Daten: " + file.getName() + " (" + progress + "/" + files.length + ")");
|
||||
start = postProgress(start, percent);
|
||||
start = conv.convertChunks(chunkDir, file, start, progress, files.length);
|
||||
++progress;
|
||||
start = conv.postProgress(start, percent);
|
||||
conv.doneRegions += 1;
|
||||
}
|
||||
time = System.currentTimeMillis() - time;
|
||||
Log.JNI.info("Fertig. Konversion dauerte " + ((time / 60000L) > 0 ? ((time / 60000L) + " Minuten und ") : "") + ((time / 1000L) % 60L) + " Sekunden.");
|
||||
|
@ -1261,11 +1316,14 @@ public abstract class Converter {
|
|||
else {
|
||||
Log.JNI.warn("Konvertiere keine Chunk-Daten, da Version zu neu");
|
||||
}
|
||||
conv.doneRegions = 0;
|
||||
conv.task = null;
|
||||
conv.action = "Konvertiere level.dat";
|
||||
Log.JNI.info("Konvertiere Daten von level.dat");
|
||||
Config.clear();
|
||||
UniverseRegistry.clear();
|
||||
if(nbt.hasKey("GameRules", 10)) {
|
||||
NBTTagCompound rules = nbt.getCompoundTag("GameRules");
|
||||
if(tag.hasKey("GameRules", 10)) {
|
||||
NBTTagCompound rules = tag.getCompoundTag("GameRules");
|
||||
for(Entry<String, String> rule : OLD_GAMERULES.entrySet()) {
|
||||
if(rules.hasKey(rule.getKey(), 8))
|
||||
Config.set(rule.getValue(), rules.getString(rule.getKey()), null);
|
||||
|
@ -1274,14 +1332,15 @@ public abstract class Converter {
|
|||
// Config.setVar("noRespawn", "" + nbt.getBoolean("hardcore"), false);
|
||||
// int id = nbt.getInteger("GameType");
|
||||
// Config.set("defaultNoCreative", "" + (id == 2 || id == 0), false);
|
||||
Config.set("spawnX", "" + nbt.getInteger("SpawnX"), null);
|
||||
Config.set("spawnY", "" + nbt.getInteger("SpawnY"), null);
|
||||
Config.set("spawnZ", "" + nbt.getInteger("SpawnZ"), null);
|
||||
Config.set("spawnX", "" + tag.getInteger("SpawnX"), null);
|
||||
Config.set("spawnY", "" + tag.getInteger("SpawnY"), null);
|
||||
Config.set("spawnZ", "" + tag.getInteger("SpawnZ"), null);
|
||||
Config.set("spawnDim", "" + 1, null);
|
||||
Log.JNI.info("Speichere neue level.nbt ...");
|
||||
Region.saveWorldInfo(dir, wtime, user);
|
||||
if(nbt.hasKey("Player", 10)) {
|
||||
NBTTagCompound player = nbt.getCompoundTag("Player");
|
||||
if(tag.hasKey("Player", 10)) {
|
||||
conv.action = "Konvertiere Spielerdaten";
|
||||
NBTTagCompound player = tag.getCompoundTag("Player");
|
||||
NBTTagList pos = player.getTagList("Pos", 6);
|
||||
NBTTagList motion = player.getTagList("Motion", 6);
|
||||
NBTTagList rotation = player.getTagList("Rotation", 5);
|
||||
|
@ -1324,8 +1383,9 @@ public abstract class Converter {
|
|||
Log.JNI.error(e, "Fehler beim Schreiben von " + pdat);
|
||||
}
|
||||
}
|
||||
Weather weather = nbt.getBoolean("thundering") ? Weather.THUNDER : (nbt.getBoolean("raining") ? Weather.RAIN : Weather.CLEAR);
|
||||
Weather weather = tag.getBoolean("thundering") ? Weather.THUNDER : (tag.getBoolean("raining") ? Weather.RAIN : Weather.CLEAR);
|
||||
if(weather != Weather.CLEAR) {
|
||||
conv.action = "Konvertiere Dimensionsdaten";
|
||||
NBTTagCompound dataTag = new NBTTagCompound();
|
||||
dataTag.setString("Weather", weather.getName());
|
||||
Log.JNI.info("Speichere neue data.nbt ...");
|
||||
|
@ -1338,6 +1398,13 @@ public abstract class Converter {
|
|||
}
|
||||
}
|
||||
Log.IO.info("Welt '" + dir + "' wurde in %d Sekunden konvertiert", (System.currentTimeMillis() - cur) / 1000L);
|
||||
Game.getGame().schedule(new Runnable() {
|
||||
public void run() {
|
||||
Game.getGame().displayGuiScreen(GuiWorlds.INSTANCE);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, "Converter Thread").start();
|
||||
return new FolderInfo(wtime, user, System.currentTimeMillis(), null, Config.VERSION);
|
||||
}
|
||||
|
||||
|
|
|
@ -921,4 +921,8 @@ public class WorldClient extends World
|
|||
public String getDebugLoadedEntities() {
|
||||
return "" + this.entities.size();
|
||||
}
|
||||
|
||||
public boolean hasNoChunks() {
|
||||
return this.chunkListing.isEmpty();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue