mirror of
https://github.com/catfoolyou/Beta-1.4_01.git
synced 2025-06-02 03:10:57 -05:00
Gotta fix this shit
This commit is contained in:
parent
ce221059d6
commit
397800218a
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
.gradle/
|
||||
build/
|
||||
lwjgl-rundir/*.log
|
||||
/lwjgl-rundir/filesystem/
|
||||
lwjgl-rundir/filesystem/
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -203,7 +203,7 @@ public class Minecraft {
|
||||
|
||||
RenderManager.instance.itemRenderer = new ItemRenderer(this);
|
||||
this.mcDataDir = getMinecraftDir();
|
||||
this.saveLoader = new SaveConverterMcRegion(new VFile2(this.mcDataDir, "saves"));
|
||||
this.saveLoader = new SaveConverterMcRegion(new VFile2("saves"));
|
||||
this.gameSettings = new GameSettings(this, this.mcDataDir);
|
||||
this.scaledResolution = new ScaledResolution(this.gameSettings, this.displayWidth, this.displayHeight);
|
||||
this.texturePackList = new TexturePackList(this, this.mcDataDir);
|
||||
|
@ -86,6 +86,7 @@ public class GuiCreateWorld extends GuiScreen {
|
||||
}
|
||||
|
||||
this.mc.playerController = new PlayerControllerSP(this.mc);
|
||||
this.mc.getSaveLoader().setFilename(this.folderName);
|
||||
this.mc.startWorld(this.folderName, this.textboxWorldName.getText(), var2);
|
||||
this.mc.displayGuiScreen(null);
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ public class GuiSelectWorld extends GuiScreen {
|
||||
var2 = "World" + var1;
|
||||
}
|
||||
|
||||
this.mc.getSaveLoader().setFilename(var2);
|
||||
this.mc.startWorld(var2, this.getSaveName(var1), 0L);
|
||||
this.mc.displayGuiScreen((GuiScreen)null);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ public class GuiTexturePacks extends GuiScreen {
|
||||
this.controlList.add(new GuiSmallButton(5, this.width / 2 - 154, this.height - 48, var1.translateKey("texturePack.openFolder")));
|
||||
this.controlList.add(new GuiSmallButton(6, this.width / 2 + 4, this.height - 48, var1.translateKey("gui.done")));
|
||||
this.mc.texturePackList.updateAvaliableTexturePacks();
|
||||
this.fileLocation = (new VFile2(Minecraft.getMinecraftDir(), "texturepacks")).getPath();
|
||||
this.fileLocation = (new VFile2("texturepacks")).getPath();
|
||||
this.guiTexturePackSlot = new GuiTexturePackSlot(this);
|
||||
this.guiTexturePackSlot.registerScrollButtons(this.controlList, 7, 8);
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ import java.util.List;
|
||||
public interface ISaveFormat {
|
||||
String formatName();
|
||||
|
||||
void setFilename(String name);
|
||||
|
||||
ISaveHandler getSaveLoader(String var1, boolean var2);
|
||||
|
||||
List getWorldList();
|
||||
|
@ -20,14 +20,17 @@ public class SaveConverterMcRegion extends SaveFormatOld {
|
||||
return "Scaevolus' McRegion";
|
||||
}
|
||||
|
||||
public void setFilename(String name){
|
||||
super.setFilename(name);
|
||||
}
|
||||
|
||||
public List getWorldList() {
|
||||
ArrayList arraylist = new ArrayList();
|
||||
List<VFile2> files = field_22180_a.listFiles(true);
|
||||
VFile2 afile[] =files.toArray(new VFile2[0]);
|
||||
VFile2 afile1[] = afile;
|
||||
int i = afile1.length;
|
||||
List<VFile2> files = worldFile.listFiles(true);
|
||||
VFile2 afile[] = files.toArray(new VFile2[0]);
|
||||
int i = afile.length;
|
||||
for (int j = 0; j < i; j++) {
|
||||
VFile2 file = afile1[j];
|
||||
VFile2 file = afile[j];
|
||||
if (!file.dirExists()) {
|
||||
continue;
|
||||
}
|
||||
@ -52,7 +55,7 @@ public class SaveConverterMcRegion extends SaveFormatOld {
|
||||
}
|
||||
|
||||
public ISaveHandler getSaveLoader(String var1, boolean var2) {
|
||||
return new SaveOldDir(this.field_22180_a, var1, var2);
|
||||
return new SaveOldDir(this.worldFile, var1, var2);
|
||||
}
|
||||
|
||||
public boolean isOldMapFormat(String var1) {
|
||||
@ -66,7 +69,7 @@ public class SaveConverterMcRegion extends SaveFormatOld {
|
||||
ArrayList var4 = new ArrayList();
|
||||
ArrayList var5 = new ArrayList();
|
||||
ArrayList var6 = new ArrayList();
|
||||
VFile2 var7 = new VFile2(this.field_22180_a, var1);
|
||||
VFile2 var7 = new VFile2(this.worldFile, var1);
|
||||
VFile2 var8 = new VFile2(var7, "DIM-1");
|
||||
System.out.println("Scanning folders...");
|
||||
this.func_22183_a(var7, var3, var4);
|
||||
|
@ -6,14 +6,19 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SaveFormatOld implements ISaveFormat {
|
||||
protected final VFile2 field_22180_a;
|
||||
protected final VFile2 worldFile;
|
||||
private String filename = null;
|
||||
|
||||
public SaveFormatOld(VFile2 var1) {
|
||||
if(!var1.exists()) {
|
||||
//var1.mkdirs();
|
||||
}
|
||||
|
||||
this.field_22180_a = var1;
|
||||
this.worldFile = var1;
|
||||
}
|
||||
|
||||
public void setFilename(String name){
|
||||
this.filename = name;
|
||||
}
|
||||
|
||||
public String formatName() {
|
||||
@ -38,10 +43,9 @@ public class SaveFormatOld implements ISaveFormat {
|
||||
}
|
||||
|
||||
public WorldInfo getWorldInfoForWorld(String var1) {
|
||||
VFile2 var2 = new VFile2(this.field_22180_a, var1);
|
||||
VFile2 var2 = new VFile2(this.worldFile + "/" + filename, var1);
|
||||
System.out.println(var2.getPath());
|
||||
if (var2 != null) {
|
||||
System.out.println("shit");
|
||||
try {
|
||||
NBTTagCompound var4 = CompressedStreamTools.readCompressed(var2.getInputStream());
|
||||
NBTTagCompound var5 = var4.getCompoundTag("Data");
|
||||
@ -55,7 +59,7 @@ public class SaveFormatOld implements ISaveFormat {
|
||||
}
|
||||
|
||||
public void renameWorldData(String var1, String var2) {
|
||||
VFile2 var3 = new VFile2(this.field_22180_a, var1);
|
||||
VFile2 var3 = new VFile2(this.worldFile, var1);
|
||||
if(var3.exists()) {
|
||||
VFile2 var4 = new VFile2(var3, "level.dat");
|
||||
if(var4.exists()) {
|
||||
@ -73,7 +77,7 @@ public class SaveFormatOld implements ISaveFormat {
|
||||
}
|
||||
|
||||
public void deleteWorldByDirectory(String var1) {
|
||||
VFile2 var2 = new VFile2(this.field_22180_a, var1);
|
||||
VFile2 var2 = new VFile2(this.worldFile, var1);
|
||||
if(var2.exists()) {
|
||||
//func_22179_a(var2.listFiles());
|
||||
var2.delete();
|
||||
@ -92,7 +96,7 @@ public class SaveFormatOld implements ISaveFormat {
|
||||
}
|
||||
|
||||
public ISaveHandler getSaveLoader(String var1, boolean var2) {
|
||||
return new SaveHandler(this.field_22180_a, var1, var2);
|
||||
return new SaveHandler(this.worldFile, var1, var2);
|
||||
}
|
||||
|
||||
public boolean isOldMapFormat(String var1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user