25w11b fix rendering bugs
This commit is contained in:
parent
8264769a5f
commit
bef4aa4e6e
|
@ -51,7 +51,7 @@ teavm.js {
|
|||
mainClass = "net.lax1dude.eaglercraft.Client"
|
||||
outputDir = file(folder)
|
||||
properties = [ "java.util.TimeZone.autodetect": "true" ]
|
||||
debugInformation = true
|
||||
debugInformation = false
|
||||
}
|
||||
/*
|
||||
tasks.register('copyDebugJar', Copy) {
|
||||
|
|
File diff suppressed because one or more lines are too long
Binary file not shown.
55006
javascript/classes.js
55006
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -5,7 +5,7 @@ import java.util.List;
|
|||
|
||||
public class ConfigConstants {
|
||||
|
||||
public static final String version = "25w11a";
|
||||
public static final String version = "25w11b";
|
||||
public static final String mainMenuString = "Eaglercraft " + version;
|
||||
|
||||
public static final String forkMe = "https://git.zelz.net/catfoolyou/Project164";
|
||||
|
|
|
@ -58,7 +58,7 @@ public class CommandDebug extends CommandBase
|
|||
int var5 = MinecraftServer.getServer().getTickCounter();
|
||||
long var6 = var3 - this.startTime;
|
||||
int var8 = var5 - this.startTicks;
|
||||
this.saveProfilerResults(var6, var8);
|
||||
//this.saveProfilerResults(var6, var8);
|
||||
MinecraftServer.getServer().theProfiler.profilingEnabled = false;
|
||||
notifyAdmins(par1ICommandSender, "commands.debug.stop", new Object[] {Float.valueOf((float)var6 / 1000.0F), Integer.valueOf(var8)});
|
||||
return;
|
||||
|
@ -68,94 +68,6 @@ public class CommandDebug extends CommandBase
|
|||
throw new WrongUsageException("commands.debug.usage", new Object[0]);
|
||||
}
|
||||
|
||||
private void saveProfilerResults(long par1, int par3)
|
||||
{
|
||||
File var4 = new File(MinecraftServer.getServer().getFile("debug"), "profile-results-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + ".txt");
|
||||
var4.getParentFile().mkdirs();
|
||||
|
||||
try
|
||||
{
|
||||
FileWriter var5 = new FileWriter(var4);
|
||||
var5.write(this.getProfilerResults(par1, par3));
|
||||
var5.close();
|
||||
}
|
||||
catch (Throwable var6)
|
||||
{
|
||||
MinecraftServer.getServer().getLogAgent().logSevereException("Could not save profiler results to " + var4, var6);
|
||||
}
|
||||
}
|
||||
|
||||
private String getProfilerResults(long par1, int par3)
|
||||
{
|
||||
StringBuilder var4 = new StringBuilder();
|
||||
var4.append("---- Minecraft Profiler Results ----\n");
|
||||
var4.append("// ");
|
||||
var4.append(getWittyComment());
|
||||
var4.append("\n\n");
|
||||
var4.append("Time span: ").append(par1).append(" ms\n");
|
||||
var4.append("Tick span: ").append(par3).append(" ticks\n");
|
||||
var4.append("// This is approximately ").append(String.format("%.2f", new Object[] {Float.valueOf((float)par3 / ((float)par1 / 1000.0F))})).append(" ticks per second. It should be ").append(20).append(" ticks per second\n\n");
|
||||
var4.append("--- BEGIN PROFILE DUMP ---\n\n");
|
||||
this.getProfileDump(0, "root", var4);
|
||||
var4.append("--- END PROFILE DUMP ---\n\n");
|
||||
return var4.toString();
|
||||
}
|
||||
|
||||
private void getProfileDump(int par1, String par2Str, StringBuilder par3StringBuilder)
|
||||
{
|
||||
List var4 = MinecraftServer.getServer().theProfiler.getProfilingData(par2Str);
|
||||
|
||||
if (var4 != null && var4.size() >= 3)
|
||||
{
|
||||
for (int var5 = 1; var5 < var4.size(); ++var5)
|
||||
{
|
||||
ProfilerResult var6 = (ProfilerResult)var4.get(var5);
|
||||
par3StringBuilder.append(String.format("[%02d] ", new Object[] {Integer.valueOf(par1)}));
|
||||
|
||||
for (int var7 = 0; var7 < par1; ++var7)
|
||||
{
|
||||
par3StringBuilder.append(" ");
|
||||
}
|
||||
|
||||
par3StringBuilder.append(var6.field_76331_c);
|
||||
par3StringBuilder.append(" - ");
|
||||
par3StringBuilder.append(String.format("%.2f", new Object[] {Double.valueOf(var6.field_76332_a)}));
|
||||
par3StringBuilder.append("%/");
|
||||
par3StringBuilder.append(String.format("%.2f", new Object[] {Double.valueOf(var6.field_76330_b)}));
|
||||
par3StringBuilder.append("%\n");
|
||||
|
||||
if (!var6.field_76331_c.equals("unspecified"))
|
||||
{
|
||||
try
|
||||
{
|
||||
this.getProfileDump(par1 + 1, par2Str + "." + var6.field_76331_c, par3StringBuilder);
|
||||
}
|
||||
catch (Exception var8)
|
||||
{
|
||||
par3StringBuilder.append("[[ EXCEPTION " + var8 + " ]]");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a random "witty" comment.
|
||||
*/
|
||||
private static String getWittyComment()
|
||||
{
|
||||
String[] var0 = new String[] {"Shiny numbers!", "Am I not running fast enough? :(", "I\'m working as hard as I can!", "Will I ever be good enough for you? :(", "Speedy. Zoooooom!", "Hello world", "40% better than a crash report.", "Now with extra numbers", "Now with less numbers", "Now with the same numbers", "You should add flames to things, it makes them go faster!", "Do you feel the need for... optimization?", "*cracks redstone whip*", "Maybe if you treated it better then it\'ll have more motivation to work faster! Poor server."};
|
||||
|
||||
try
|
||||
{
|
||||
return var0[(int)(System.nanoTime() % (long)var0.length)];
|
||||
}
|
||||
catch (Throwable var2)
|
||||
{
|
||||
return "Witty comment unavailable :(";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the strings available in this command to the given list of tab completion options.
|
||||
*/
|
||||
|
|
|
@ -35,17 +35,6 @@ public class EntityRenderer
|
|||
private MouseFilter mouseFilterXAxis = new MouseFilter();
|
||||
private MouseFilter mouseFilterYAxis = new MouseFilter();
|
||||
|
||||
/** Mouse filter dummy 1 */
|
||||
private MouseFilter mouseFilterDummy1 = new MouseFilter();
|
||||
|
||||
/** Mouse filter dummy 2 */
|
||||
private MouseFilter mouseFilterDummy2 = new MouseFilter();
|
||||
|
||||
/** Mouse filter dummy 3 */
|
||||
private MouseFilter mouseFilterDummy3 = new MouseFilter();
|
||||
|
||||
/** Mouse filter dummy 4 */
|
||||
private MouseFilter mouseFilterDummy4 = new MouseFilter();
|
||||
private float thirdPersonDistance = 4.0F;
|
||||
|
||||
/** Third person distance temp */
|
||||
|
@ -162,9 +151,12 @@ public class EntityRenderer
|
|||
|
||||
public boolean asdfghjkl = false;
|
||||
|
||||
private GameOverlayFramebuffer overlayFramebuffer;
|
||||
|
||||
public EntityRenderer(Minecraft par1Minecraft)
|
||||
{
|
||||
this.mc = par1Minecraft;
|
||||
this.overlayFramebuffer = new GameOverlayFramebuffer();
|
||||
this.itemRenderer = new ItemRenderer(par1Minecraft);
|
||||
this.lightmapTexture = par1Minecraft.renderEngine.allocateAndSetupTexture(new EaglerImage(16, 16, true));
|
||||
this.lightmapColors = new int[256];
|
||||
|
@ -1009,6 +1001,15 @@ public class EntityRenderer
|
|||
this.renderWorld(par1, this.renderEndNanoTime + (long)(1000000000 / var18));
|
||||
}
|
||||
|
||||
float i = startup / 2400.0f;
|
||||
if(i > 1.0f) i = 1.0f;
|
||||
i = i * i;
|
||||
|
||||
if(i > 0.15f) {
|
||||
EffectPipeline.updateNoiseTexture(mc.displayWidth, mc.displayHeight, i);
|
||||
EffectPipeline.drawNoise(var14, var15, (i - 0.15f) / 0.85f);
|
||||
}
|
||||
|
||||
this.renderEndNanoTime = System.nanoTime();
|
||||
this.mc.mcProfiler.endStartSection("gui");
|
||||
|
||||
|
@ -1064,7 +1065,10 @@ public class EntityRenderer
|
|||
double var7 = var4.lastTickPosX + (var4.posX - var4.lastTickPosX) * (double)par1;
|
||||
double var9 = var4.lastTickPosY + (var4.posY - var4.lastTickPosY) * (double)par1;
|
||||
double var11 = var4.lastTickPosZ + (var4.posZ - var4.lastTickPosZ) * (double)par1;
|
||||
this.mc.mcProfiler.endStartSection("center");
|
||||
|
||||
EffectPipelineFXAA.displayWidth = this.mc.displayWidth;
|
||||
EffectPipelineFXAA.displayHeight = this.mc.displayHeight;
|
||||
EffectPipelineFXAA.beginPipelineRender();
|
||||
|
||||
for (int var13 = 0; var13 < 2; ++var13)
|
||||
{
|
||||
|
@ -1134,6 +1138,7 @@ public class EntityRenderer
|
|||
}
|
||||
|
||||
this.mc.mcProfiler.endStartSection("prepareterrain");
|
||||
EaglerAdapter.glDisable(EaglerAdapter.GL_BLEND);
|
||||
this.setupFog(0, par1);
|
||||
EaglerAdapter.glEnable(EaglerAdapter.GL_FOG);
|
||||
TextureMap.locationBlocksTexture.bindTexture();
|
||||
|
@ -1142,6 +1147,7 @@ public class EntityRenderer
|
|||
var5.sortAndRender(var4, 0, (double)par1);
|
||||
EaglerAdapter.glShadeModel(EaglerAdapter.GL_FLAT);
|
||||
EntityPlayer var17;
|
||||
EaglerAdapter.glEnable(EaglerAdapter.GL_BLEND);
|
||||
|
||||
if (this.debugViewDirection == 0)
|
||||
{
|
||||
|
@ -1258,7 +1264,7 @@ public class EntityRenderer
|
|||
}
|
||||
|
||||
EaglerAdapter.glColorMask(true, true, true, false);
|
||||
this.mc.mcProfiler.endSection();
|
||||
EffectPipelineFXAA.endPipelineRender();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,14 +48,6 @@ public class Profiler
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get profiling data
|
||||
*/
|
||||
public List getProfilingData(String par1Str)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* End current section and start a new section
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue