0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-20 01:12:13 +02:00

Merge branch 'master' into v7.44

This commit is contained in:
Alexander01998 2024-06-16 17:43:33 +02:00
commit b98e15b25b
3 changed files with 12 additions and 5 deletions

View File

@ -13,7 +13,7 @@ loader_version=0.15.11
fabric_version=0.100.1+1.21 fabric_version=0.100.1+1.21
# Mod Properties # Mod Properties
mod_version = v7.43-MC1.21 mod_version = v7.43.1-MC1.21
maven_group = net.wurstclient maven_group = net.wurstclient
archives_base_name = Wurst-Client archives_base_name = Wurst-Client

View File

@ -58,7 +58,7 @@ public enum WurstClient
public static MinecraftClient MC; public static MinecraftClient MC;
public static IMinecraftClient IMC; public static IMinecraftClient IMC;
public static final String VERSION = "7.43"; public static final String VERSION = "7.43.1";
public static final String MC_VERSION = "1.21"; public static final String MC_VERSION = "1.21";
private WurstAnalytics analytics; private WurstAnalytics analytics;

View File

@ -22,8 +22,10 @@ import net.minecraft.client.render.entity.EntityRenderDispatcher;
import net.minecraft.client.render.entity.EntityRenderer; import net.minecraft.client.render.entity.EntityRenderer;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityAttachmentType;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import net.minecraft.util.math.Vec3d;
import net.wurstclient.WurstClient; import net.wurstclient.WurstClient;
import net.wurstclient.hacks.NameTagsHack; import net.wurstclient.hacks.NameTagsHack;
@ -67,14 +69,19 @@ public abstract class EntityRendererMixin<T extends Entity>
if(distanceSq > 4096 && !nameTags.isUnlimitedRange()) if(distanceSq > 4096 && !nameTags.isUnlimitedRange())
return; return;
// get attachment point
Vec3d attVec = entity.getAttachments().getPointNullable(
EntityAttachmentType.NAME_TAG, 0, entity.getYaw(tickDelta));
if(attVec == null)
return;
// disable sneaking changes if NameTags is enabled // disable sneaking changes if NameTags is enabled
boolean notSneaky = !entity.isSneaky() || nameTags.isEnabled(); boolean notSneaky = !entity.isSneaky() || nameTags.isEnabled();
float matrixY = entity.getHeight() + 0.5F;
int labelY = "deadmau5".equals(text.getString()) ? -10 : 0; int labelY = "deadmau5".equals(text.getString()) ? -10 : 0;
matrices.push(); matrices.push();
matrices.translate(0, matrixY, 0); matrices.translate(attVec.x, attVec.y + 0.5, attVec.z);
matrices.multiply(dispatcher.getRotation()); matrices.multiply(dispatcher.getRotation());
// adjust scale if NameTags is enabled // adjust scale if NameTags is enabled
@ -85,7 +92,7 @@ public abstract class EntityRendererMixin<T extends Entity>
if(distance > 10) if(distance > 10)
scale *= distance / 10; scale *= distance / 10;
} }
matrices.scale(-scale, -scale, scale); matrices.scale(scale, -scale, scale);
Matrix4f matrix = matrices.peek().getPositionMatrix(); Matrix4f matrix = matrices.peek().getPositionMatrix();
float bgOpacity = float bgOpacity =