some cape stuffs & self nametag

This commit is contained in:
ThisIsALegitUsername 2023-02-21 02:56:32 +00:00
parent b1c87fe36d
commit 9cfb18d0ba
13 changed files with 37142 additions and 37118 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,9 @@
package dev.resent.module.base;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import dev.resent.module.base.Mod.Category;
import dev.resent.module.impl.hud.ArmorHud;
import dev.resent.module.impl.hud.CPS;
@ -27,11 +31,9 @@ import dev.resent.module.impl.misc.NoParticles;
import dev.resent.module.impl.misc.NoRain;
import dev.resent.module.impl.misc.NoSwingDelay;
import dev.resent.module.impl.misc.Scoreboard;
import dev.resent.module.impl.misc.SelfNametag;
import dev.resent.module.impl.misc.Sprint;
import dev.resent.module.impl.misc.TabGui;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class ModManager {
@ -65,9 +67,11 @@ public class ModManager {
public static HUD hud = new HUD();
public static CrystalOptimizer crystalOptimizer = new CrystalOptimizer();
public static TabGui tabGui = new TabGui();
public static SelfNametag selfNametag = new SelfNametag();
public ModManager() {
//Hud
register(selfNametag);
register(cosmetics);
register(tabGui);
register(crystalOptimizer);

View File

@ -11,7 +11,7 @@ public class Fullbright extends Mod {
@Override
public void onEnable() {
if (mc.thePlayer != null && mc.theWorld != null && mc.gameSettings != null) {
Resent.INSTANCE.soundManager.playAvasDedication();
//Resent.INSTANCE.soundManager.playAvasDedication();
mc.gameSettings.gammaSetting = 100;
}
}
@ -19,7 +19,7 @@ public class Fullbright extends Mod {
@Override
public void onDisable() {
if (mc.thePlayer != null && mc.theWorld != null && mc.gameSettings != null) {
Resent.INSTANCE.soundManager.stopMusic();
//Resent.INSTANCE.soundManager.stopMusic();
mc.gameSettings.gammaSetting = 1;
}
}

View File

@ -0,0 +1,8 @@
package dev.resent.module.impl.misc;
import dev.resent.annotation.Module;
import dev.resent.module.base.Mod;
import dev.resent.module.base.Mod.Category;
@Module(name = "Self nametag", category = Category.MISC)
public class SelfNametag extends Mod{ }

View File

@ -1,6 +1,5 @@
package dev.resent.ui;
import dev.resent.util.render.Color;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;

View File

@ -3,6 +3,9 @@ package net.minecraft.client.renderer.entity;
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
import com.google.common.collect.Lists;
import dev.resent.module.base.ModManager;
import java.util.List;
import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
@ -380,10 +383,9 @@ public abstract class RendererLivingEntity<T extends EntityLivingBase> extends R
}
protected boolean canRenderName(T entitylivingbase) {
EntityPlayerSP entityplayersp = Minecraft.getMinecraft().thePlayer;
if (entitylivingbase instanceof EntityPlayer && entitylivingbase != entityplayersp) {
if (entitylivingbase instanceof EntityPlayer && entitylivingbase != Minecraft.getMinecraft().thePlayer || entitylivingbase instanceof EntityPlayer && ModManager.selfNametag.isEnabled()) {
Team team = entitylivingbase.getTeam();
Team team1 = entityplayersp.getTeam();
Team team1 = Minecraft.getMinecraft().thePlayer.getTeam();
if (team != null) {
Team.EnumVisible team$enumvisible = team.getNameTagVisibility();
switch (team$enumvisible) {
@ -401,7 +403,10 @@ public abstract class RendererLivingEntity<T extends EntityLivingBase> extends R
}
}
return Minecraft.isGuiEnabled() && entitylivingbase != this.renderManager.livingPlayer && !entitylivingbase.isInvisibleToPlayer(entityplayersp) && entitylivingbase.riddenByEntity == null;
if(Minecraft.isGuiEnabled() && ModManager.selfNametag.isEnabled() && !entitylivingbase.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer))
return true;
return Minecraft.isGuiEnabled() && entitylivingbase != this.renderManager.livingPlayer && !entitylivingbase.isInvisibleToPlayer(Minecraft.getMinecraft().thePlayer) && entitylivingbase.riddenByEntity == null;
}
public void setRenderOutlines(boolean renderOutlinesIn) {

View File

@ -1,11 +1,12 @@
package net.minecraft.client.renderer.entity.layers;
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.model.ModelPlayer;
import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.entity.player.EnumPlayerModelParts;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
/**+
* This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code.
@ -34,9 +35,10 @@ public class LayerCape implements LayerRenderer<AbstractClientPlayer> {
}
public void doRenderLayer(AbstractClientPlayer abstractclientplayer, float var2, float var3, float f, float var5, float var6, float var7, float var8) {
if (abstractclientplayer.hasPlayerInfo() && !abstractclientplayer.isInvisible() && abstractclientplayer.isWearing(EnumPlayerModelParts.CAPE) && abstractclientplayer.getLocationCape() != null && this.playerRenderer.getMainModel() instanceof ModelPlayer) {
if (abstractclientplayer.hasPlayerInfo() && !abstractclientplayer.isInvisible() && this.playerRenderer.getMainModel() instanceof ModelPlayer || abstractclientplayer.getName().equals(Minecraft.getMinecraft().thePlayer.getName())) {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
this.playerRenderer.bindTexture(abstractclientplayer.getLocationCape());
//this.playerRenderer.bindTexture(Cape.getCapeLocation());
this.playerRenderer.bindTexture(new ResourceLocation("eagler:gui/unnamed.png"));
GlStateManager.pushMatrix();
GlStateManager.translate(0.0F, 0.0F, 0.125F);
double d0 = abstractclientplayer.prevChasingPosX + (abstractclientplayer.chasingPosX - abstractclientplayer.prevChasingPosX) * (double) f - (abstractclientplayer.prevPosX + (abstractclientplayer.posX - abstractclientplayer.prevPosX) * (double) f);