mirror of
https://github.com/catfoolyou/Beta-1.4_01.git
synced 2025-06-02 03:10:57 -05:00
Singleplayer working
This commit is contained in:
parent
95baa017a3
commit
d319bc275b
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.
BIN
lwjgl-rundir/r.-1.-1.mcr
Normal file
BIN
lwjgl-rundir/r.-1.-1.mcr
Normal file
Binary file not shown.
BIN
lwjgl-rundir/r.-1.0.mcr
Normal file
BIN
lwjgl-rundir/r.-1.0.mcr
Normal file
Binary file not shown.
BIN
lwjgl-rundir/r.0.-1.mcr
Normal file
BIN
lwjgl-rundir/r.0.-1.mcr
Normal file
Binary file not shown.
BIN
lwjgl-rundir/r.0.0.mcr
Normal file
BIN
lwjgl-rundir/r.0.0.mcr
Normal file
Binary file not shown.
@ -9,7 +9,7 @@ gui.no=No
|
||||
|
||||
menu.singleplayer=Singleplayer
|
||||
menu.multiplayer=Multiplayer
|
||||
menu.mods=Mods and Texture Packs
|
||||
menu.mods=Texture Packs
|
||||
menu.options=Options...
|
||||
menu.quit=Quit Game
|
||||
|
||||
|
@ -1,223 +0,0 @@
|
||||
As seen on TV!
|
||||
Awesome!
|
||||
100% pure!
|
||||
May contain nuts!
|
||||
Better than Prey!
|
||||
More polygons!
|
||||
Sexy!
|
||||
Limited edition!
|
||||
Flashing letters!
|
||||
Made by Notch!
|
||||
Coming soon!
|
||||
Best in class!
|
||||
When it's finished!
|
||||
Absolutely dragon free!
|
||||
Excitement!
|
||||
More than 500 sold!
|
||||
One of a kind!
|
||||
Heaps of hits on YouTube!
|
||||
Indev!
|
||||
Spiders everywhere!
|
||||
Check it out!
|
||||
Holy cow, man!
|
||||
It's a game!
|
||||
Made in Sweden!
|
||||
Uses LWJGL!
|
||||
Reticulating splines!
|
||||
Minecraft!
|
||||
Yaaay!
|
||||
Singleplayer!
|
||||
Keyboard compatible!
|
||||
Undocumented!
|
||||
Ingots!
|
||||
Exploding creepers!
|
||||
That's not a moon!
|
||||
l33t!
|
||||
Create!
|
||||
Survive!
|
||||
Dungeon!
|
||||
Exclusive!
|
||||
The bee's knees!
|
||||
Down with O.P.P.!
|
||||
Closed source!
|
||||
Classy!
|
||||
Wow!
|
||||
Not on steam!
|
||||
Oh man!
|
||||
Check it out!
|
||||
Awesome community!
|
||||
Pixels!
|
||||
Teetsuuuuoooo!
|
||||
Kaaneeeedaaaa!
|
||||
Now with difficulty!
|
||||
Enhanced!
|
||||
90% bug free!
|
||||
Pretty!
|
||||
12 herbs and spices!
|
||||
Fat free!
|
||||
Absolutely no memes!
|
||||
Free dental!
|
||||
Ask your doctor!
|
||||
Minors welcome!
|
||||
Cloud computing!
|
||||
Legal in Finland!
|
||||
Hard to label!
|
||||
Technically good!
|
||||
Bringing home the bacon!
|
||||
Indie!
|
||||
GOTY!
|
||||
Ceci n'est pas une title screen!
|
||||
Euclidian!
|
||||
Now in 3D!
|
||||
Inspirational!
|
||||
Herregud!
|
||||
Complex cellular automata!
|
||||
Yes, sir!
|
||||
Played by cowboys!
|
||||
OpenGL 1.1!
|
||||
Thousands of colors!
|
||||
Try it!
|
||||
Age of Wonders is better!
|
||||
Try the mushroom stew!
|
||||
Sensational!
|
||||
Hot tamale, hot hot tamale!
|
||||
Play him off, keyboard cat!
|
||||
Guaranteed!
|
||||
Macroscopic!
|
||||
Bring it on!
|
||||
Random splash!
|
||||
Call your mother!
|
||||
Monster infighting!
|
||||
Loved by millions!
|
||||
Ultimate edition!
|
||||
Freaky!
|
||||
You've got a brand new key!
|
||||
Water proof!
|
||||
Uninflammable!
|
||||
Whoa, dude!
|
||||
All inclusive!
|
||||
Tell your friends!
|
||||
NP is not in P!
|
||||
Notch <3 ez!
|
||||
Music by C418!
|
||||
Livestreamed!
|
||||
Haunted!
|
||||
Polynomial!
|
||||
Terrestrial!
|
||||
All is full of love!
|
||||
Full of stars!
|
||||
Scientific!
|
||||
Cooler than Spock!
|
||||
Collaborate and listen!
|
||||
Never dig down!
|
||||
Take frequent breaks!
|
||||
Not linear!
|
||||
Han shot first!
|
||||
Nice to meet you!
|
||||
Buckets of lava!
|
||||
Ride the pig!
|
||||
Larger than Earth!
|
||||
sqrt(-1) love you!
|
||||
Phobos anomaly!
|
||||
Punching wood!
|
||||
Falling off cliffs!
|
||||
0% sugar!
|
||||
150% hyperbole!
|
||||
Synecdoche!
|
||||
Let's danec!
|
||||
Seecret Friday update!
|
||||
Reference implementation!
|
||||
Lewd with two dudes with food!
|
||||
Kiss the sky!
|
||||
20 GOTO 10!
|
||||
Verlet intregration!
|
||||
Peter Griffin!
|
||||
Do not distribute!
|
||||
Cogito ergo sum!
|
||||
4815162342 lines of code!
|
||||
A skeleton popped out!
|
||||
The Work of Notch!
|
||||
The sum of its parts!
|
||||
BTAF used to be good!
|
||||
I miss ADOM!
|
||||
umop-apisdn!
|
||||
OICU812!
|
||||
Bring me Ray Cokes!
|
||||
Finger-licking!
|
||||
Thematic!
|
||||
Pneumatic!
|
||||
Sublime!
|
||||
Octagonal!
|
||||
Une baguette!
|
||||
Gargamel plays it!
|
||||
Rita is the new top dog!
|
||||
SWM forever!
|
||||
Representing Edsbyn!
|
||||
Matt Damon!
|
||||
Superfragilisticexpialidocious!
|
||||
Consummate V's!
|
||||
Cow Tools!
|
||||
Double buffered!
|
||||
Fan fiction!
|
||||
Flaxkikare!
|
||||
Jason! Jason! Jason!
|
||||
Hotter than the sun!
|
||||
Internet enabled!
|
||||
Autonomous!
|
||||
Engage!
|
||||
Fantasy!
|
||||
DRR! DRR! DRR!
|
||||
Kick it root down!
|
||||
Regional resources!
|
||||
Woo, facepunch!
|
||||
Woo, somethingawful!
|
||||
Woo, /v/!
|
||||
Woo, tigsource!
|
||||
Woo, minecraftforum!
|
||||
Woo, worldofminecraft!
|
||||
Woo, reddit!
|
||||
Woo, 2pp!
|
||||
Google anlyticsed!
|
||||
Now supports åäö!
|
||||
Give us Gordon!
|
||||
Tip your waiter!
|
||||
Very fun!
|
||||
12345 is a bad password!
|
||||
Vote for net neutrality!
|
||||
Lives in a pineapple under the sea!
|
||||
MAP11 has two names!
|
||||
Omnipotent!
|
||||
Gasp!
|
||||
...!
|
||||
Bees, bees, bees, bees!
|
||||
Jag känner en bot!
|
||||
This text is hard to read if you play the game at the default resolution, but at 1080p it's fine!
|
||||
Haha, LOL!
|
||||
Hampsterdance!
|
||||
Switches and ores!
|
||||
Menger sponge!
|
||||
idspispopd!
|
||||
Eple (original edit)!
|
||||
So fresh, so clean!
|
||||
Slow acting portals!
|
||||
Try the Nether!
|
||||
Don't look directly at the bugs!
|
||||
Oh, ok, Pigmen!
|
||||
Finally with ladders!
|
||||
Scary!
|
||||
Play Minecraft, Watch Topgear, Get Pig!
|
||||
Twittered about!
|
||||
Jump up, jump up, and get down!
|
||||
Joel is neat!
|
||||
A riddle, wrapped in a mystery!
|
||||
Huge tracts of land!
|
||||
Welcome to your Doom!
|
||||
Stay a while, stay forever!
|
||||
Stay a while and listen!
|
||||
Treatment for your rash!
|
||||
"Noun" is an autonym!
|
||||
Information wants to be free!
|
||||
"Almost never" is an interesting concept!
|
||||
Lots of truthiness!
|
||||
The creeper is a spy!
|
||||
Turing complete!
|
@ -393,7 +393,7 @@ public class PlatformRuntime {
|
||||
|
||||
private static EnumPlatformANGLE requestedANGLEPlatform = EnumPlatformANGLE.DEFAULT;
|
||||
private static int requestedGLVersion = 300;
|
||||
private static boolean requestedDisableKHRDebug = false;
|
||||
private static boolean requestedDisableKHRDebug = true;
|
||||
|
||||
public static void requestANGLE(EnumPlatformANGLE plaf) {
|
||||
requestedANGLEPlatform = plaf;
|
||||
|
@ -52,7 +52,7 @@ public class EaglerProfile {
|
||||
|
||||
NBTTagCompound profile;
|
||||
try {
|
||||
profile = CompressedStreamTools.func_1138_a(new EaglerInputStream(profileStorage));
|
||||
profile = CompressedStreamTools.readCompressed(new EaglerInputStream(profileStorage));
|
||||
}catch(IOException ex) {
|
||||
return;
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
package net.minecraft.client;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.lax1dude.eaglercraft.EagRuntime;
|
||||
import net.lax1dude.eaglercraft.beta.TextureNewClockFX;
|
||||
import net.lax1dude.eaglercraft.beta.TextureNewCompassFX;
|
||||
import net.lax1dude.eaglercraft.internal.EnumPlatformType;
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
import net.minecraft.src.AxisAlignedBB;
|
||||
import net.minecraft.src.Block;
|
||||
import net.minecraft.src.ChunkCoordinates;
|
||||
@ -59,17 +60,14 @@ import net.minecraft.src.SoundManager;
|
||||
import net.minecraft.src.StatList;
|
||||
import net.minecraft.src.Teleporter;
|
||||
import net.minecraft.src.Tessellator;
|
||||
import net.minecraft.src.TextureCompassFX;
|
||||
import net.minecraft.src.TextureFlamesFX;
|
||||
import net.minecraft.src.TextureLavaFX;
|
||||
import net.minecraft.src.TextureLavaFlowFX;
|
||||
import net.minecraft.src.TexturePackList;
|
||||
import net.minecraft.src.TexturePortalFX;
|
||||
import net.minecraft.src.TextureWatchFX;
|
||||
import net.minecraft.src.TextureWaterFX;
|
||||
import net.minecraft.src.TexureWaterFlowFX;
|
||||
import net.minecraft.src.Timer;
|
||||
import net.minecraft.src.UnexpectedThrowable;
|
||||
import net.minecraft.src.Vec3D;
|
||||
import net.minecraft.src.World;
|
||||
import net.minecraft.src.WorldProvider;
|
||||
@ -116,7 +114,7 @@ public class Minecraft {
|
||||
public SoundManager sndManager = new SoundManager();
|
||||
public MouseHelper mouseHelper;
|
||||
public TexturePackList texturePackList;
|
||||
private File mcDataDir;
|
||||
private VFile2 mcDataDir;
|
||||
private ISaveFormat saveLoader;
|
||||
public static long[] frameTimes = new long[512];
|
||||
public static long[] tickTimes = new long[512];
|
||||
@ -126,7 +124,7 @@ public class Minecraft {
|
||||
private int serverPort;
|
||||
private TextureWaterFX textureWaterFX = new TextureWaterFX();
|
||||
private TextureLavaFX textureLavaFX = new TextureLavaFX();
|
||||
private static File minecraftDir = null;
|
||||
private static VFile2 minecraftDir = null;
|
||||
public volatile boolean running = true;
|
||||
public String debug = "";
|
||||
boolean isTakingScreenshot = false;
|
||||
@ -203,7 +201,7 @@ public class Minecraft {
|
||||
|
||||
RenderManager.instance.itemRenderer = new ItemRenderer(this);
|
||||
this.mcDataDir = getMinecraftDir();
|
||||
this.saveLoader = new SaveConverterMcRegion(new File(this.mcDataDir, "saves"));
|
||||
this.saveLoader = new SaveConverterMcRegion(new VFile2(this.mcDataDir, "saves"));
|
||||
this.gameSettings = new GameSettings(this, this.mcDataDir);
|
||||
this.texturePackList = new TexturePackList(this, this.mcDataDir);
|
||||
this.renderEngine = new RenderEngine(this.texturePackList, this.gameSettings);
|
||||
@ -229,8 +227,8 @@ public class Minecraft {
|
||||
this.renderEngine.registerTextureFX(this.textureLavaFX);
|
||||
this.renderEngine.registerTextureFX(this.textureWaterFX);
|
||||
this.renderEngine.registerTextureFX(new TexturePortalFX());
|
||||
this.renderEngine.registerTextureFX(new TextureCompassFX(this));
|
||||
this.renderEngine.registerTextureFX(new TextureWatchFX(this));
|
||||
this.renderEngine.registerTextureFX(new TextureNewCompassFX());
|
||||
this.renderEngine.registerTextureFX(new TextureNewClockFX());
|
||||
this.renderEngine.registerTextureFX(new TexureWaterFlowFX());
|
||||
this.renderEngine.registerTextureFX(new TextureLavaFlowFX());
|
||||
this.renderEngine.registerTextureFX(new TextureFlamesFX(0));
|
||||
@ -302,44 +300,14 @@ public class Minecraft {
|
||||
var9.draw();
|
||||
}
|
||||
|
||||
public static File getMinecraftDir() {
|
||||
public static VFile2 getMinecraftDir() {
|
||||
if(minecraftDir == null) {
|
||||
minecraftDir = getAppDir("minecraft");
|
||||
minecraftDir = new VFile2("minecraft");
|
||||
}
|
||||
|
||||
return minecraftDir;
|
||||
}
|
||||
|
||||
public static File getAppDir(String var0) {
|
||||
String var1 = System.getProperty("user.home", ".");
|
||||
File var2;
|
||||
switch(EnumOSMappingHelper.enumOSMappingArray[getOs().ordinal()]) {
|
||||
case 1:
|
||||
case 2:
|
||||
var2 = new File(var1, '.' + var0 + '/');
|
||||
break;
|
||||
case 3:
|
||||
String var3 = System.getenv("APPDATA");
|
||||
if(var3 != null) {
|
||||
var2 = new File(var3, "." + var0 + '/');
|
||||
} else {
|
||||
var2 = new File(var1, '.' + var0 + '/');
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
var2 = new File(var1, "Library/Application Support/" + var0);
|
||||
break;
|
||||
default:
|
||||
var2 = new File(var1, var0 + '/');
|
||||
}
|
||||
|
||||
if(!var2.exists() && !var2.mkdirs()) {
|
||||
throw new RuntimeException("The working directory could not be created: " + var2);
|
||||
} else {
|
||||
return var2;
|
||||
}
|
||||
}
|
||||
|
||||
private static EnumOS2 getOs() {
|
||||
String var0 = System.getProperty("os.name").toLowerCase();
|
||||
return var0.contains("win") ? EnumOS2.windows : (var0.contains("mac") ? EnumOS2.macos : (var0.contains("solaris") ? EnumOS2.solaris : (var0.contains("sunos") ? EnumOS2.solaris : (var0.contains("linux") ? EnumOS2.linux : (var0.contains("unix") ? EnumOS2.linux : EnumOS2.unknown)))));
|
||||
|
@ -1,8 +1,11 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EagRuntime;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AchievementMap {
|
||||
@ -11,10 +14,9 @@ public class AchievementMap {
|
||||
|
||||
private AchievementMap() {
|
||||
try {
|
||||
BufferedReader var1 = new BufferedReader(new InputStreamReader(AchievementMap.class.getResourceAsStream("/achievement/map.txt")));
|
||||
List<String> var1 = EagRuntime.getResourceLines("/achievement/map.txt");
|
||||
|
||||
while(true) {
|
||||
String var2 = var1.readLine();
|
||||
for(String var2 : var1) {
|
||||
if(var2 == null) {
|
||||
break;
|
||||
}
|
||||
|
@ -1,52 +1,53 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class ChunkLoader implements IChunkLoader {
|
||||
private File saveDir;
|
||||
private VFile2 saveDir;
|
||||
private boolean createIfNecessary;
|
||||
|
||||
public ChunkLoader(File var1, boolean var2) {
|
||||
public ChunkLoader(VFile2 var1, boolean var2) {
|
||||
this.saveDir = var1;
|
||||
this.createIfNecessary = var2;
|
||||
}
|
||||
|
||||
private File chunkFileForXZ(int var1, int var2) {
|
||||
private VFile2 chunkFileForXZ(int var1, int var2) {
|
||||
String var3 = "c." + Integer.toString(var1, 36) + "." + Integer.toString(var2, 36) + ".dat";
|
||||
String var4 = Integer.toString(var1 & 63, 36);
|
||||
String var5 = Integer.toString(var2 & 63, 36);
|
||||
File var6 = new File(this.saveDir, var4);
|
||||
VFile2 var6 = new VFile2(this.saveDir, var4);
|
||||
if(!var6.exists()) {
|
||||
if(!this.createIfNecessary) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var6.mkdir();
|
||||
//var6.mkdir();
|
||||
}
|
||||
|
||||
var6 = new File(var6, var5);
|
||||
var6 = new VFile2(var6, var5);
|
||||
if(!var6.exists()) {
|
||||
if(!this.createIfNecessary) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var6.mkdir();
|
||||
//var6.mkdir();
|
||||
}
|
||||
|
||||
var6 = new File(var6, var3);
|
||||
var6 = new VFile2(var6, var3);
|
||||
return !var6.exists() && !this.createIfNecessary ? null : var6;
|
||||
}
|
||||
|
||||
public Chunk loadChunk(World var1, int var2, int var3) throws IOException {
|
||||
File var4 = this.chunkFileForXZ(var2, var3);
|
||||
VFile2 var4 = this.chunkFileForXZ(var2, var3);
|
||||
if(var4 != null && var4.exists()) {
|
||||
try {
|
||||
FileInputStream var5 = new FileInputStream(var4);
|
||||
NBTTagCompound var6 = CompressedStreamTools.func_1138_a(var5);
|
||||
NBTTagCompound var6;
|
||||
try (InputStream is = var4.getInputStream()) {
|
||||
var6 = CompressedStreamTools.readCompressed(is);
|
||||
}
|
||||
if(!var6.hasKey("Level")) {
|
||||
System.out.println("Chunk file at " + var2 + "," + var3 + " is missing level data, skipping");
|
||||
return null;
|
||||
@ -77,21 +78,22 @@ public class ChunkLoader implements IChunkLoader {
|
||||
|
||||
public void saveChunk(World var1, Chunk var2) throws IOException {
|
||||
var1.checkSessionLock();
|
||||
File var3 = this.chunkFileForXZ(var2.xPosition, var2.zPosition);
|
||||
VFile2 var3 = this.chunkFileForXZ(var2.xPosition, var2.zPosition);
|
||||
if(var3.exists()) {
|
||||
WorldInfo var4 = var1.func_22144_v();
|
||||
var4.setSizeOnDisk(var4.getSizeOnDisk() - var3.length());
|
||||
}
|
||||
|
||||
try {
|
||||
File var10 = new File(this.saveDir, "tmp_chunk.dat");
|
||||
FileOutputStream var5 = new FileOutputStream(var10);
|
||||
VFile2 var10 = new VFile2(this.saveDir, "tmp_chunk.dat");
|
||||
// FileOutputStream var5 = new FileOutputStream(var10.getOutputStream());
|
||||
NBTTagCompound var6 = new NBTTagCompound();
|
||||
NBTTagCompound var7 = new NBTTagCompound();
|
||||
var6.setTag("Level", var7);
|
||||
storeChunkInCompound(var2, var1, var7);
|
||||
CompressedStreamTools.writeGzippedCompoundToOutputStream(var6, var5);
|
||||
var5.close();
|
||||
try (OutputStream os = var3.getOutputStream()) {
|
||||
CompressedStreamTools.writeGzippedCompoundToOutputStream(var6, os);
|
||||
}
|
||||
if(var3.exists()) {
|
||||
var3.delete();
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import javax.imageio.ImageIO;
|
||||
import net.lax1dude.eaglercraft.opengl.ImageData;
|
||||
|
||||
public class ColorizerFoliage {
|
||||
private static final int[] foliageBuffer = new int[65536];
|
||||
@ -23,7 +22,7 @@ public class ColorizerFoliage {
|
||||
|
||||
static {
|
||||
try {
|
||||
BufferedImage var0 = ImageIO.read(ColorizerFoliage.class.getResource("/misc/foliagecolor.png"));
|
||||
ImageData var0 = ImageData.loadImageFile("/misc/foliagecolor.png").swapRB();
|
||||
var0.getRGB(0, 0, 256, 256, foliageBuffer, 0, 256);
|
||||
} catch (Exception var1) {
|
||||
var1.printStackTrace();
|
||||
|
@ -1,7 +1,6 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import javax.imageio.ImageIO;
|
||||
import net.lax1dude.eaglercraft.opengl.ImageData;
|
||||
|
||||
public class ColorizerGrass {
|
||||
private static final int[] grassBuffer = new int[65536];
|
||||
@ -15,7 +14,7 @@ public class ColorizerGrass {
|
||||
|
||||
static {
|
||||
try {
|
||||
BufferedImage var0 = ImageIO.read(ColorizerFoliage.class.getResource("/misc/grasscolor.png"));
|
||||
ImageData var0 = ImageData.loadImageFile("/misc/grasscolor.png").swapRB();
|
||||
var0.getRGB(0, 0, 256, 256, grassBuffer, 0, 256);
|
||||
} catch (Exception var1) {
|
||||
var1.printStackTrace();
|
||||
|
@ -1,22 +1,16 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutput;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.*;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
import java.util.zip.GZIPOutputStream;
|
||||
|
||||
public class CompressedStreamTools {
|
||||
public static NBTTagCompound func_1138_a(InputStream var0) throws IOException {
|
||||
public static NBTTagCompound readCompressed(InputStream var0) throws IOException {
|
||||
DataInputStream var1 = new DataInputStream(new GZIPInputStream(var0));
|
||||
|
||||
NBTTagCompound var2;
|
||||
try {
|
||||
var2 = func_1141_a(var1);
|
||||
var2 = read(var1);
|
||||
} finally {
|
||||
var1.close();
|
||||
}
|
||||
@ -28,14 +22,40 @@ public class CompressedStreamTools {
|
||||
DataOutputStream var2 = new DataOutputStream(new GZIPOutputStream(var1));
|
||||
|
||||
try {
|
||||
func_1139_a(var0, var2);
|
||||
write(var0, var2);
|
||||
} finally {
|
||||
var2.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static NBTTagCompound func_1141_a(DataInput var0) throws IOException {
|
||||
public static NBTTagCompound decompress(byte[] var0) throws IOException {
|
||||
DataInputStream var1 = new DataInputStream(new GZIPInputStream(new ByteArrayInputStream(var0)));
|
||||
|
||||
NBTTagCompound var2;
|
||||
try {
|
||||
var2 = read(var1);
|
||||
} finally {
|
||||
var1.close();
|
||||
}
|
||||
|
||||
return var2;
|
||||
}
|
||||
|
||||
public static byte[] compress(NBTTagCompound var0) throws IOException {
|
||||
ByteArrayOutputStream var1 = new ByteArrayOutputStream();
|
||||
DataOutputStream var2 = new DataOutputStream(new GZIPOutputStream(var1));
|
||||
|
||||
try {
|
||||
write(var0, var2);
|
||||
} finally {
|
||||
var2.close();
|
||||
}
|
||||
|
||||
return var1.toByteArray();
|
||||
}
|
||||
|
||||
public static NBTTagCompound read(DataInput var0) throws IOException {
|
||||
NBTBase var1 = NBTBase.readTag(var0);
|
||||
if(var1 instanceof NBTTagCompound) {
|
||||
return (NBTTagCompound)var1;
|
||||
@ -44,7 +64,7 @@ public class CompressedStreamTools {
|
||||
}
|
||||
}
|
||||
|
||||
public static void func_1139_a(NBTTagCompound var0, DataOutput var1) throws IOException {
|
||||
public static void write(NBTTagCompound var0, DataOutput var1) throws IOException {
|
||||
NBTBase.writeTag(var0, var1);
|
||||
}
|
||||
}
|
||||
|
@ -464,9 +464,9 @@ public class EntityRenderer {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/terrain.png"));
|
||||
if(this.mc.gameSettings.fancyGraphics) {
|
||||
//if(this.mc.gameSettings.fancyGraphics) {
|
||||
GL11.glColorMask(false, false, false, false);
|
||||
var14 = var3.sortAndRender(var2, 1, (double)var1);
|
||||
var14 = var3.sortAndRender(var2, 1, var1);
|
||||
GL11.glColorMask(true, true, true, true);
|
||||
if(this.mc.gameSettings.anaglyph) {
|
||||
if(var15 == 0) {
|
||||
@ -477,11 +477,11 @@ public class EntityRenderer {
|
||||
}
|
||||
|
||||
if(var14 > 0) {
|
||||
var3.func_944_a(1, (double)var1);
|
||||
var3.func_944_a(1, var1);
|
||||
}
|
||||
} else {
|
||||
var3.sortAndRender(var2, 1, (double)var1);
|
||||
}
|
||||
//} else {
|
||||
var3.sortAndRender(var2, 1, var1);
|
||||
//}
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
|
@ -1,14 +1,15 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.File;
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
class FileMatcher implements Comparable {
|
||||
private final File field_22326_a;
|
||||
private final VFile2 field_22326_a;
|
||||
private final int field_22325_b;
|
||||
private final int field_22327_c;
|
||||
|
||||
public FileMatcher(File var1) {
|
||||
public FileMatcher(VFile2 var1) {
|
||||
this.field_22326_a = var1;
|
||||
Matcher var2 = ChunkFilePattern.field_22189_a.matcher(var1.getName());
|
||||
if(var2.matches()) {
|
||||
@ -33,7 +34,7 @@ class FileMatcher implements Comparable {
|
||||
}
|
||||
}
|
||||
|
||||
public File func_22324_a() {
|
||||
public VFile2 func_22324_a() {
|
||||
return this.field_22326_a;
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,8 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.*;
|
||||
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
@ -35,7 +33,7 @@ public class GameSettings {
|
||||
public KeyBinding keyBindSneak = new KeyBinding("key.sneak", 42);
|
||||
public KeyBinding[] keyBindings = new KeyBinding[]{this.keyBindForward, this.keyBindLeft, this.keyBindBack, this.keyBindRight, this.keyBindJump, this.keyBindSneak, this.keyBindDrop, this.keyBindInventory, this.keyBindChat, this.keyBindToggleFog};
|
||||
protected Minecraft mc;
|
||||
private File optionsFile;
|
||||
private VFile2 optionsFile;
|
||||
public int difficulty = 2;
|
||||
public boolean hideGUI = false;
|
||||
public boolean thirdPersonView = false;
|
||||
@ -48,9 +46,9 @@ public class GameSettings {
|
||||
public float field_22271_G = 1.0F;
|
||||
public int field_25148_H = 0;
|
||||
|
||||
public GameSettings(Minecraft var1, File var2) {
|
||||
public GameSettings(Minecraft var1, VFile2 var2) {
|
||||
this.mc = var1;
|
||||
this.optionsFile = new File(var2, "options.txt");
|
||||
this.optionsFile = new VFile2(var2, "options.txt");
|
||||
this.loadOptions();
|
||||
}
|
||||
|
||||
@ -172,7 +170,7 @@ public class GameSettings {
|
||||
return;
|
||||
}
|
||||
|
||||
BufferedReader var1 = new BufferedReader(new FileReader(this.optionsFile));
|
||||
BufferedReader var1 = new BufferedReader(new InputStreamReader(this.optionsFile.getInputStream()));
|
||||
String var2 = "";
|
||||
|
||||
while(true) {
|
||||
@ -258,7 +256,7 @@ public class GameSettings {
|
||||
|
||||
public void saveOptions() {
|
||||
try {
|
||||
PrintWriter var1 = new PrintWriter(new FileWriter(this.optionsFile));
|
||||
PrintWriter var1 = new PrintWriter(new OutputStreamWriter(this.optionsFile.getOutputStream()));
|
||||
var1.println("music:" + this.musicVolume);
|
||||
var1.println("sound:" + this.soundVolume);
|
||||
var1.println("invertYMouse:" + this.invertMouse);
|
||||
|
@ -1,27 +0,0 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public final class GameWindowListener extends WindowAdapter {
|
||||
final Minecraft mc;
|
||||
final Thread mcThread;
|
||||
|
||||
public GameWindowListener(Minecraft var1, Thread var2) {
|
||||
this.mc = var1;
|
||||
this.mcThread = var2;
|
||||
}
|
||||
|
||||
public void windowClosing(WindowEvent var1) {
|
||||
this.mc.shutdown();
|
||||
|
||||
try {
|
||||
this.mcThread.join();
|
||||
} catch (InterruptedException var3) {
|
||||
var3.printStackTrace();
|
||||
}
|
||||
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.peyton.java.awt.Color;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
|
@ -1,12 +1,8 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.Random;
|
||||
import java.util.*;
|
||||
|
||||
import net.lax1dude.eaglercraft.EagRuntime;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class GuiMainMenu extends GuiScreen {
|
||||
@ -16,26 +12,8 @@ public class GuiMainMenu extends GuiScreen {
|
||||
private GuiButton field_25096_l;
|
||||
|
||||
public GuiMainMenu() {
|
||||
try {
|
||||
ArrayList var1 = new ArrayList();
|
||||
BufferedReader var2 = new BufferedReader(new InputStreamReader(GuiMainMenu.class.getResourceAsStream("/title/splashes.txt"), Charset.forName("UTF-8")));
|
||||
String var3 = "";
|
||||
|
||||
while(true) {
|
||||
var3 = var2.readLine();
|
||||
if(var3 == null) {
|
||||
this.splashText = (String)var1.get(rand.nextInt(var1.size()));
|
||||
break;
|
||||
}
|
||||
|
||||
var3 = var3.trim();
|
||||
if(var3.length() > 0) {
|
||||
var1.add(var3);
|
||||
}
|
||||
}
|
||||
} catch (Exception var4) {
|
||||
}
|
||||
|
||||
ArrayList<String> splashes = new ArrayList<>(Arrays.asList("Darviglet!", "eaglerenophile!", "You Eagler!", "Yeeeeeee!", "yeee", "EEEEEEEEE!", "You Darvig!", "You Vigg!", ":>", "|>", "You Yumpster!", "Poincare", "Socket", "MiG Mad Marine", "Wild Weasel", "YGBSM", "Union Aerospace Corporation"));
|
||||
this.splashText = splashes.get(rand.nextInt(splashes.size()));
|
||||
}
|
||||
|
||||
public void updateScreen() {
|
||||
@ -48,11 +26,8 @@ public class GuiMainMenu extends GuiScreen {
|
||||
public void initGui() {
|
||||
Calendar var1 = Calendar.getInstance();
|
||||
var1.setTime(new Date());
|
||||
if(var1.get(2) + 1 == 11 && var1.get(5) == 9) {
|
||||
this.splashText = "Happy birthday, ez!";
|
||||
} else if(var1.get(2) + 1 == 6 && var1.get(5) == 1) {
|
||||
this.splashText = "Happy birthday, Notch!";
|
||||
} else if(var1.get(2) + 1 == 12 && var1.get(5) == 24) {
|
||||
|
||||
if(var1.get(2) + 1 == 12 && var1.get(5) == 24) {
|
||||
this.splashText = "Merry X-mas!";
|
||||
} else if(var1.get(2) + 1 == 1 && var1.get(5) == 1) {
|
||||
this.splashText = "Happy new year!";
|
||||
@ -119,8 +94,20 @@ public class GuiMainMenu extends GuiScreen {
|
||||
this.drawCenteredString(this.fontRenderer, this.splashText, 0, -8, 16776960);
|
||||
GL11.glPopMatrix();
|
||||
this.drawString(this.fontRenderer, "Minecraft Beta 1.4_01", 2, 2, 5263440);
|
||||
String var9 = "Copyright Mojang AB. Do not distribute.";
|
||||
this.drawString(this.fontRenderer, var9, this.width - this.fontRenderer.getStringWidth(var9) - 2, this.height - 10, 16777215);
|
||||
this.drawString(this.fontRenderer, "Eaglercraft 25w21a", 2, this.height - 10, 16777215);
|
||||
this.drawString(this.fontRenderer, "site resources are", this.width - this.fontRenderer.getStringWidth("site resources are") - 2, this.height - 20, 16777215);
|
||||
this.drawString(this.fontRenderer, "copyright 2010 Mojang AB", this.width - this.fontRenderer.getStringWidth("copyright 2010 Mojang AB") - 2, this.height - 10, 16777215);
|
||||
|
||||
// String var16;
|
||||
// long var17 = EagRuntime.maxMemory();
|
||||
// long var9 = EagRuntime.totalMemory();
|
||||
// long var11 = EagRuntime.freeMemory();
|
||||
// long var13 = var7 - var11;
|
||||
// var16 = "Free memory: " + var13 * 100L / var17 + "% of " + var7 / 1024L / 1024L + "MB";
|
||||
// this.drawString(this.fontRenderer, var16, this.width - this.fontRenderer.getStringWidth(var16) - 2, 2, 8421504);
|
||||
// var16 = "Allocated memory: " + var9 * 100L / var17 + "% (" + var9 / 1024L / 1024L + "MB)";
|
||||
// this.drawString(this.fontRenderer, var16, this.width - this.fontRenderer.getStringWidth(var16) - 2, 12, 8421504);
|
||||
|
||||
super.drawScreen(var1, var2, var3);
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,9 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.awt.Toolkit;
|
||||
import java.awt.datatransfer.DataFlavor;
|
||||
import java.awt.datatransfer.Transferable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.lax1dude.eaglercraft.EagRuntime;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
@ -37,16 +36,7 @@ public class GuiScreen extends Gui {
|
||||
}
|
||||
|
||||
public static String getClipboardString() {
|
||||
try {
|
||||
Transferable var0 = Toolkit.getDefaultToolkit().getSystemClipboard().getContents((Object)null);
|
||||
if(var0 != null && var0.isDataFlavorSupported(DataFlavor.stringFlavor)) {
|
||||
String var1 = (String)var0.getTransferData(DataFlavor.stringFlavor);
|
||||
return var1;
|
||||
}
|
||||
} catch (Exception var2) {
|
||||
}
|
||||
|
||||
return null;
|
||||
return EagRuntime.getClipboard();
|
||||
}
|
||||
|
||||
protected void mouseClicked(int var1, int var2, int var3) {
|
||||
|
@ -41,10 +41,10 @@ class GuiTexturePackSlot extends GuiSlot {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
var5.startDrawingQuads();
|
||||
var5.setColorOpaque_I(16777215);
|
||||
var5.addVertexWithUV((double)var2, (double)(var3 + var4), 0.0D, 0.0D, 1.0D);
|
||||
var5.addVertexWithUV((double)(var2 + 32), (double)(var3 + var4), 0.0D, 1.0D, 1.0D);
|
||||
var5.addVertexWithUV((double)(var2 + 32), (double)var3, 0.0D, 1.0D, 0.0D);
|
||||
var5.addVertexWithUV((double)var2, (double)var3, 0.0D, 0.0D, 0.0D);
|
||||
var5.addVertexWithUV(var2, var3 + var4, 0.0D, 0.0D, 1.0D);
|
||||
var5.addVertexWithUV(var2 + 32, var3 + var4, 0.0D, 1.0D, 1.0D);
|
||||
var5.addVertexWithUV(var2 + 32, var3, 0.0D, 1.0D, 0.0D);
|
||||
var5.addVertexWithUV(var2, var3, 0.0D, 0.0D, 0.0D);
|
||||
var5.draw();
|
||||
this.parentTexturePackGui.drawString(GuiTexturePacks.func_22127_j(this.parentTexturePackGui), var6.texturePackFileName, var2 + 32 + 2, var3 + 1, 16777215);
|
||||
this.parentTexturePackGui.drawString(GuiTexturePacks.func_22120_k(this.parentTexturePackGui), var6.firstDescriptionLine, var2 + 32 + 2, var3 + 12, 8421504);
|
||||
|
@ -1,6 +1,6 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.File;
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class GuiTexturePacks extends GuiScreen {
|
||||
@ -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 File(Minecraft.getMinecraftDir(), "texturepacks")).getAbsolutePath();
|
||||
this.fileLocation = (new VFile2(Minecraft.getMinecraftDir(), "texturepacks")).getPath();
|
||||
this.guiTexturePackSlot = new GuiTexturePackSlot(this);
|
||||
this.guiTexturePackSlot.registerScrollButtons(this.controlList, 7, 8);
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
public interface IProgressUpdate {
|
||||
void func_594_b(String var1);
|
||||
void displayProgressMessage(String var1);
|
||||
|
||||
void displayLoadingString(String var1);
|
||||
|
||||
|
@ -1,7 +0,0 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
public interface ImageBuffer {
|
||||
BufferedImage parseUserSkin(BufferedImage var1);
|
||||
}
|
@ -1,88 +0,0 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.awt.Graphics;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.awt.image.DataBufferInt;
|
||||
import java.awt.image.ImageObserver;
|
||||
|
||||
public class ImageBufferDownload implements ImageBuffer {
|
||||
private int[] imageData;
|
||||
private int imageWidth;
|
||||
private int imageHeight;
|
||||
|
||||
public BufferedImage parseUserSkin(BufferedImage var1) {
|
||||
if(var1 == null) {
|
||||
return null;
|
||||
} else {
|
||||
this.imageWidth = 64;
|
||||
this.imageHeight = 32;
|
||||
BufferedImage var2 = new BufferedImage(this.imageWidth, this.imageHeight, 2);
|
||||
Graphics var3 = var2.getGraphics();
|
||||
var3.drawImage(var1, 0, 0, (ImageObserver)null);
|
||||
var3.dispose();
|
||||
this.imageData = ((DataBufferInt)var2.getRaster().getDataBuffer()).getData();
|
||||
this.func_884_b(0, 0, 32, 16);
|
||||
this.func_885_a(32, 0, 64, 32);
|
||||
this.func_884_b(0, 16, 64, 32);
|
||||
boolean var4 = false;
|
||||
|
||||
int var5;
|
||||
int var6;
|
||||
int var7;
|
||||
for(var5 = 32; var5 < 64; ++var5) {
|
||||
for(var6 = 0; var6 < 16; ++var6) {
|
||||
var7 = this.imageData[var5 + var6 * 64];
|
||||
if((var7 >> 24 & 255) < 128) {
|
||||
var4 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!var4) {
|
||||
for(var5 = 32; var5 < 64; ++var5) {
|
||||
for(var6 = 0; var6 < 16; ++var6) {
|
||||
var7 = this.imageData[var5 + var6 * 64];
|
||||
if((var7 >> 24 & 255) < 128) {
|
||||
var4 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return var2;
|
||||
}
|
||||
}
|
||||
|
||||
private void func_885_a(int var1, int var2, int var3, int var4) {
|
||||
if(!this.func_886_c(var1, var2, var3, var4)) {
|
||||
for(int var5 = var1; var5 < var3; ++var5) {
|
||||
for(int var6 = var2; var6 < var4; ++var6) {
|
||||
this.imageData[var5 + var6 * this.imageWidth] &= 16777215;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void func_884_b(int var1, int var2, int var3, int var4) {
|
||||
for(int var5 = var1; var5 < var3; ++var5) {
|
||||
for(int var6 = var2; var6 < var4; ++var6) {
|
||||
this.imageData[var5 + var6 * this.imageWidth] |= -16777216;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private boolean func_886_c(int var1, int var2, int var3, int var4) {
|
||||
for(int var5 = var1; var5 < var3; ++var5) {
|
||||
for(int var6 = var2; var6 < var4; ++var6) {
|
||||
int var7 = this.imageData[var5 + var6 * this.imageWidth];
|
||||
if((var7 >> 24 & 255) < 128) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
|
||||
public class IsoImageBuffer {
|
||||
public BufferedImage field_1348_a;
|
||||
public World worldObj;
|
||||
public int field_1354_c;
|
||||
public int field_1353_d;
|
||||
public boolean field_1352_e = false;
|
||||
public boolean field_1351_f = false;
|
||||
public int field_1350_g = 0;
|
||||
public boolean field_1349_h = false;
|
||||
|
||||
public IsoImageBuffer(World var1, int var2, int var3) {
|
||||
this.worldObj = var1;
|
||||
this.func_889_a(var2, var3);
|
||||
}
|
||||
|
||||
public void func_889_a(int var1, int var2) {
|
||||
this.field_1352_e = false;
|
||||
this.field_1354_c = var1;
|
||||
this.field_1353_d = var2;
|
||||
this.field_1350_g = 0;
|
||||
this.field_1349_h = false;
|
||||
}
|
||||
|
||||
public void func_888_a(World var1, int var2, int var3) {
|
||||
this.worldObj = var1;
|
||||
this.func_889_a(var2, var3);
|
||||
}
|
||||
}
|
@ -5,33 +5,33 @@ import org.lwjgl.opengl.Display;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class LoadingScreenRenderer implements IProgressUpdate {
|
||||
private String field_1004_a = "";
|
||||
private String currentlyDisplayedProgress = "";
|
||||
private Minecraft mc;
|
||||
private String field_1007_c = "";
|
||||
private long field_1006_d = System.currentTimeMillis();
|
||||
private boolean field_1005_e = false;
|
||||
private String currentlyDisplayedText = "";
|
||||
private long systemTime = System.currentTimeMillis();
|
||||
private boolean noError = false;
|
||||
|
||||
public LoadingScreenRenderer(Minecraft var1) {
|
||||
this.mc = var1;
|
||||
}
|
||||
|
||||
public void printText(String var1) {
|
||||
this.field_1005_e = false;
|
||||
this.noError = false;
|
||||
this.func_597_c(var1);
|
||||
}
|
||||
|
||||
public void func_594_b(String var1) {
|
||||
this.field_1005_e = true;
|
||||
this.func_597_c(this.field_1007_c);
|
||||
public void displayProgressMessage(String var1) {
|
||||
this.noError = true;
|
||||
this.func_597_c(this.currentlyDisplayedText);
|
||||
}
|
||||
|
||||
public void func_597_c(String var1) {
|
||||
if(!this.mc.running) {
|
||||
if(!this.field_1005_e) {
|
||||
throw new MinecraftError();
|
||||
if(!this.noError) {
|
||||
//throw new MinecraftError();
|
||||
}
|
||||
} else {
|
||||
this.field_1007_c = var1;
|
||||
this.currentlyDisplayedText = var1;
|
||||
ScaledResolution var2 = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
|
||||
GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
|
||||
GL11.glMatrixMode(GL11.GL_PROJECTION);
|
||||
@ -45,26 +45,26 @@ public class LoadingScreenRenderer implements IProgressUpdate {
|
||||
|
||||
public void displayLoadingString(String var1) {
|
||||
if(!this.mc.running) {
|
||||
if(!this.field_1005_e) {
|
||||
throw new MinecraftError();
|
||||
if(!this.noError) {
|
||||
//throw new MinecraftError();
|
||||
}
|
||||
} else {
|
||||
this.field_1006_d = 0L;
|
||||
this.field_1004_a = var1;
|
||||
this.systemTime = 0L;
|
||||
this.currentlyDisplayedProgress = var1;
|
||||
this.setLoadingProgress(-1);
|
||||
this.field_1006_d = 0L;
|
||||
this.systemTime = 0L;
|
||||
}
|
||||
}
|
||||
|
||||
public void setLoadingProgress(int var1) {
|
||||
if(!this.mc.running) {
|
||||
if(!this.field_1005_e) {
|
||||
if(!this.noError) {
|
||||
throw new MinecraftError();
|
||||
}
|
||||
} else {
|
||||
long var2 = System.currentTimeMillis();
|
||||
if(var2 - this.field_1006_d >= 20L) {
|
||||
this.field_1006_d = var2;
|
||||
if(var2 - this.systemTime >= 20L) {
|
||||
this.systemTime = var2;
|
||||
ScaledResolution var4 = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight);
|
||||
int var5 = var4.getScaledWidth();
|
||||
int var6 = var4.getScaledHeight();
|
||||
@ -108,8 +108,8 @@ public class LoadingScreenRenderer implements IProgressUpdate {
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
this.mc.fontRenderer.drawStringWithShadow(this.field_1007_c, (var5 - this.mc.fontRenderer.getStringWidth(this.field_1007_c)) / 2, var6 / 2 - 4 - 16, 16777215);
|
||||
this.mc.fontRenderer.drawStringWithShadow(this.field_1004_a, (var5 - this.mc.fontRenderer.getStringWidth(this.field_1004_a)) / 2, var6 / 2 - 4 + 8, 16777215);
|
||||
this.mc.fontRenderer.drawStringWithShadow(this.currentlyDisplayedText, (var5 - this.mc.fontRenderer.getStringWidth(this.currentlyDisplayedText)) / 2, var6 / 2 - 4 - 16, 16777215);
|
||||
this.mc.fontRenderer.drawStringWithShadow(this.currentlyDisplayedProgress, (var5 - this.mc.fontRenderer.getStringWidth(this.currentlyDisplayedProgress)) / 2, var6 / 2 - 4 + 8, 16777215);
|
||||
Display.update();
|
||||
|
||||
try {
|
||||
|
@ -1,21 +1,22 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class McRegionChunkLoader implements IChunkLoader {
|
||||
private final File worldDir;
|
||||
private final VFile2 worldDir;
|
||||
|
||||
public McRegionChunkLoader(File var1) {
|
||||
public McRegionChunkLoader(VFile2 var1) {
|
||||
this.worldDir = var1;
|
||||
}
|
||||
|
||||
public Chunk loadChunk(World var1, int var2, int var3) throws IOException {
|
||||
DataInputStream var4 = RegionFileCache.getChunkInputStream(this.worldDir, var2, var3);
|
||||
if(var4 != null) {
|
||||
NBTTagCompound var5 = CompressedStreamTools.func_1141_a(var4);
|
||||
NBTTagCompound var5 = CompressedStreamTools.read(var4);
|
||||
if(!var5.hasKey("Level")) {
|
||||
System.out.println("Chunk file at " + var2 + "," + var3 + " is missing level data, skipping");
|
||||
return null;
|
||||
@ -48,7 +49,7 @@ public class McRegionChunkLoader implements IChunkLoader {
|
||||
NBTTagCompound var5 = new NBTTagCompound();
|
||||
var4.setTag("Level", var5);
|
||||
ChunkLoader.storeChunkInCompound(var2, var1, var5);
|
||||
CompressedStreamTools.func_1139_a(var4, var3);
|
||||
CompressedStreamTools.write(var4, var3);
|
||||
var3.close();
|
||||
WorldInfo var6 = var1.func_22144_v();
|
||||
var6.setSizeOnDisk(var6.getSizeOnDisk() + (long)RegionFileCache.func_22191_b(this.worldDir, var2.xPosition, var2.zPosition));
|
||||
|
@ -1,11 +1,8 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.RandomAccessFile;
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.zip.DeflaterOutputStream;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
@ -13,7 +10,7 @@ import java.util.zip.InflaterInputStream;
|
||||
|
||||
public class RegionFile {
|
||||
private static final byte[] field_22213_a = new byte[4096];
|
||||
private final File field_22212_b;
|
||||
private final VFile2 field_22212_b;
|
||||
private RandomAccessFile field_22219_c;
|
||||
private final int[] field_22218_d = new int[1024];
|
||||
private final int[] field_22217_e = new int[1024];
|
||||
@ -21,17 +18,17 @@ public class RegionFile {
|
||||
private int field_22215_g;
|
||||
private long field_22214_h = 0L;
|
||||
|
||||
public RegionFile(File var1) {
|
||||
public RegionFile(VFile2 var1) {
|
||||
this.field_22212_b = var1;
|
||||
this.func_22204_b("REGION LOAD " + this.field_22212_b);
|
||||
this.field_22215_g = 0;
|
||||
|
||||
try {
|
||||
if(var1.exists()) {
|
||||
this.field_22214_h = var1.lastModified();
|
||||
//this.field_22214_h = var1.lastModified();
|
||||
}
|
||||
|
||||
this.field_22219_c = new RandomAccessFile(var1, "rw");
|
||||
this.field_22219_c = new RandomAccessFile(var1.getName(), "rw");
|
||||
int var2;
|
||||
if(this.field_22219_c.length() < 4096L) {
|
||||
for(var2 = 0; var2 < 1024; ++var2) {
|
||||
|
@ -1,8 +1,9 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.Reference;
|
||||
import java.lang.ref.SoftReference;
|
||||
@ -13,9 +14,9 @@ import java.util.Map;
|
||||
public class RegionFileCache {
|
||||
private static final Map field_22195_a = new HashMap();
|
||||
|
||||
public static synchronized RegionFile func_22193_a(File var0, int var1, int var2) {
|
||||
File var3 = new File(var0, "region");
|
||||
File var4 = new File(var3, "r." + (var1 >> 5) + "." + (var2 >> 5) + ".mcr");
|
||||
public static synchronized RegionFile func_22193_a(VFile2 var0, int var1, int var2) {
|
||||
VFile2 var3 = new VFile2(var0, "region");
|
||||
VFile2 var4 = new VFile2(var3, "r." + (var1 >> 5) + "." + (var2 >> 5) + ".mcr");
|
||||
Reference var5 = (Reference)field_22195_a.get(var4);
|
||||
RegionFile var6;
|
||||
if(var5 != null) {
|
||||
@ -26,7 +27,7 @@ public class RegionFileCache {
|
||||
}
|
||||
|
||||
if(!var3.exists()) {
|
||||
var3.mkdirs();
|
||||
//var3.mkdirs();
|
||||
}
|
||||
|
||||
if(field_22195_a.size() >= 256) {
|
||||
@ -57,17 +58,17 @@ public class RegionFileCache {
|
||||
field_22195_a.clear();
|
||||
}
|
||||
|
||||
public static int func_22191_b(File var0, int var1, int var2) {
|
||||
public static int func_22191_b(VFile2 var0, int var1, int var2) {
|
||||
RegionFile var3 = func_22193_a(var0, var1, var2);
|
||||
return var3.func_22209_a();
|
||||
}
|
||||
|
||||
public static DataInputStream getChunkInputStream(File var0, int var1, int var2) {
|
||||
public static DataInputStream getChunkInputStream(VFile2 var0, int var1, int var2) {
|
||||
RegionFile var3 = func_22193_a(var0, var1, var2);
|
||||
return var3.func_22210_a(var1 & 31, var2 & 31);
|
||||
}
|
||||
|
||||
public static DataOutputStream getChunkOutputStream(File var0, int var1, int var2) {
|
||||
public static DataOutputStream getChunkOutputStream(VFile2 var0, int var1, int var2) {
|
||||
RegionFile var3 = func_22193_a(var0, var1, var2);
|
||||
return var3.func_22205_b(var1 & 31, var2 & 31);
|
||||
}
|
||||
|
@ -387,102 +387,86 @@ public class RenderGlobal implements IWorldAccess {
|
||||
Arrays.sort(this.sortedWorldRenderers, new EntitySorter(var1));
|
||||
}
|
||||
|
||||
byte var17 = 0;
|
||||
int var34;
|
||||
if(this.occlusionEnabled && !this.mc.gameSettings.anaglyph && var2 == 0) {
|
||||
byte var18 = 0;
|
||||
int var19 = 16;
|
||||
this.func_962_a(var18, var19);
|
||||
|
||||
for(int var20 = var18; var20 < var19; ++var20) {
|
||||
this.sortedWorldRenderers[var20].isVisible = true;
|
||||
}
|
||||
|
||||
var34 = var17 + this.renderSortedRenderers(var18, var19, var2, var3);
|
||||
|
||||
do {
|
||||
int var35 = var19;
|
||||
var19 *= 2;
|
||||
if(var19 > this.sortedWorldRenderers.length) {
|
||||
var19 = this.sortedWorldRenderers.length;
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_FOG);
|
||||
GL11.glColorMask(false, false, false, false);
|
||||
GL11.glDepthMask(false);
|
||||
this.func_962_a(var35, var19);
|
||||
GL11.glPushMatrix();
|
||||
float var36 = 0.0F;
|
||||
float var21 = 0.0F;
|
||||
float var22 = 0.0F;
|
||||
|
||||
for(int var23 = var35; var23 < var19; ++var23) {
|
||||
if(this.sortedWorldRenderers[var23].canRender()) {
|
||||
this.sortedWorldRenderers[var23].isInFrustum = false;
|
||||
} else {
|
||||
if(!this.sortedWorldRenderers[var23].isInFrustum) {
|
||||
this.sortedWorldRenderers[var23].isVisible = true;
|
||||
}
|
||||
|
||||
if(this.sortedWorldRenderers[var23].isInFrustum && !this.sortedWorldRenderers[var23].isWaitingOnOcclusionQuery) {
|
||||
float var24 = MathHelper.sqrt_float(this.sortedWorldRenderers[var23].distanceToEntitySquared(var1));
|
||||
int var25 = (int)(1.0F + var24 / 128.0F);
|
||||
if(this.cloudOffsetX % var25 == var23 % var25) {
|
||||
WorldRenderer var26 = this.sortedWorldRenderers[var23];
|
||||
float var27 = (float)((double)var26.field_1755_i - var33);
|
||||
float var28 = (float)((double)var26.field_1754_j - var7);
|
||||
float var29 = (float)((double)var26.field_1753_k - var9);
|
||||
float var30 = var27 - var36;
|
||||
float var31 = var28 - var21;
|
||||
float var32 = var29 - var22;
|
||||
if(var30 != 0.0F || var31 != 0.0F || var32 != 0.0F) {
|
||||
GL11.glTranslatef(var30, var31, var32);
|
||||
var36 += var30;
|
||||
var21 += var31;
|
||||
var22 += var32;
|
||||
}
|
||||
|
||||
//ARBOcclusionQuery.glBeginQueryARB(GL15.GL_SAMPLES_PASSED, this.sortedWorldRenderers[var23].field_1732_z);
|
||||
this.sortedWorldRenderers[var23].callOcclusionQueryList();
|
||||
//ARBOcclusionQuery.glEndQueryARB(GL15.GL_SAMPLES_PASSED);
|
||||
this.sortedWorldRenderers[var23].isWaitingOnOcclusionQuery = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GL11.glColorMask(true, true, true, true);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_FOG);
|
||||
var34 += this.renderSortedRenderers(var35, var19, var2, var3);
|
||||
} while(var19 < this.sortedWorldRenderers.length);
|
||||
} else {
|
||||
var34 = var17 + this.renderSortedRenderers(0, this.sortedWorldRenderers.length, var2, var3);
|
||||
}
|
||||
|
||||
return var34;
|
||||
}
|
||||
|
||||
private void func_962_a(int var1, int var2) {
|
||||
for(int var3 = var1; var3 < var2; ++var3) {
|
||||
if(this.sortedWorldRenderers[var3].isWaitingOnOcclusionQuery) {
|
||||
this.field_1456_c.clear();
|
||||
//ARBOcclusionQuery.glGetQueryObjectuARB(this.sortedWorldRenderers[var3].field_1732_z, GL15.GL_QUERY_RESULT_AVAILABLE, this.field_1456_c);
|
||||
if(this.field_1456_c.get(0) != 0) {
|
||||
this.sortedWorldRenderers[var3].isWaitingOnOcclusionQuery = false;
|
||||
this.field_1456_c.clear();
|
||||
//ARBOcclusionQuery.glGetQueryObjectuARB(this.sortedWorldRenderers[var3].field_1732_z, GL15.GL_QUERY_RESULT, this.field_1456_c);
|
||||
this.sortedWorldRenderers[var3].isVisible = this.field_1456_c.get(0) != 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
// byte var17 = 0;
|
||||
// int var34;
|
||||
// if(this.occlusionEnabled && !this.mc.gameSettings.anaglyph && var2 == 0) {
|
||||
// byte var18 = 0;
|
||||
// int var19 = 16;
|
||||
// this.func_962_a(var18, var19);
|
||||
//
|
||||
// for(int var20 = var18; var20 < var19; ++var20) {
|
||||
// this.sortedWorldRenderers[var20].isVisible = true;
|
||||
// }
|
||||
//
|
||||
// var34 = var17 + this.renderSortedRenderers(var18, var19, var2, var3);
|
||||
//
|
||||
// do {
|
||||
// int var35 = var19;
|
||||
// var19 *= 2;
|
||||
// if(var19 > this.sortedWorldRenderers.length) {
|
||||
// var19 = this.sortedWorldRenderers.length;
|
||||
// }
|
||||
//
|
||||
// GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
// GL11.glDisable(GL11.GL_LIGHTING);
|
||||
// GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
// GL11.glDisable(GL11.GL_FOG);
|
||||
// GL11.glColorMask(false, false, false, false);
|
||||
// GL11.glDepthMask(false);
|
||||
// this.func_962_a(var35, var19);
|
||||
// GL11.glPushMatrix();
|
||||
// float var36 = 0.0F;
|
||||
// float var21 = 0.0F;
|
||||
// float var22 = 0.0F;
|
||||
//
|
||||
// for(int var23 = var35; var23 < var19; ++var23) {
|
||||
// if(this.sortedWorldRenderers[var23].canRender()) {
|
||||
// this.sortedWorldRenderers[var23].isInFrustum = false;
|
||||
// } else {
|
||||
// if(!this.sortedWorldRenderers[var23].isInFrustum) {
|
||||
// this.sortedWorldRenderers[var23].isVisible = true;
|
||||
// }
|
||||
//
|
||||
// if(this.sortedWorldRenderers[var23].isInFrustum && !this.sortedWorldRenderers[var23].isWaitingOnOcclusionQuery) {
|
||||
// float var24 = MathHelper.sqrt_float(this.sortedWorldRenderers[var23].distanceToEntitySquared(var1));
|
||||
// int var25 = (int)(1.0F + var24 / 128.0F);
|
||||
// if(this.cloudOffsetX % var25 == var23 % var25) {
|
||||
// WorldRenderer var26 = this.sortedWorldRenderers[var23];
|
||||
// float var27 = (float)((double)var26.field_1755_i - var33);
|
||||
// float var28 = (float)((double)var26.field_1754_j - var7);
|
||||
// float var29 = (float)((double)var26.field_1753_k - var9);
|
||||
// float var30 = var27 - var36;
|
||||
// float var31 = var28 - var21;
|
||||
// float var32 = var29 - var22;
|
||||
// if(var30 != 0.0F || var31 != 0.0F || var32 != 0.0F) {
|
||||
// GL11.glTranslatef(var30, var31, var32);
|
||||
// var36 += var30;
|
||||
// var21 += var31;
|
||||
// var22 += var32;
|
||||
// }
|
||||
//
|
||||
// //ARBOcclusionQuery.glBeginQueryARB(GL15.GL_SAMPLES_PASSED, this.sortedWorldRenderers[var23].field_1732_z);
|
||||
// this.sortedWorldRenderers[var23].callOcclusionQueryList();
|
||||
// //ARBOcclusionQuery.glEndQueryARB(GL15.GL_SAMPLES_PASSED);
|
||||
// this.sortedWorldRenderers[var23].isWaitingOnOcclusionQuery = true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// GL11.glPopMatrix();
|
||||
// GL11.glColorMask(true, true, true, true);
|
||||
// GL11.glDepthMask(true);
|
||||
// GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
// GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
// GL11.glEnable(GL11.GL_FOG);
|
||||
// var34 += this.renderSortedRenderers(var35, var19, var2, var3);
|
||||
// } while(var19 < this.sortedWorldRenderers.length);
|
||||
// } else {
|
||||
// var34 = var17 + this.renderSortedRenderers(0, this.sortedWorldRenderers.length, var2, var3);
|
||||
// }
|
||||
|
||||
return this.renderSortedRenderers(0, this.sortedWorldRenderers.length, var2, var3);
|
||||
}
|
||||
|
||||
private int renderSortedRenderers(int var1, int var2, int var3, double var4) {
|
||||
@ -528,14 +512,14 @@ public class RenderGlobal implements IWorldAccess {
|
||||
int var17 = -1;
|
||||
|
||||
for(int var18 = 0; var18 < var14; ++var18) {
|
||||
if(this.field_1414_S[var18].func_862_a(var16.field_1755_i, var16.field_1754_j, var16.field_1753_k)) {
|
||||
if(this.field_1414_S[var18].func_862_a(var16.posXMinus, var16.posYMinus, var16.posZMinus)) {
|
||||
var17 = var18;
|
||||
}
|
||||
}
|
||||
|
||||
if(var17 < 0) {
|
||||
var17 = var14++;
|
||||
this.field_1414_S[var17].func_861_a(var16.field_1755_i, var16.field_1754_j, var16.field_1753_k, var20, var10, var12);
|
||||
this.field_1414_S[var17].func_861_a(var16.posXMinus, var16.posYMinus, var16.posZMinus, var20, var10, var12);
|
||||
}
|
||||
|
||||
this.field_1414_S[var17].func_858_a(var16.getGLCallListForPass(var3));
|
||||
|
@ -1,8 +1,9 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@ -12,35 +13,36 @@ import java.util.List;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
public class SaveConverterMcRegion extends SaveFormatOld {
|
||||
public SaveConverterMcRegion(File var1) {
|
||||
public SaveConverterMcRegion(VFile2 var1) {
|
||||
super(var1);
|
||||
}
|
||||
|
||||
public String func_22178_a() {
|
||||
return "Scaevolus\' McRegion";
|
||||
return "Scaevolus' McRegion";
|
||||
}
|
||||
|
||||
public List func_22176_b() {
|
||||
ArrayList var1 = new ArrayList();
|
||||
File[] var2 = this.field_22180_a.listFiles();
|
||||
File[] var3 = var2;
|
||||
List<VFile2> list = this.field_22180_a.listFiles(true);
|
||||
VFile2[] var2 = list.toArray(new VFile2[list.size()]);
|
||||
VFile2[] var3 = var2;
|
||||
int var4 = var2.length;
|
||||
|
||||
for(int var5 = 0; var5 < var4; ++var5) {
|
||||
File var6 = var3[var5];
|
||||
if(var6.isDirectory()) {
|
||||
String var7 = var6.getName();
|
||||
WorldInfo var8 = this.func_22173_b(var7);
|
||||
if(var8 != null) {
|
||||
boolean var9 = var8.getSaveVersion() != 19132;
|
||||
String var10 = var8.getWorldName();
|
||||
if(var10 == null || MathHelper.stringNullOrLengthZero(var10)) {
|
||||
var10 = var7;
|
||||
}
|
||||
|
||||
var1.add(new SaveFormatComparator(var7, var10, var8.getLastTimePlayed(), var8.getSizeOnDisk(), var9));
|
||||
}
|
||||
}
|
||||
VFile2 var6 = var3[var5];
|
||||
// if(var6.isDirectory()) {
|
||||
// String var7 = var6.getName();
|
||||
// WorldInfo var8 = this.func_22173_b(var7);
|
||||
// if(var8 != null) {
|
||||
// boolean var9 = var8.getSaveVersion() != 19132;
|
||||
// String var10 = var8.getWorldName();
|
||||
// if(var10 == null || MathHelper.stringNullOrLengthZero(var10)) {
|
||||
// var10 = var7;
|
||||
// }
|
||||
//
|
||||
// var1.add(new SaveFormatComparator(var7, var10, var8.getLastTimePlayed(), var8.getSizeOnDisk(), var9));
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
return var1;
|
||||
@ -65,8 +67,8 @@ public class SaveConverterMcRegion extends SaveFormatOld {
|
||||
ArrayList var4 = new ArrayList();
|
||||
ArrayList var5 = new ArrayList();
|
||||
ArrayList var6 = new ArrayList();
|
||||
File var7 = new File(this.field_22180_a, var1);
|
||||
File var8 = new File(var7, "DIM-1");
|
||||
VFile2 var7 = new VFile2(this.field_22180_a, var1);
|
||||
VFile2 var8 = new VFile2(var7, "DIM-1");
|
||||
System.out.println("Scanning folders...");
|
||||
this.func_22183_a(var7, var3, var4);
|
||||
if(var8.exists()) {
|
||||
@ -89,28 +91,28 @@ public class SaveConverterMcRegion extends SaveFormatOld {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void func_22183_a(File var1, ArrayList var2, ArrayList var3) {
|
||||
ChunkFolderPattern var4 = new ChunkFolderPattern((Empty2)null);
|
||||
ChunkFilePattern var5 = new ChunkFilePattern((Empty2)null);
|
||||
File[] var6 = var1.listFiles(var4);
|
||||
File[] var7 = var6;
|
||||
private void func_22183_a(VFile2 var1, ArrayList var2, ArrayList var3) {
|
||||
ChunkFolderPattern var4 = new ChunkFolderPattern(null);
|
||||
ChunkFilePattern var5 = new ChunkFilePattern(null);
|
||||
VFile2[] var6 = (VFile2[]) var1.listFiles(true).toArray();
|
||||
VFile2[] var7 = var6;
|
||||
int var8 = var6.length;
|
||||
|
||||
for(int var9 = 0; var9 < var8; ++var9) {
|
||||
File var10 = var7[var9];
|
||||
VFile2 var10 = var7[var9];
|
||||
var3.add(var10);
|
||||
File[] var11 = var10.listFiles(var4);
|
||||
File[] var12 = var11;
|
||||
VFile2[] var11 = (VFile2[]) var10.listFiles(true).toArray();
|
||||
VFile2[] var12 = var11;
|
||||
int var13 = var11.length;
|
||||
|
||||
for(int var14 = 0; var14 < var13; ++var14) {
|
||||
File var15 = var12[var14];
|
||||
File[] var16 = var15.listFiles(var5);
|
||||
File[] var17 = var16;
|
||||
VFile2 var15 = var12[var14];
|
||||
VFile2[] var16 = (VFile2[]) var15.listFiles(true).toArray();
|
||||
VFile2[] var17 = var16;
|
||||
int var18 = var16.length;
|
||||
|
||||
for(int var19 = 0; var19 < var18; ++var19) {
|
||||
File var20 = var17[var19];
|
||||
VFile2 var20 = var17[var19];
|
||||
var2.add(new FileMatcher(var20));
|
||||
}
|
||||
}
|
||||
@ -118,7 +120,7 @@ public class SaveConverterMcRegion extends SaveFormatOld {
|
||||
|
||||
}
|
||||
|
||||
private void func_22181_a(File var1, ArrayList var2, int var3, int var4, IProgressUpdate var5) {
|
||||
private void func_22181_a(VFile2 var1, ArrayList var2, int var3, int var4, IProgressUpdate var5) {
|
||||
Collections.sort(var2);
|
||||
byte[] var6 = new byte[4096];
|
||||
Iterator var7 = var2.iterator();
|
||||
@ -130,7 +132,7 @@ public class SaveConverterMcRegion extends SaveFormatOld {
|
||||
RegionFile var11 = RegionFileCache.func_22193_a(var1, var9, var10);
|
||||
if(!var11.func_22202_c(var9 & 31, var10 & 31)) {
|
||||
try {
|
||||
DataInputStream var12 = new DataInputStream(new GZIPInputStream(new FileInputStream(var8.func_22324_a())));
|
||||
DataInputStream var12 = new DataInputStream(new GZIPInputStream(var8.func_22324_a().getInputStream()));
|
||||
DataOutputStream var13 = var11.func_22205_b(var9 & 31, var10 & 31);
|
||||
boolean var14 = false;
|
||||
|
||||
@ -161,8 +163,8 @@ public class SaveConverterMcRegion extends SaveFormatOld {
|
||||
Iterator var5 = var1.iterator();
|
||||
|
||||
while(var5.hasNext()) {
|
||||
File var6 = (File)var5.next();
|
||||
File[] var7 = var6.listFiles();
|
||||
VFile2 var6 = (VFile2)var5.next();
|
||||
VFile2[] var7 = (VFile2[]) var6.listFiles(true).toArray();
|
||||
func_22179_a(var7);
|
||||
var6.delete();
|
||||
++var2;
|
||||
|
@ -1,17 +1,18 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.File;
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SaveFormatOld implements ISaveFormat {
|
||||
protected final File field_22180_a;
|
||||
protected final VFile2 field_22180_a;
|
||||
|
||||
public SaveFormatOld(File var1) {
|
||||
public SaveFormatOld(VFile2 var1) {
|
||||
if(!var1.exists()) {
|
||||
var1.mkdirs();
|
||||
//var1.mkdirs();
|
||||
}
|
||||
|
||||
this.field_22180_a = var1;
|
||||
@ -39,14 +40,14 @@ public class SaveFormatOld implements ISaveFormat {
|
||||
}
|
||||
|
||||
public WorldInfo func_22173_b(String var1) {
|
||||
File var2 = new File(this.field_22180_a, var1);
|
||||
VFile2 var2 = new VFile2(this.field_22180_a, var1);
|
||||
if(!var2.exists()) {
|
||||
return null;
|
||||
} else {
|
||||
File var3 = new File(var2, "level.dat");
|
||||
VFile2 var3 = new VFile2(var2, "level.dat");
|
||||
if(var3.exists()) {
|
||||
try {
|
||||
NBTTagCompound var4 = CompressedStreamTools.func_1138_a(new FileInputStream(var3));
|
||||
NBTTagCompound var4 = CompressedStreamTools.readCompressed(var3.getInputStream());
|
||||
NBTTagCompound var5 = var4.getCompoundTag("Data");
|
||||
return new WorldInfo(var5);
|
||||
} catch (Exception var6) {
|
||||
@ -59,15 +60,15 @@ public class SaveFormatOld implements ISaveFormat {
|
||||
}
|
||||
|
||||
public void func_22170_a(String var1, String var2) {
|
||||
File var3 = new File(this.field_22180_a, var1);
|
||||
VFile2 var3 = new VFile2(this.field_22180_a, var1);
|
||||
if(var3.exists()) {
|
||||
File var4 = new File(var3, "level.dat");
|
||||
VFile2 var4 = new VFile2(var3, "level.dat");
|
||||
if(var4.exists()) {
|
||||
try {
|
||||
NBTTagCompound var5 = CompressedStreamTools.func_1138_a(new FileInputStream(var4));
|
||||
NBTTagCompound var5 = CompressedStreamTools.readCompressed(var4.getInputStream());
|
||||
NBTTagCompound var6 = var5.getCompoundTag("Data");
|
||||
var6.setString("LevelName", var2);
|
||||
CompressedStreamTools.writeGzippedCompoundToOutputStream(var5, new FileOutputStream(var4));
|
||||
CompressedStreamTools.writeGzippedCompoundToOutputStream(var5, var4.getOutputStream());
|
||||
} catch (Exception var7) {
|
||||
var7.printStackTrace();
|
||||
}
|
||||
@ -77,18 +78,18 @@ public class SaveFormatOld implements ISaveFormat {
|
||||
}
|
||||
|
||||
public void func_22172_c(String var1) {
|
||||
File var2 = new File(this.field_22180_a, var1);
|
||||
VFile2 var2 = new VFile2(this.field_22180_a, var1);
|
||||
if(var2.exists()) {
|
||||
func_22179_a(var2.listFiles());
|
||||
//func_22179_a(var2.listFiles());
|
||||
var2.delete();
|
||||
}
|
||||
}
|
||||
|
||||
protected static void func_22179_a(File[] var0) {
|
||||
protected static void func_22179_a(VFile2[] var0) {
|
||||
for(int var1 = 0; var1 < var0.length; ++var1) {
|
||||
if(var0[var1].isDirectory()) {
|
||||
func_22179_a(var0[var1].listFiles());
|
||||
}
|
||||
// if(var0[var1].isDirectory()) {
|
||||
// func_22179_a(var0[var1].listFiles());
|
||||
// }
|
||||
|
||||
var0[var1].delete();
|
||||
}
|
||||
|
@ -1,74 +1,73 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class SaveHandler implements ISaveHandler {
|
||||
private static final Logger logger = Logger.getLogger("Minecraft");
|
||||
private final File saveDirectory;
|
||||
private final File playersDirectory;
|
||||
private final VFile2 saveDirectory;
|
||||
private final VFile2 playersDirectory;
|
||||
private final long now = System.currentTimeMillis();
|
||||
|
||||
public SaveHandler(File var1, String var2, boolean var3) {
|
||||
this.saveDirectory = new File(var1, var2);
|
||||
this.saveDirectory.mkdirs();
|
||||
this.playersDirectory = new File(this.saveDirectory, "players");
|
||||
public SaveHandler(VFile2 var1, String var2, boolean var3) {
|
||||
this.saveDirectory = new VFile2(var1, var2);
|
||||
//this.saveDirectory.mkdirs();
|
||||
this.playersDirectory = new VFile2(this.saveDirectory, "players");
|
||||
if(var3) {
|
||||
this.playersDirectory.mkdirs();
|
||||
//this.playersDirectory.mkdirs();
|
||||
}
|
||||
|
||||
this.func_22154_d();
|
||||
this.checkSessionLock();
|
||||
}
|
||||
|
||||
private void func_22154_d() {
|
||||
try {
|
||||
File var1 = new File(this.saveDirectory, "session.lock");
|
||||
DataOutputStream var2 = new DataOutputStream(new FileOutputStream(var1));
|
||||
|
||||
try {
|
||||
var2.writeLong(this.now);
|
||||
} finally {
|
||||
var2.close();
|
||||
}
|
||||
|
||||
} catch (IOException var7) {
|
||||
var7.printStackTrace();
|
||||
throw new RuntimeException("Failed to check session lock, aborting");
|
||||
}
|
||||
private void checkSessionLock() {
|
||||
// try {
|
||||
// VFile2 var1 = new VFile2(this.saveDirectory, "session.lock");
|
||||
// DataOutputStream var2 = new DataOutputStream(new FileOutputStream(var1));
|
||||
//
|
||||
// try {
|
||||
// var2.writeLong(this.now);
|
||||
// } finally {
|
||||
// var2.close();
|
||||
// }
|
||||
//
|
||||
// } catch (IOException var7) {
|
||||
// var7.printStackTrace();
|
||||
// throw new RuntimeException("Failed to check session lock, aborting");
|
||||
// }
|
||||
}
|
||||
|
||||
protected File getSaveDirectory() {
|
||||
protected VFile2 getSaveDirectory() {
|
||||
return this.saveDirectory;
|
||||
}
|
||||
|
||||
public void func_22150_b() {
|
||||
try {
|
||||
File var1 = new File(this.saveDirectory, "session.lock");
|
||||
DataInputStream var2 = new DataInputStream(new FileInputStream(var1));
|
||||
|
||||
try {
|
||||
if(var2.readLong() != this.now) {
|
||||
throw new MinecraftException("The save is being accessed from another location, aborting");
|
||||
}
|
||||
} finally {
|
||||
var2.close();
|
||||
}
|
||||
|
||||
} catch (IOException var7) {
|
||||
throw new MinecraftException("Failed to check session lock, aborting");
|
||||
}
|
||||
// try {
|
||||
// VFile2 var1 = new VFile2(this.saveDirectory, "session.lock");
|
||||
// DataInputStream var2 = new DataInputStream(new FileInputStream(var1));
|
||||
//
|
||||
// try {
|
||||
// if(var2.readLong() != this.now) {
|
||||
// throw new MinecraftException("The save is being accessed from another location, aborting");
|
||||
// }
|
||||
// } finally {
|
||||
// var2.close();
|
||||
// }
|
||||
//
|
||||
// } catch (IOException var7) {
|
||||
// throw new MinecraftException("Failed to check session lock, aborting");
|
||||
// }
|
||||
}
|
||||
|
||||
public IChunkLoader getChunkLoader(WorldProvider var1) {
|
||||
if(var1 instanceof WorldProviderHell) {
|
||||
File var2 = new File(this.saveDirectory, "DIM-1");
|
||||
var2.mkdirs();
|
||||
VFile2 var2 = new VFile2(this.saveDirectory, "DIM-1");
|
||||
// var2.mkdirs();
|
||||
return new ChunkLoader(var2, true);
|
||||
} else {
|
||||
return new ChunkLoader(this.saveDirectory, true);
|
||||
@ -76,10 +75,10 @@ public class SaveHandler implements ISaveHandler {
|
||||
}
|
||||
|
||||
public WorldInfo loadWorldInfo() {
|
||||
File var1 = new File(this.saveDirectory, "level.dat");
|
||||
VFile2 var1 = new VFile2(this.saveDirectory, "level.dat");
|
||||
if(var1.exists()) {
|
||||
try {
|
||||
NBTTagCompound var2 = CompressedStreamTools.func_1138_a(new FileInputStream(var1));
|
||||
NBTTagCompound var2 = CompressedStreamTools.readCompressed(var1.getInputStream());
|
||||
NBTTagCompound var3 = var2.getCompoundTag("Data");
|
||||
return new WorldInfo(var3);
|
||||
} catch (Exception var4) {
|
||||
@ -96,10 +95,10 @@ public class SaveHandler implements ISaveHandler {
|
||||
var4.setTag("Data", var3);
|
||||
|
||||
try {
|
||||
File var5 = new File(this.saveDirectory, "level.dat_new");
|
||||
File var6 = new File(this.saveDirectory, "level.dat_old");
|
||||
File var7 = new File(this.saveDirectory, "level.dat");
|
||||
CompressedStreamTools.writeGzippedCompoundToOutputStream(var4, new FileOutputStream(var5));
|
||||
VFile2 var5 = new VFile2(this.saveDirectory, "level.dat_new");
|
||||
VFile2 var6 = new VFile2(this.saveDirectory, "level.dat_old");
|
||||
VFile2 var7 = new VFile2(this.saveDirectory, "level.dat");
|
||||
CompressedStreamTools.writeGzippedCompoundToOutputStream(var4, var5.getOutputStream());
|
||||
if(var6.exists()) {
|
||||
var6.delete();
|
||||
}
|
||||
@ -125,10 +124,10 @@ public class SaveHandler implements ISaveHandler {
|
||||
var3.setTag("Data", var2);
|
||||
|
||||
try {
|
||||
File var4 = new File(this.saveDirectory, "level.dat_new");
|
||||
File var5 = new File(this.saveDirectory, "level.dat_old");
|
||||
File var6 = new File(this.saveDirectory, "level.dat");
|
||||
CompressedStreamTools.writeGzippedCompoundToOutputStream(var3, new FileOutputStream(var4));
|
||||
VFile2 var4 = new VFile2(this.saveDirectory, "level.dat_new");
|
||||
VFile2 var5 = new VFile2(this.saveDirectory, "level.dat_old");
|
||||
VFile2 var6 = new VFile2(this.saveDirectory, "level.dat");
|
||||
CompressedStreamTools.writeGzippedCompoundToOutputStream(var3, var4.getOutputStream());
|
||||
if(var5.exists()) {
|
||||
var5.delete();
|
||||
}
|
||||
|
@ -1,18 +1,19 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.File;
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SaveOldDir extends SaveHandler {
|
||||
public SaveOldDir(File var1, String var2, boolean var3) {
|
||||
public SaveOldDir(VFile2 var1, String var2, boolean var3) {
|
||||
super(var1, var2, var3);
|
||||
}
|
||||
|
||||
public IChunkLoader getChunkLoader(WorldProvider var1) {
|
||||
File var2 = this.getSaveDirectory();
|
||||
VFile2 var2 = this.getSaveDirectory();
|
||||
if(var1 instanceof WorldProviderHell) {
|
||||
File var3 = new File(var2, "DIM-1");
|
||||
var3.mkdirs();
|
||||
VFile2 var3 = new VFile2(var2, "DIM-1");
|
||||
//var3.mkdirs();
|
||||
return new McRegionChunkLoader(var3);
|
||||
} else {
|
||||
return new McRegionChunkLoader(var2);
|
||||
|
@ -128,7 +128,7 @@ public class SoundManager {
|
||||
if(randNum == 0) {
|
||||
return;
|
||||
}
|
||||
String soundName = "/newsound/" + var1 + (randNum != -1 ? randNum : "") + ".ogg";
|
||||
String soundName = "/sound/" + var1 + (randNum != -1 ? randNum : "") + ".ogg";
|
||||
if (!sounds.containsKey(soundName)) {
|
||||
if (EagRuntime.getPlatformType() != EnumPlatformType.DESKTOP) {
|
||||
trk = PlatformAudio.loadAudioDataNew(soundName, true, browserResourceLoader);
|
||||
@ -165,8 +165,8 @@ public class SoundManager {
|
||||
if(randNum == 0) {
|
||||
return;
|
||||
}
|
||||
String soundName = "/newsound/" + var1 + (randNum != -1 ? randNum : "") + ".ogg";
|
||||
System.out.println(soundName);
|
||||
String soundName = "/sound/" + var1 + (randNum != -1 ? randNum : "") + ".ogg";
|
||||
//System.out.println(soundName);
|
||||
if (!sounds.containsKey(soundName)) {
|
||||
if (EagRuntime.getPlatformType() != EnumPlatformType.DESKTOP) {
|
||||
trk = PlatformAudio.loadAudioDataNew(soundName, true, browserResourceLoader);
|
||||
|
@ -1,5 +1,7 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.EagRuntime;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
@ -9,8 +11,8 @@ public class StringTranslate {
|
||||
|
||||
private StringTranslate() {
|
||||
try {
|
||||
this.translateTable.load(StringTranslate.class.getResourceAsStream("/lang/en_US.lang"));
|
||||
this.translateTable.load(StringTranslate.class.getResourceAsStream("/lang/stats_US.lang"));
|
||||
this.translateTable.load(EagRuntime.getRequiredResourceStream("/lang/en_US.lang"));
|
||||
this.translateTable.load(EagRuntime.getRequiredResourceStream("/lang/stats_US.lang"));
|
||||
} catch (IOException var2) {
|
||||
var2.printStackTrace();
|
||||
}
|
||||
|
@ -1,142 +0,0 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import javax.imageio.ImageIO;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class TextureCompassFX extends TextureFX {
|
||||
private Minecraft mc;
|
||||
private int[] field_4230_h = new int[256];
|
||||
private double field_4229_i;
|
||||
private double field_4228_j;
|
||||
|
||||
public TextureCompassFX(Minecraft var1) {
|
||||
super(Item.compass.getIconIndex((ItemStack)null));
|
||||
this.mc = var1;
|
||||
this.tileImage = 1;
|
||||
|
||||
try {
|
||||
BufferedImage var2 = ImageIO.read(Minecraft.class.getResource("/gui/items.png"));
|
||||
int var3 = this.iconIndex % 16 * 16;
|
||||
int var4 = this.iconIndex / 16 * 16;
|
||||
var2.getRGB(var3, var4, 16, 16, this.field_4230_h, 0, 16);
|
||||
} catch (IOException var5) {
|
||||
var5.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onTick() {
|
||||
for(int var1 = 0; var1 < 256; ++var1) {
|
||||
int var2 = this.field_4230_h[var1] >> 24 & 255;
|
||||
int var3 = this.field_4230_h[var1] >> 16 & 255;
|
||||
int var4 = this.field_4230_h[var1] >> 8 & 255;
|
||||
int var5 = this.field_4230_h[var1] >> 0 & 255;
|
||||
if(this.anaglyphEnabled) {
|
||||
int var6 = (var3 * 30 + var4 * 59 + var5 * 11) / 100;
|
||||
int var7 = (var3 * 30 + var4 * 70) / 100;
|
||||
int var8 = (var3 * 30 + var5 * 70) / 100;
|
||||
var3 = var6;
|
||||
var4 = var7;
|
||||
var5 = var8;
|
||||
}
|
||||
|
||||
this.imageData[var1 * 4 + 0] = (byte)var3;
|
||||
this.imageData[var1 * 4 + 1] = (byte)var4;
|
||||
this.imageData[var1 * 4 + 2] = (byte)var5;
|
||||
this.imageData[var1 * 4 + 3] = (byte)var2;
|
||||
}
|
||||
|
||||
double var20 = 0.0D;
|
||||
if(this.mc.theWorld != null && this.mc.thePlayer != null) {
|
||||
ChunkCoordinates var21 = this.mc.theWorld.getSpawnPoint();
|
||||
double var23 = (double)var21.x - this.mc.thePlayer.posX;
|
||||
double var25 = (double)var21.z - this.mc.thePlayer.posZ;
|
||||
var20 = (double)(this.mc.thePlayer.rotationYaw - 90.0F) * Math.PI / 180.0D - Math.atan2(var25, var23);
|
||||
if(this.mc.theWorld.worldProvider.field_4220_c) {
|
||||
var20 = Math.random() * (double)((float)Math.PI) * 2.0D;
|
||||
}
|
||||
}
|
||||
|
||||
double var22;
|
||||
for(var22 = var20 - this.field_4229_i; var22 < -Math.PI; var22 += Math.PI * 2.0D) {
|
||||
}
|
||||
|
||||
while(var22 >= Math.PI) {
|
||||
var22 -= Math.PI * 2.0D;
|
||||
}
|
||||
|
||||
if(var22 < -1.0D) {
|
||||
var22 = -1.0D;
|
||||
}
|
||||
|
||||
if(var22 > 1.0D) {
|
||||
var22 = 1.0D;
|
||||
}
|
||||
|
||||
this.field_4228_j += var22 * 0.1D;
|
||||
this.field_4228_j *= 0.8D;
|
||||
this.field_4229_i += this.field_4228_j;
|
||||
double var24 = Math.sin(this.field_4229_i);
|
||||
double var26 = Math.cos(this.field_4229_i);
|
||||
|
||||
int var9;
|
||||
int var10;
|
||||
int var11;
|
||||
int var12;
|
||||
int var13;
|
||||
int var14;
|
||||
int var15;
|
||||
short var16;
|
||||
int var17;
|
||||
int var18;
|
||||
int var19;
|
||||
for(var9 = -4; var9 <= 4; ++var9) {
|
||||
var10 = (int)(8.5D + var26 * (double)var9 * 0.3D);
|
||||
var11 = (int)(7.5D - var24 * (double)var9 * 0.3D * 0.5D);
|
||||
var12 = var11 * 16 + var10;
|
||||
var13 = 100;
|
||||
var14 = 100;
|
||||
var15 = 100;
|
||||
var16 = 255;
|
||||
if(this.anaglyphEnabled) {
|
||||
var17 = (var13 * 30 + var14 * 59 + var15 * 11) / 100;
|
||||
var18 = (var13 * 30 + var14 * 70) / 100;
|
||||
var19 = (var13 * 30 + var15 * 70) / 100;
|
||||
var13 = var17;
|
||||
var14 = var18;
|
||||
var15 = var19;
|
||||
}
|
||||
|
||||
this.imageData[var12 * 4 + 0] = (byte)var13;
|
||||
this.imageData[var12 * 4 + 1] = (byte)var14;
|
||||
this.imageData[var12 * 4 + 2] = (byte)var15;
|
||||
this.imageData[var12 * 4 + 3] = (byte)var16;
|
||||
}
|
||||
|
||||
for(var9 = -8; var9 <= 16; ++var9) {
|
||||
var10 = (int)(8.5D + var24 * (double)var9 * 0.3D);
|
||||
var11 = (int)(7.5D + var26 * (double)var9 * 0.3D * 0.5D);
|
||||
var12 = var11 * 16 + var10;
|
||||
var13 = var9 >= 0 ? 255 : 100;
|
||||
var14 = var9 >= 0 ? 20 : 100;
|
||||
var15 = var9 >= 0 ? 20 : 100;
|
||||
var16 = 255;
|
||||
if(this.anaglyphEnabled) {
|
||||
var17 = (var13 * 30 + var14 * 59 + var15 * 11) / 100;
|
||||
var18 = (var13 * 30 + var14 * 70) / 100;
|
||||
var19 = (var13 * 30 + var15 * 70) / 100;
|
||||
var13 = var17;
|
||||
var14 = var18;
|
||||
var15 = var19;
|
||||
}
|
||||
|
||||
this.imageData[var12 * 4 + 0] = (byte)var13;
|
||||
this.imageData[var12 * 4 + 1] = (byte)var14;
|
||||
this.imageData[var12 * 4 + 2] = (byte)var15;
|
||||
this.imageData[var12 * 4 + 3] = (byte)var16;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -50,7 +50,7 @@ public class TexturePackCustom extends TexturePackBase {
|
||||
|
||||
try {
|
||||
var3 = var2.getInputStream(var2.getEntry("pack.png"));
|
||||
this.texturePackThumbnail = ImageData.loadImageFile(var3);
|
||||
this.texturePackThumbnail = ImageData.loadImageFile(var3).swapRB();
|
||||
var3.close();
|
||||
} catch (Exception var19) {
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ public class TexturePackDefault extends TexturePackBase {
|
||||
this.texturePackFileName = "Default";
|
||||
this.firstDescriptionLine = "The default look of Minecraft";
|
||||
|
||||
this.texturePackThumbnail = ImageData.loadImageFile("/pack.png");
|
||||
this.texturePackThumbnail = ImageData.loadImageFile("/pack.png").swapRB();
|
||||
}
|
||||
|
||||
public void func_6484_b(Minecraft var1) {
|
||||
|
@ -1,12 +1,13 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.lax1dude.eaglercraft.internal.vfs2.VFile2;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class TexturePackList {
|
||||
@ -15,14 +16,14 @@ public class TexturePackList {
|
||||
public TexturePackBase selectedTexturePack;
|
||||
private Map field_6538_d = new HashMap();
|
||||
private Minecraft mc;
|
||||
private File texturePackDir;
|
||||
private VFile2 texturePackDir;
|
||||
private String currentTexturePack;
|
||||
|
||||
public TexturePackList(Minecraft var1, File var2) {
|
||||
public TexturePackList(Minecraft var1, VFile2 var2) {
|
||||
this.mc = var1;
|
||||
this.texturePackDir = new File(var2, "texturepacks");
|
||||
this.texturePackDir = new VFile2(var2, "texturepacks");
|
||||
if(!this.texturePackDir.exists()) {
|
||||
this.texturePackDir.mkdirs();
|
||||
//this.texturePackDir.mkdirs();
|
||||
}
|
||||
|
||||
this.currentTexturePack = var1.gameSettings.skin;
|
||||
@ -48,36 +49,36 @@ public class TexturePackList {
|
||||
ArrayList var1 = new ArrayList();
|
||||
this.selectedTexturePack = null;
|
||||
var1.add(this.defaultTexturePack);
|
||||
if(this.texturePackDir.exists() && this.texturePackDir.isDirectory()) {
|
||||
File[] var2 = this.texturePackDir.listFiles();
|
||||
File[] var3 = var2;
|
||||
int var4 = var2.length;
|
||||
|
||||
for(int var5 = 0; var5 < var4; ++var5) {
|
||||
File var6 = var3[var5];
|
||||
if(var6.isFile() && var6.getName().toLowerCase().endsWith(".zip")) {
|
||||
String var7 = var6.getName() + ":" + var6.length() + ":" + var6.lastModified();
|
||||
|
||||
try {
|
||||
if(!this.field_6538_d.containsKey(var7)) {
|
||||
TexturePackCustom var8 = new TexturePackCustom(var6);
|
||||
var8.field_6488_d = var7;
|
||||
this.field_6538_d.put(var7, var8);
|
||||
var8.func_6485_a(this.mc);
|
||||
}
|
||||
|
||||
TexturePackBase var12 = (TexturePackBase)this.field_6538_d.get(var7);
|
||||
if(var12.texturePackFileName.equals(this.currentTexturePack)) {
|
||||
this.selectedTexturePack = var12;
|
||||
}
|
||||
|
||||
var1.add(var12);
|
||||
} catch (IOException var9) {
|
||||
var9.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if(this.texturePackDir.exists() && this.texturePackDir.isDirectory()) {
|
||||
// VFile2[] var2 = this.texturePackDir.listFiles();
|
||||
// VFile2[] var3 = var2;
|
||||
// int var4 = var2.length;
|
||||
//
|
||||
// for(int var5 = 0; var5 < var4; ++var5) {
|
||||
// VFile2 var6 = var3[var5];
|
||||
// if(var6.isFile() && var6.getName().toLowerCase().endsWith(".zip")) {
|
||||
// String var7 = var6.getName() + ":" + var6.length() + ":" + var6.lastModified();
|
||||
//
|
||||
// try {
|
||||
// if(!this.field_6538_d.containsKey(var7)) {
|
||||
// TexturePackCustom var8 = new TexturePackCustom(var6);
|
||||
// var8.field_6488_d = var7;
|
||||
// this.field_6538_d.put(var7, var8);
|
||||
// var8.func_6485_a(this.mc);
|
||||
// }
|
||||
//
|
||||
// TexturePackBase var12 = (TexturePackBase)this.field_6538_d.get(var7);
|
||||
// if(var12.texturePackFileName.equals(this.currentTexturePack)) {
|
||||
// this.selectedTexturePack = var12;
|
||||
// }
|
||||
//
|
||||
// var1.add(var12);
|
||||
// } catch (IOException var9) {
|
||||
// var9.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
if(this.selectedTexturePack == null) {
|
||||
this.selectedTexturePack = this.defaultTexturePack;
|
||||
|
@ -1,99 +0,0 @@
|
||||
package net.minecraft.src;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import javax.imageio.ImageIO;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class TextureWatchFX extends TextureFX {
|
||||
private Minecraft field_4225_g;
|
||||
private int[] field_4224_h = new int[256];
|
||||
private int[] field_4223_i = new int[256];
|
||||
private double field_4222_j;
|
||||
private double field_4221_k;
|
||||
|
||||
public TextureWatchFX(Minecraft var1) {
|
||||
super(Item.pocketSundial.getIconIndex((ItemStack)null));
|
||||
this.field_4225_g = var1;
|
||||
this.tileImage = 1;
|
||||
|
||||
try {
|
||||
BufferedImage var2 = ImageIO.read(Minecraft.class.getResource("/gui/items.png"));
|
||||
int var3 = this.iconIndex % 16 * 16;
|
||||
int var4 = this.iconIndex / 16 * 16;
|
||||
var2.getRGB(var3, var4, 16, 16, this.field_4224_h, 0, 16);
|
||||
var2 = ImageIO.read(Minecraft.class.getResource("/misc/dial.png"));
|
||||
var2.getRGB(0, 0, 16, 16, this.field_4223_i, 0, 16);
|
||||
} catch (IOException var5) {
|
||||
var5.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onTick() {
|
||||
double var1 = 0.0D;
|
||||
if(this.field_4225_g.theWorld != null && this.field_4225_g.thePlayer != null) {
|
||||
float var3 = this.field_4225_g.theWorld.getCelestialAngle(1.0F);
|
||||
var1 = (double)(-var3 * (float)Math.PI * 2.0F);
|
||||
if(this.field_4225_g.theWorld.worldProvider.field_4220_c) {
|
||||
var1 = Math.random() * (double)((float)Math.PI) * 2.0D;
|
||||
}
|
||||
}
|
||||
|
||||
double var22;
|
||||
for(var22 = var1 - this.field_4222_j; var22 < -Math.PI; var22 += Math.PI * 2.0D) {
|
||||
}
|
||||
|
||||
while(var22 >= Math.PI) {
|
||||
var22 -= Math.PI * 2.0D;
|
||||
}
|
||||
|
||||
if(var22 < -1.0D) {
|
||||
var22 = -1.0D;
|
||||
}
|
||||
|
||||
if(var22 > 1.0D) {
|
||||
var22 = 1.0D;
|
||||
}
|
||||
|
||||
this.field_4221_k += var22 * 0.1D;
|
||||
this.field_4221_k *= 0.8D;
|
||||
this.field_4222_j += this.field_4221_k;
|
||||
double var5 = Math.sin(this.field_4222_j);
|
||||
double var7 = Math.cos(this.field_4222_j);
|
||||
|
||||
for(int var9 = 0; var9 < 256; ++var9) {
|
||||
int var10 = this.field_4224_h[var9] >> 24 & 255;
|
||||
int var11 = this.field_4224_h[var9] >> 16 & 255;
|
||||
int var12 = this.field_4224_h[var9] >> 8 & 255;
|
||||
int var13 = this.field_4224_h[var9] >> 0 & 255;
|
||||
if(var11 == var13 && var12 == 0 && var13 > 0) {
|
||||
double var14 = -((double)(var9 % 16) / 15.0D - 0.5D);
|
||||
double var16 = (double)(var9 / 16) / 15.0D - 0.5D;
|
||||
int var18 = var11;
|
||||
int var19 = (int)((var14 * var7 + var16 * var5 + 0.5D) * 16.0D);
|
||||
int var20 = (int)((var16 * var7 - var14 * var5 + 0.5D) * 16.0D);
|
||||
int var21 = (var19 & 15) + (var20 & 15) * 16;
|
||||
var10 = this.field_4223_i[var21] >> 24 & 255;
|
||||
var11 = (this.field_4223_i[var21] >> 16 & 255) * var11 / 255;
|
||||
var12 = (this.field_4223_i[var21] >> 8 & 255) * var18 / 255;
|
||||
var13 = (this.field_4223_i[var21] >> 0 & 255) * var18 / 255;
|
||||
}
|
||||
|
||||
if(this.anaglyphEnabled) {
|
||||
int var23 = (var11 * 30 + var12 * 59 + var13 * 11) / 100;
|
||||
int var15 = (var11 * 30 + var12 * 70) / 100;
|
||||
int var24 = (var11 * 30 + var13 * 70) / 100;
|
||||
var11 = var23;
|
||||
var12 = var15;
|
||||
var13 = var24;
|
||||
}
|
||||
|
||||
this.imageData[var9 * 4 + 0] = (byte)var11;
|
||||
this.imageData[var9 * 4 + 1] = (byte)var12;
|
||||
this.imageData[var9 * 4 + 2] = (byte)var13;
|
||||
this.imageData[var9 * 4 + 3] = (byte)var10;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -249,7 +249,7 @@ public class World implements IBlockAccess {
|
||||
public void saveWorld(boolean var1, IProgressUpdate var2) {
|
||||
if(this.chunkProvider.func_536_b()) {
|
||||
if(var2 != null) {
|
||||
var2.func_594_b("Saving level");
|
||||
var2.displayProgressMessage("Saving level");
|
||||
}
|
||||
|
||||
this.saveLevel();
|
||||
|
@ -16,20 +16,20 @@ public class WorldRenderer {
|
||||
public int sizeWidth;
|
||||
public int sizeHeight;
|
||||
public int sizeDepth;
|
||||
public int field_1755_i;
|
||||
public int field_1754_j;
|
||||
public int field_1753_k;
|
||||
public int field_1752_l;
|
||||
public int field_1751_m;
|
||||
public int field_1750_n;
|
||||
public int posXMinus;
|
||||
public int posYMinus;
|
||||
public int posZMinus;
|
||||
public int posXClip;
|
||||
public int posYClip;
|
||||
public int posZClip;
|
||||
public boolean isInFrustum = false;
|
||||
public boolean[] skipRenderPass = new boolean[2];
|
||||
public int field_1746_q;
|
||||
public int field_1743_r;
|
||||
public int field_1741_s;
|
||||
public float field_1740_t;
|
||||
public int posXPlus;
|
||||
public int posYPlus;
|
||||
public int posZPlus;
|
||||
public float rendererRadius;
|
||||
public boolean needsUpdate;
|
||||
public AxisAlignedBB field_1736_v;
|
||||
public AxisAlignedBB rendererBoundingBox;
|
||||
public int field_1735_w;
|
||||
public boolean isVisible = true;
|
||||
public boolean isWaitingOnOcclusionQuery;
|
||||
@ -43,7 +43,7 @@ public class WorldRenderer {
|
||||
this.worldObj = var1;
|
||||
this.tileEntities = var2;
|
||||
this.sizeWidth = this.sizeHeight = this.sizeDepth = var6;
|
||||
this.field_1740_t = MathHelper.sqrt_float((float)(this.sizeWidth * this.sizeWidth + this.sizeHeight * this.sizeHeight + this.sizeDepth * this.sizeDepth)) / 2.0F;
|
||||
this.rendererRadius = MathHelper.sqrt_float((float)(this.sizeWidth * this.sizeWidth + this.sizeHeight * this.sizeHeight + this.sizeDepth * this.sizeDepth)) / 2.0F;
|
||||
this.glRenderList = var7;
|
||||
this.posX = -999;
|
||||
this.setPosition(var3, var4, var5);
|
||||
@ -56,26 +56,26 @@ public class WorldRenderer {
|
||||
this.posX = var1;
|
||||
this.posY = var2;
|
||||
this.posZ = var3;
|
||||
this.field_1746_q = var1 + this.sizeWidth / 2;
|
||||
this.field_1743_r = var2 + this.sizeHeight / 2;
|
||||
this.field_1741_s = var3 + this.sizeDepth / 2;
|
||||
this.field_1752_l = var1 & 1023;
|
||||
this.field_1751_m = var2;
|
||||
this.field_1750_n = var3 & 1023;
|
||||
this.field_1755_i = var1 - this.field_1752_l;
|
||||
this.field_1754_j = var2 - this.field_1751_m;
|
||||
this.field_1753_k = var3 - this.field_1750_n;
|
||||
this.posXPlus = var1 + this.sizeWidth / 2;
|
||||
this.posYPlus = var2 + this.sizeHeight / 2;
|
||||
this.posZPlus = var3 + this.sizeDepth / 2;
|
||||
this.posXClip = var1 & 1023;
|
||||
this.posYClip = var2;
|
||||
this.posZClip = var3 & 1023;
|
||||
this.posXMinus = var1 - this.posXClip;
|
||||
this.posYMinus = var2 - this.posYClip;
|
||||
this.posZMinus = var3 - this.posZClip;
|
||||
float var4 = 6.0F;
|
||||
this.field_1736_v = AxisAlignedBB.getBoundingBox((double)((float)var1 - var4), (double)((float)var2 - var4), (double)((float)var3 - var4), (double)((float)(var1 + this.sizeWidth) + var4), (double)((float)(var2 + this.sizeHeight) + var4), (double)((float)(var3 + this.sizeDepth) + var4));
|
||||
GL11.glNewList(this.glRenderList + 2, GL11.GL_COMPILE);
|
||||
RenderItem.renderAABB(AxisAlignedBB.getBoundingBoxFromPool((double)((float)this.field_1752_l - var4), (double)((float)this.field_1751_m - var4), (double)((float)this.field_1750_n - var4), (double)((float)(this.field_1752_l + this.sizeWidth) + var4), (double)((float)(this.field_1751_m + this.sizeHeight) + var4), (double)((float)(this.field_1750_n + this.sizeDepth) + var4)));
|
||||
GL11.glEndList();
|
||||
this.rendererBoundingBox = AxisAlignedBB.getBoundingBox((double)((float)var1 - var4), (double)((float)var2 - var4), (double)((float)var3 - var4), (double)((float)(var1 + this.sizeWidth) + var4), (double)((float)(var2 + this.sizeHeight) + var4), (double)((float)(var3 + this.sizeDepth) + var4));
|
||||
// GL11.glNewList(this.glRenderList + 2, GL11.GL_COMPILE);
|
||||
// RenderItem.renderAABB(AxisAlignedBB.getBoundingBoxFromPool((double)((float)this.field_1752_l - var4), (double)((float)this.field_1751_m - var4), (double)((float)this.field_1750_n - var4), (double)((float)(this.field_1752_l + this.sizeWidth) + var4), (double)((float)(this.field_1751_m + this.sizeHeight) + var4), (double)((float)(this.field_1750_n + this.sizeDepth) + var4)));
|
||||
// GL11.glEndList();
|
||||
this.markDirty();
|
||||
}
|
||||
}
|
||||
|
||||
private void setupGLTranslation() {
|
||||
GL11.glTranslatef((float)this.field_1752_l, (float)this.field_1751_m, (float)this.field_1750_n);
|
||||
GL11.glTranslatef((float)this.posXClip, (float)this.posYClip, (float)this.posZClip);
|
||||
}
|
||||
|
||||
public void updateRenderer() {
|
||||
@ -103,24 +103,26 @@ public class WorldRenderer {
|
||||
for(int var11 = 0; var11 < 2; ++var11) {
|
||||
boolean var12 = false;
|
||||
boolean var13 = false;
|
||||
boolean var14 = false;
|
||||
boolean hasGlList = false;
|
||||
|
||||
for(int var15 = var2; var15 < var5; ++var15) {
|
||||
for(int var16 = var3; var16 < var6; ++var16) {
|
||||
for(int var17 = var1; var17 < var4; ++var17) {
|
||||
int var18 = var9.getBlockId(var17, var15, var16);
|
||||
if(var18 > 0) {
|
||||
if(!var14) {
|
||||
var14 = true;
|
||||
if(!hasGlList) {
|
||||
hasGlList = true;
|
||||
GL11.glNewList(this.glRenderList + var11, GL11.GL_COMPILE);
|
||||
GL11.glPushMatrix();
|
||||
this.setupGLTranslation();
|
||||
float var19 = 1.000001F;
|
||||
GL11.glTranslatef((float)(-this.sizeDepth) / 2.0F, (float)(-this.sizeHeight) / 2.0F, (float)(-this.sizeDepth) / 2.0F);
|
||||
GL11.glScalef(var19, var19, var19);
|
||||
GL11.glTranslatef((float)this.sizeDepth / 2.0F, (float)this.sizeHeight / 2.0F, (float)this.sizeDepth / 2.0F);
|
||||
tessellator.setRenderingChunk(true);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setTranslationD((double)(-this.posX), (double)(-this.posY), (double)(-this.posZ));
|
||||
// GL11.glPushMatrix();
|
||||
// this.setupGLTranslation();
|
||||
// float var19 = 1.000001F;
|
||||
// GL11.glTranslatef((float)(-this.sizeDepth) / 2.0F, (float)(-this.sizeHeight) / 2.0F, (float)(-this.sizeDepth) / 2.0F);
|
||||
// GL11.glScalef(var19, var19, var19);
|
||||
// GL11.glTranslatef((float)this.sizeDepth / 2.0F, (float)this.sizeHeight / 2.0F, (float)this.sizeDepth / 2.0F);
|
||||
// tessellator.startDrawingQuads();
|
||||
tessellator.setTranslationD(this.posXClip-this.posX, this.posYClip-this.posY, this.posZClip-this.posZ);
|
||||
}
|
||||
|
||||
if(var11 == 0 && Block.isBlockContainer[var18]) {
|
||||
@ -142,11 +144,12 @@ public class WorldRenderer {
|
||||
}
|
||||
}
|
||||
|
||||
if(var14) {
|
||||
if(hasGlList) {
|
||||
tessellator.draw();
|
||||
GL11.glPopMatrix();
|
||||
//GL11.glPopMatrix();
|
||||
GL11.glEndList();
|
||||
tessellator.setTranslationD(0.0D, 0.0D, 0.0D);
|
||||
tessellator.setRenderingChunk(false);
|
||||
} else {
|
||||
var13 = false;
|
||||
}
|
||||
@ -172,15 +175,17 @@ public class WorldRenderer {
|
||||
}
|
||||
|
||||
public float distanceToEntitySquared(Entity var1) {
|
||||
float var2 = (float)(var1.posX - (double)this.field_1746_q);
|
||||
float var3 = (float)(var1.posY - (double)this.field_1743_r);
|
||||
float var4 = (float)(var1.posZ - (double)this.field_1741_s);
|
||||
float var2 = (float)(var1.posX - (double)this.posXPlus);
|
||||
float var3 = (float)(var1.posY - (double)this.posYPlus);
|
||||
float var4 = (float)(var1.posZ - (double)this.posZPlus);
|
||||
return var2 * var2 + var3 * var3 + var4 * var4;
|
||||
}
|
||||
|
||||
public void setDontDraw() {
|
||||
for(int var1 = 0; var1 < 2; ++var1) {
|
||||
this.skipRenderPass[var1] = true;
|
||||
GL11.flushDisplayList(glRenderList, true);
|
||||
GL11.flushDisplayList(glRenderList + 1, true);
|
||||
}
|
||||
|
||||
this.isInFrustum = false;
|
||||
@ -197,7 +202,7 @@ public class WorldRenderer {
|
||||
}
|
||||
|
||||
public void updateInFrustrum(ICamera var1) {
|
||||
this.isInFrustum = var1.isBoundingBoxInFrustum(this.field_1736_v);
|
||||
this.isInFrustum = var1.isBoundingBoxInFrustum(this.rendererBoundingBox);
|
||||
}
|
||||
|
||||
public void callOcclusionQueryList() {
|
||||
@ -205,7 +210,7 @@ public class WorldRenderer {
|
||||
}
|
||||
|
||||
public boolean canRender() {
|
||||
return !this.isInitialized ? false : this.skipRenderPass[0] && this.skipRenderPass[1];
|
||||
return !this.isInitialized ? false : this.skipRenderPass[0] && this.skipRenderPass[1] && !this.needsUpdate;
|
||||
}
|
||||
|
||||
public void markDirty() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user