This commit is contained in:
ThisIsALegitUsername 2023-03-03 17:39:38 +00:00
parent aefde8b574
commit 1ca066e5c3
8 changed files with 57652 additions and 57582 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -28,6 +28,7 @@ import dev.resent.module.impl.misc.Cosmetics;
import dev.resent.module.impl.misc.CrystalOptimizer;
import dev.resent.module.impl.misc.DynamicFOV;
import dev.resent.module.impl.misc.FPSB;
import dev.resent.module.impl.misc.FPSOptions;
import dev.resent.module.impl.misc.Fullbright;
import dev.resent.module.impl.misc.HUD;
import dev.resent.module.impl.misc.MinimalViewBobbing;
@ -76,9 +77,11 @@ public class ModManager {
public static BPS bps = new BPS();
public static ClickGui clickGui = new ClickGui();
public static ItemPhysics itemPhysics = new ItemPhysics();
public static FPSOptions fpsOptions = new FPSOptions();
public ModManager() {
//Hud
register(fpsOptions);
register(itemPhysics);
register(clickGui);
register(bps);

View File

@ -0,0 +1,17 @@
package dev.resent.module.impl.misc;
import dev.resent.annotation.Module;
import dev.resent.module.base.Mod;
import dev.resent.module.base.Mod.Category;
import dev.resent.module.base.setting.BooleanSetting;
@Module(name = "FPS Options", category = Category.MISC, hasSetting = true)
public class FPSOptions extends Mod{
public BooleanSetting batchRendering = new BooleanSetting("Batch rendering", "", false);
public FPSOptions(){
addSetting(batchRendering);
}
}

View File

@ -32,7 +32,7 @@ public class WorldRenderer {
private double xOffset;
private double yOffset;
private double zOffset;
private boolean isDrawing;
public boolean isDrawing;
private VertexFormat vertexFormat;

View File

@ -1,14 +1,18 @@
package net.minecraft.client.model;
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_COMPILE;
import java.util.List;
import com.google.common.collect.Lists;
import java.util.List;
import dev.resent.module.base.ModManager;
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
import net.minecraft.client.renderer.GLAllocation;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
/**+
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
@ -135,7 +139,16 @@ public class ModelRenderer {
this.rotationPointZ = rotationPointZIn;
}
private boolean compiledState;
public void render(float parFloat1) {
boolean batchRendering = ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.batchRendering.getValue();
if (compiledState != batchRendering) {
this.compiled = false;
}
if (!this.isHidden) {
if (this.showModel) {
if (!this.compiled) {
@ -259,10 +272,21 @@ public class ModelRenderer {
EaglercraftGPU.glNewList(this.displayList, GL_COMPILE);
WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();
boolean batchRendering = ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.batchRendering.getValue();
this.compiledState = batchRendering;
if (batchRendering) {
Tessellator.getInstance().getWorldRenderer().begin(7, DefaultVertexFormats.OLDMODEL_POSITION_TEX_NORMAL);
}
for (int i = 0; i < this.cubeList.size(); ++i) {
((ModelBox) this.cubeList.get(i)).render(worldrenderer, scale);
}
if (batchRendering) {
Tessellator.getInstance().draw();
}
EaglercraftGPU.glEndList();
this.compiled = true;
}

View File

@ -1,5 +1,6 @@
package net.minecraft.client.model;
import dev.resent.module.base.ModManager;
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
@ -54,6 +55,8 @@ public class TexturedQuad {
this.vertexPositions = apositiontexturevertex;
}
private boolean drawOnSelf;
/**+
* Draw this primitve. This is typically called only once as the
* generated drawing instructions are saved by the renderer and
@ -72,13 +75,22 @@ public class TexturedQuad {
f2 = -f2;
}
renderer.begin(7, DefaultVertexFormats.OLDMODEL_POSITION_TEX_NORMAL);
boolean batchRendering = ModManager.fpsOptions.isEnabled() && ModManager.fpsOptions.batchRendering.getValue();
this.drawOnSelf = !renderer.isDrawing;
if (this.drawOnSelf || !batchRendering) {
renderer.begin(7, DefaultVertexFormats.POSITION_TEX_NORMAL);
}
//renderer.begin(7, DefaultVertexFormats.OLDMODEL_POSITION_TEX_NORMAL);
for (int i = 0; i < 4; ++i) {
PositionTextureVertex positiontexturevertex = this.vertexPositions[i];
renderer.pos(positiontexturevertex.vector3D.xCoord * (double) scale, positiontexturevertex.vector3D.yCoord * (double) scale, positiontexturevertex.vector3D.zCoord * (double) scale).tex((double) positiontexturevertex.texturePositionX, (double) positiontexturevertex.texturePositionY).normal(f, f1, f2).endVertex();
}
Tessellator.getInstance().draw();
if (this.drawOnSelf || !batchRendering) {
Tessellator.getInstance().draw();
}
}
}