Default settings, old 1.7 animations

This commit is contained in:
UnknownUser1789 2023-01-14 16:32:35 +00:00
parent b4c87ef069
commit 49e224e207
7 changed files with 22229 additions and 22201 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,7 @@ public class Resent {
} }
public static String NAME = "Resent"; public static String NAME = "Resent";
public static double VERSION = 3.3; public static String VERSION = "3.3.1";
public static Minecraft mc = Minecraft.getMinecraft(); public static Minecraft mc = Minecraft.getMinecraft();
public static Resent INSTANCE; public static Resent INSTANCE;
public ModManager modManager; public ModManager modManager;

View File

@ -1,12 +1,17 @@
package net.minecraft.client.gui; package net.minecraft.client.gui;
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_SRC_ALPHA; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_SRC_ALPHA;
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_ONE_MINUS_SRC_COLOR;
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SRC_ALPHA; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_SRC_ALPHA;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import com.google.common.base.Predicate; import com.google.common.base.Predicate;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import dev.resent.Resent; import dev.resent.Resent;
import dev.resent.module.base.Mod; import dev.resent.module.base.Mod;
import dev.resent.module.base.ModManager; import dev.resent.module.base.ModManager;
@ -15,15 +20,13 @@ import dev.resent.module.impl.misc.Crosshair;
import dev.resent.ui.mods.HUDConfigScreen; import dev.resent.ui.mods.HUDConfigScreen;
import dev.resent.util.misc.W; import dev.resent.util.misc.W;
import dev.resent.util.render.RenderUtils; import dev.resent.util.render.RenderUtils;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite; import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer; import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderItem;
@ -887,10 +890,32 @@ public class GuiIngame extends Gui {
} }
} }
private void attemptSwing() {
if(ModManager.animations.isEnabled()) {
if (this.mc.thePlayer.getItemInUseCount() > 0) {
final boolean mouseDown = this.mc.gameSettings.keyBindAttack.isKeyDown() && this.mc.gameSettings.keyBindUseItem.isKeyDown();
if (mouseDown && this.mc.objectMouseOver != null && this.mc.objectMouseOver.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK) {
this.swingItem(this.mc.thePlayer);
}else if(mouseDown) {
this.swingItem(this.mc.thePlayer);
}
}
}
}
private void swingItem(EntityPlayerSP entityplayersp) {
final int swingAnimationEnd = entityplayersp.isPotionActive(Potion.digSpeed) ? (6 - (1 + entityplayersp.getActivePotionEffect(Potion.digSpeed).getAmplifier()) * 1) : (entityplayersp.isPotionActive(Potion.digSlowdown) ? (6 + (1 + entityplayersp.getActivePotionEffect(Potion.digSlowdown).getAmplifier()) * 2) : 6);
if (!entityplayersp.isSwingInProgress || entityplayersp.swingProgressInt >= swingAnimationEnd / 2 || entityplayersp.swingProgressInt < 0) {
entityplayersp.swingProgressInt = -1;
entityplayersp.isSwingInProgress = true;
}
}
/**+ /**+
* The update tick for the ingame UI * The update tick for the ingame UI
*/ */
public void updateTick() { public void updateTick() {
attemptSwing();
if (this.recordPlayingUpFor > 0) { if (this.recordPlayingUpFor > 0) {
--this.recordPlayingUpFor; --this.recordPlayingUpFor;
} }

View File

@ -2,6 +2,7 @@ package net.minecraft.client.renderer;
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
import dev.resent.module.base.ModManager;
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite; import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
@ -322,14 +323,14 @@ public class ItemRenderer {
case EAT: case EAT:
case DRINK: case DRINK:
this.func_178104_a(entityplayersp, partialTicks); this.func_178104_a(entityplayersp, partialTicks);
this.transformFirstPersonItem(f, 0.0F); this.transformFirstPersonItem(f, ModManager.animations.isEnabled() ? f1 : 0.0F);
break; break;
case BLOCK: case BLOCK:
this.transformFirstPersonItem(f, 0.0F); this.transformFirstPersonItem(f, ModManager.animations.isEnabled() ? f1 : 0.0F);
this.func_178103_d(); this.func_178103_d();
break; break;
case BOW: case BOW:
this.transformFirstPersonItem(f, 0.0F); this.transformFirstPersonItem(f, ModManager.animations.isEnabled() ? f1 : 0.0F);
this.func_178098_a(partialTicks, entityplayersp); this.func_178098_a(partialTicks, entityplayersp);
} }
} else { } else {

View File

@ -6,6 +6,7 @@ import com.google.common.collect.Maps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import dev.resent.Resent; import dev.resent.Resent;
import dev.resent.module.base.Mod; import dev.resent.module.base.Mod;
import dev.resent.module.base.ModManager;
import dev.resent.module.base.RenderModule; import dev.resent.module.base.RenderModule;
import dev.resent.setting.BooleanSetting; import dev.resent.setting.BooleanSetting;
import dev.resent.setting.ModeSetting; import dev.resent.setting.ModeSetting;
@ -117,7 +118,7 @@ public class GameSettings {
public float chatHeightUnfocused = 0.44366196F; public float chatHeightUnfocused = 0.44366196F;
public float chatHeightFocused = 1.0F; public float chatHeightFocused = 1.0F;
public boolean showInventoryAchievementHint = true; public boolean showInventoryAchievementHint = true;
public int mipmapLevels = 4; public int mipmapLevels = 1;
private Map<SoundCategory, Float> mapSoundLevels = Maps.newEnumMap(SoundCategory.class); private Map<SoundCategory, Float> mapSoundLevels = Maps.newEnumMap(SoundCategory.class);
public float streamBytesPerPixel = 0.5F; public float streamBytesPerPixel = 0.5F;
public float streamMicVolume = 1.0F; public float streamMicVolume = 1.0F;
@ -183,18 +184,18 @@ public class GameSettings {
/**+ /**+
* GUI scale * GUI scale
*/ */
public int guiScale = 3; public int guiScale = 2;
public int particleSetting; public int particleSetting;
public String language; public String language;
public boolean forceUnicodeFont; public boolean forceUnicodeFont;
public boolean hudFps = true; public boolean hudFps = false;
public boolean hudCoords = true; public boolean hudCoords = false;
public boolean hudPlayer = true; public boolean hudPlayer = false;
public boolean hudWorld = false; public boolean hudWorld = false;
public boolean hudStats = false; public boolean hudStats = false;
public boolean hud24h = false; public boolean hud24h = false;
public boolean chunkFix = true; public boolean chunkFix = true;
public boolean fog = true; public boolean fog = false;
public int fxaa = 0; public int fxaa = 0;
public GameSettings(Minecraft mcIn) { public GameSettings(Minecraft mcIn) {
@ -229,14 +230,15 @@ public class GameSettings {
); );
this.difficulty = EnumDifficulty.NORMAL; this.difficulty = EnumDifficulty.NORMAL;
this.lastServer = ""; this.lastServer = "";
this.fovSetting = 70.0F; this.fovSetting = 80.0F;
this.gammaSetting = 1.0F; this.gammaSetting = 1.0F;
this.language = EagRuntime.getConfiguration().getDefaultLocale(); this.language = EagRuntime.getConfiguration().getDefaultLocale();
this.forceUnicodeFont = false; this.forceUnicodeFont = false;
this.mc = mcIn; this.mc = mcIn;
ModManager.scoreboard.enabled = true;
GameSettings.Options.RENDER_DISTANCE.setValueMax(18.0F); GameSettings.Options.RENDER_DISTANCE.setValueMax(18.0F);
this.renderDistanceChunks = 4; this.renderDistanceChunks = 1;
this.loadOptions(); this.loadOptions();
} }

View File

@ -847,9 +847,6 @@ public abstract class EntityLivingBase extends Entity {
* account. * account.
*/ */
private int getArmSwingAnimationEnd() { private int getArmSwingAnimationEnd() {
if (ModManager.animations.isEnabled() && Minecraft.getMinecraft().theWorld != null) {
return 10;
}
return this.isPotionActive(Potion.digSpeed) ? 6 - (1 + this.getActivePotionEffect(Potion.digSpeed).getAmplifier()) * 1 : (this.isPotionActive(Potion.digSlowdown) ? 6 + (1 + this.getActivePotionEffect(Potion.digSlowdown).getAmplifier()) * 2 : 6); return this.isPotionActive(Potion.digSpeed) ? 6 - (1 + this.getActivePotionEffect(Potion.digSpeed).getAmplifier()) * 1 : (this.isPotionActive(Potion.digSlowdown) ? 6 + (1 + this.getActivePotionEffect(Potion.digSlowdown).getAmplifier()) * 2 : 6);
} }