fps
This commit is contained in:
parent
3fdee1c122
commit
1f5ba6cdee
20
Start.java
Normal file
20
Start.java
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
61496
javascript/classes.js
61496
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -20,6 +20,8 @@ public class FPSOptions extends Mod {
|
||||||
public BooleanSetting lightUpdates = new BooleanSetting("No light updates", "", true);
|
public BooleanSetting lightUpdates = new BooleanSetting("No light updates", "", true);
|
||||||
public BooleanSetting noArmSwing = new BooleanSetting("No limb swing", "", false);
|
public BooleanSetting noArmSwing = new BooleanSetting("No limb swing", "", false);
|
||||||
public BooleanSetting reducedWater = new BooleanSetting("Reduced water lag", "", true);
|
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", "") {
|
public CustomRectSettingDraw minSetting = new CustomRectSettingDraw("Minimal settings", "") {
|
||||||
@Override
|
@Override
|
||||||
public void onPress() {
|
public void onPress() {
|
||||||
|
@ -54,6 +56,6 @@ public class FPSOptions extends Mod {
|
||||||
//public BooleanSetting delay = new BooleanSetting("Chunk delay", "", false);
|
//public BooleanSetting delay = new BooleanSetting("Chunk delay", "", false);
|
||||||
|
|
||||||
public FPSOptions() {
|
public FPSOptions() {
|
||||||
addSetting(batchRendering, blockEffects, limit, lowTick, lightUpdates, noArmSwing, reducedWater, minSetting);
|
addSetting(batchRendering, blockEffects, limit, lowTick, lightUpdates, noArmSwing, reducedWater, smoothFPS, minSetting);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ import com.google.common.base.Predicates;
|
||||||
import dev.resent.client.Resent;
|
import dev.resent.client.Resent;
|
||||||
import dev.resent.module.base.ModManager;
|
import dev.resent.module.base.ModManager;
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
|
import dev.resent.module.impl.misc.FPSOptions;
|
||||||
import dev.resent.util.misc.W;
|
import dev.resent.util.misc.W;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
@ -1105,7 +1106,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
||||||
this.mc.mcProfiler.endStartSection("terrain_setup");
|
this.mc.mcProfiler.endStartSection("terrain_setup");
|
||||||
renderglobal.setupTerrain(entity, (double) partialTicks, frustum, frameCount++, mc.thePlayer.isSpectator());
|
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.mcProfiler.endStartSection("updatechunks");
|
||||||
this.mc.renderGlobal.updateChunks(finishTimeNano);
|
this.mc.renderGlobal.updateChunks(finishTimeNano);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
package net.minecraft.entity;
|
package net.minecraft.entity;
|
||||||
|
|
||||||
|
import dev.resent.module.impl.misc.FPSOptions;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
import net.minecraft.enchantment.EnchantmentHelper;
|
||||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.monster.EntityGhast;
|
import net.minecraft.entity.monster.EntityGhast;
|
||||||
|
import net.minecraft.entity.monster.EntityMob;
|
||||||
import net.minecraft.entity.monster.IMob;
|
import net.minecraft.entity.monster.IMob;
|
||||||
import net.minecraft.entity.passive.EntityTameable;
|
import net.minecraft.entity.passive.EntityTameable;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
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
|
* Gets called every tick from main Entity class
|
||||||
*/
|
*/
|
||||||
public void onEntityUpdate() {
|
public void onEntityUpdate() {
|
||||||
|
if(FPSOptions.smoothWorld.getValue()){
|
||||||
|
this.onUpdateMinimal();
|
||||||
|
}else {
|
||||||
super.onEntityUpdate();
|
super.onEntityUpdate();
|
||||||
this.worldObj.theProfiler.startSection("mobBaseTick");
|
this.worldObj.theProfiler.startSection("mobBaseTick");
|
||||||
if (this.isEntityAlive() && this.rand.nextInt(1000) < this.livingSoundTime++) {
|
if (this.isEntityAlive() && this.rand.nextInt(1000) < this.livingSoundTime++) {
|
||||||
|
@ -123,6 +145,7 @@ public abstract class EntityLiving extends EntityLivingBase {
|
||||||
|
|
||||||
this.worldObj.theProfiler.endSection();
|
this.worldObj.theProfiler.endSection();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**+
|
/**+
|
||||||
* Get the experience points the entity currently has.
|
* Get the experience points the entity currently has.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user