This commit is contained in:
ThisIsALegitUsername 2023-04-08 20:17:25 +00:00
parent 3fdee1c122
commit 1f5ba6cdee
6 changed files with 30817 additions and 30731 deletions

20
Start.java Normal file
View File

@ -0,0 +1,20 @@
import java.io.File;
import java.lang.reflect.Field;
import java.util.Arrays;
import net.minecraft.client.main.Main;
public class Start
{
public static void main(String[] args)
{
Main.main(concat(new String[] {"--version", "mcp", "--accessToken", "0", "--assetsDir", "assets", "--assetIndex", "1.8", "--userProperties", "{}"}, args));
}
public static <T> T[] concat(T[] first, T[] second)
{
T[] result = Arrays.copyOf(first, first.length + second.length);
System.arraycopy(second, 0, result, first.length, second.length);
return result;
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -20,6 +20,8 @@ public class FPSOptions extends Mod {
public BooleanSetting lightUpdates = new BooleanSetting("No light updates", "", true);
public BooleanSetting noArmSwing = new BooleanSetting("No limb swing", "", false);
public BooleanSetting reducedWater = new BooleanSetting("Reduced water lag", "", true);
public static BooleanSetting smoothFPS = new BooleanSetting("SmoothFPS", "", true);
public static BooleanSetting smoothWorld = new BooleanSetting("Smooth world", "", true);
public CustomRectSettingDraw minSetting = new CustomRectSettingDraw("Minimal settings", "") {
@Override
public void onPress() {
@ -54,6 +56,6 @@ public class FPSOptions extends Mod {
//public BooleanSetting delay = new BooleanSetting("Chunk delay", "", false);
public FPSOptions() {
addSetting(batchRendering, blockEffects, limit, lowTick, lightUpdates, noArmSwing, reducedWater, minSetting);
addSetting(batchRendering, blockEffects, limit, lowTick, lightUpdates, noArmSwing, reducedWater, smoothFPS, minSetting);
}
}

View File

@ -27,6 +27,7 @@ import com.google.common.base.Predicates;
import dev.resent.client.Resent;
import dev.resent.module.base.ModManager;
import dev.resent.module.base.RenderMod;
import dev.resent.module.impl.misc.FPSOptions;
import dev.resent.util.misc.W;
import java.util.List;
import java.util.concurrent.Callable;
@ -1105,7 +1106,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
this.mc.mcProfiler.endStartSection("terrain_setup");
renderglobal.setupTerrain(entity, (double) partialTicks, frustum, frameCount++, mc.thePlayer.isSpectator());
if (pass == 0 || pass == 2) {
if (pass == 0 && FPSOptions.smoothFPS.getValue() || pass == 2 && FPSOptions.smoothFPS.getValue() ) {
this.mc.mcProfiler.endStartSection("updatechunks");
this.mc.renderGlobal.updateChunks(finishTimeNano);
}

View File

@ -1,10 +1,12 @@
package net.minecraft.entity;
import dev.resent.module.impl.misc.FPSOptions;
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityGhast;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.passive.EntityTameable;
import net.minecraft.entity.player.EntityPlayer;
@ -110,10 +112,30 @@ public abstract class EntityLiving extends EntityLivingBase {
}
}
private void onUpdateMinimal()
{
++this.entityAge;
if (this instanceof EntityMob)
{
float f = this.getBrightness(1.0F);
if (f > 0.5F)
{
this.entityAge += 2;
}
}
this.despawnEntity();
}
/**+
* Gets called every tick from main Entity class
*/
public void onEntityUpdate() {
if(FPSOptions.smoothWorld.getValue()){
this.onUpdateMinimal();
}else {
super.onEntityUpdate();
this.worldObj.theProfiler.startSection("mobBaseTick");
if (this.isEntityAlive() && this.rand.nextInt(1000) < this.livingSoundTime++) {
@ -123,6 +145,7 @@ public abstract class EntityLiving extends EntityLivingBase {
this.worldObj.theProfiler.endSection();
}
}
/**+
* Get the experience points the entity currently has.