Minified build

This commit is contained in:
PeytonPlayz595 2024-02-16 11:13:55 -05:00
parent 1283068e18
commit 0ea92c2dc4
9 changed files with 14256 additions and 237160 deletions

View File

@ -23,11 +23,11 @@ sourceSets {
}
teavm.js {
addedToWebApp = true
addedToWebApp = true;
mainClass = "net.lax1dude.eaglercraft.Client"
outputDir = file("web");
targetFileName = "app.js"
obfuscated = false;
targetFileName = "app.js";
obfuscated = true;
sourceMap = true;
entryPointName = 'main';
properties = null;

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,11 @@
package net.minecraft.src;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class ChunkProviderIso implements IChunkProvider {
private Chunk[] chunks = new Chunk[256];
private Map<Integer, Chunk> chunks = new HashMap<Integer, Chunk>();
private World worldObj;
private IChunkLoader chunkLoader;
byte[] field_899_a = new byte[-Short.MIN_VALUE];
@ -15,7 +17,7 @@ public class ChunkProviderIso implements IChunkProvider {
public boolean chunkExists(int var1, int var2) {
int var3 = var1 & 15 | (var2 & 15) * 16;
return this.chunks[var3] != null && this.chunks[var3].isAtLocation(var1, var2);
return this.chunks.containsKey(var3) && this.chunks.get(var3).isAtLocation(var1, var2);
}
public Chunk provideChunk(int var1, int var2) {
@ -30,10 +32,10 @@ public class ChunkProviderIso implements IChunkProvider {
var4.neverSave = true;
}
this.chunks[var3] = var4;
this.chunks.put(var3, var4);
}
return this.chunks[var3];
return this.chunks.get(var3);
} catch (Exception var5) {
var5.printStackTrace();
return null;

View File

@ -1,12 +1,14 @@
package net.minecraft.src;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
public class ChunkProviderLoadOrGenerate implements IChunkProvider {
private Chunk blankChunk;
private IChunkProvider chunkProvider;
private IChunkLoader chunkLoader;
private Chunk[] chunks = new Chunk[1024];
private Map<Integer, Chunk> chunks = new HashMap<Integer, Chunk>();
private World worldObj;
int lastQueriedChunkXPos = -999999999;
int lastQueriedChunkZPos = -999999999;
@ -28,7 +30,7 @@ public class ChunkProviderLoadOrGenerate implements IChunkProvider {
int var3 = var1 & 31;
int var4 = var2 & 31;
int var5 = var3 + var4 * 32;
return this.chunks[var5] != null && (this.chunks[var5] == this.blankChunk || this.chunks[var5].isAtLocation(var1, var2));
return this.chunks.containsKey(var5) && (this.chunks.get(var5) == this.blankChunk || this.chunks.get(var5).isAtLocation(var1, var2));
}
}
@ -40,10 +42,10 @@ public class ChunkProviderLoadOrGenerate implements IChunkProvider {
int var4 = var2 & 31;
int var5 = var3 + var4 * 32;
if(!this.chunkExists(var1, var2)) {
if(this.chunks[var5] != null) {
this.chunks[var5].onChunkUnload();
this.saveChunk(this.chunks[var5]);
this.saveExtraChunkData(this.chunks[var5]);
if(this.chunks.containsKey(var5)) {
this.chunks.get(var5).onChunkUnload();
this.saveChunk(this.chunks.get(var5));
this.saveExtraChunkData(this.chunks.get(var5));
}
Chunk var6 = this.func_542_c(var1, var2);
@ -55,13 +57,13 @@ public class ChunkProviderLoadOrGenerate implements IChunkProvider {
}
}
this.chunks[var5] = var6;
this.chunks.put(var5, var6);
var6.func_4143_d();
if(this.chunks[var5] != null) {
this.chunks[var5].onChunkLoad();
if(this.chunks.containsKey(var5)) {
this.chunks.get(var5).onChunkLoad();
}
if(!this.chunks[var5].isTerrainPopulated && this.chunkExists(var1 + 1, var2 + 1) && this.chunkExists(var1, var2 + 1) && this.chunkExists(var1 + 1, var2)) {
if(!this.chunks.get(var5).isTerrainPopulated && this.chunkExists(var1 + 1, var2 + 1) && this.chunkExists(var1, var2 + 1) && this.chunkExists(var1 + 1, var2)) {
this.populate(this, var1, var2);
}
@ -80,8 +82,8 @@ public class ChunkProviderLoadOrGenerate implements IChunkProvider {
this.lastQueriedChunkXPos = var1;
this.lastQueriedChunkZPos = var2;
this.lastQueriedChunk = this.chunks[var5];
return this.chunks[var5];
this.lastQueriedChunk = this.chunks.get(var5);
return this.chunks.get(var5);
}
}
@ -143,8 +145,8 @@ public class ChunkProviderLoadOrGenerate implements IChunkProvider {
int var4 = 0;
int var5;
if(var2 != null) {
for(var5 = 0; var5 < this.chunks.length; ++var5) {
if(this.chunks[var5] != null && this.chunks[var5].needsSaving(var1)) {
for(var5 = 0; var5 < this.chunks.size(); ++var5) {
if(this.chunks.get(var5) != null && this.chunks.get(var5).needsSaving(var1)) {
++var4;
}
}
@ -152,15 +154,15 @@ public class ChunkProviderLoadOrGenerate implements IChunkProvider {
var5 = 0;
for(int var6 = 0; var6 < this.chunks.length; ++var6) {
if(this.chunks[var6] != null) {
if(var1 && !this.chunks[var6].neverSave) {
this.saveExtraChunkData(this.chunks[var6]);
for(int var6 = 0; var6 < this.chunks.size(); ++var6) {
if(this.chunks.get(var6) != null) {
if(var1 && !this.chunks.get(var6).neverSave) {
this.saveExtraChunkData(this.chunks.get(var6));
}
if(this.chunks[var6].needsSaving(var1)) {
this.saveChunk(this.chunks[var6]);
this.chunks[var6].isModified = false;
if(this.chunks.get(var6).needsSaving(var1)) {
this.saveChunk(this.chunks.get(var6));
this.chunks.get(var6).isModified = false;
++var3;
if(var3 == 2 && !var1) {
return false;

View File

@ -78,16 +78,15 @@ public class ModelSpider extends ModelBase {
this.field_1247_i.rotateAngleZ = var7 * 0.74F;
this.field_1246_j.rotateAngleZ = -var7;
this.field_1245_m.rotateAngleZ = var7;
float var8 = -0.0F;
float var9 = (float)Math.PI * 0.125F;
this.field_1252_d.rotateAngleY = var9 * 2.0F + var8;
this.field_1251_e.rotateAngleY = -var9 * 2.0F - var8;
this.field_1250_f.rotateAngleY = var9 * 1.0F + var8;
this.field_1249_g.rotateAngleY = -var9 * 1.0F - var8;
this.field_1248_h.rotateAngleY = -var9 * 1.0F + var8;
this.field_1247_i.rotateAngleY = var9 * 1.0F - var8;
this.field_1246_j.rotateAngleY = -var9 * 2.0F + var8;
this.field_1245_m.rotateAngleY = var9 * 2.0F - var8;
this.field_1252_d.rotateAngleY = var9 * 2.0F;
this.field_1251_e.rotateAngleY = -var9 * 2.0F;
this.field_1250_f.rotateAngleY = var9 * 1.0F;
this.field_1249_g.rotateAngleY = -var9 * 1.0F;
this.field_1248_h.rotateAngleY = -var9 * 1.0F;
this.field_1247_i.rotateAngleY = var9 * 1.0F;
this.field_1246_j.rotateAngleY = -var9 * 2.0F;
this.field_1245_m.rotateAngleY = var9 * 2.0F;
float var10 = -(MathHelper.cos(var1 * 0.6662F * 2.0F + 0.0F) * 0.4F) * var2;
float var11 = -(MathHelper.cos(var1 * 0.6662F * 2.0F + (float)Math.PI) * 0.4F) * var2;
float var12 = -(MathHelper.cos(var1 * 0.6662F * 2.0F + (float)Math.PI * 0.5F) * 0.4F) * var2;

View File

@ -27,15 +27,15 @@ public class Vec3D {
}
public Vec3D(double var1, double var3, double var5) {
if(var1 == -0.0D) {
if(var1 == -0D) {
var1 = 0.0D;
}
if(var3 == -0.0D) {
if(var3 == -0D) {
var3 = 0.0D;
}
if(var5 == -0.0D) {
if(var5 == -0D) {
var5 = 0.0D;
}

View File

@ -63,9 +63,8 @@ public class WorldProvider {
public float[] func_4097_b(float var1, float var2) {
float var3 = 0.4F;
float var4 = MathHelper.cos(var1 * (float)Math.PI * 2.0F) - 0.0F;
float var5 = -0.0F;
if(var4 >= var5 - var3 && var4 <= var5 + var3) {
float var6 = (var4 - var5) / var3 * 0.5F + 0.5F;
if(var4 >= -var3 && var4 <= var3) {
float var6 = (var4) / var3 * 0.5F + 0.5F;
float var7 = 1.0F - (1.0F - MathHelper.sin(var6 * (float)Math.PI)) * 0.99F;
var7 *= var7;
this.field_4217_f[0] = var6 * 0.3F + 0.7F;

125617
web/js/app.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long