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:
commit
b98e15b25b
@ -13,7 +13,7 @@ loader_version=0.15.11
|
||||
fabric_version=0.100.1+1.21
|
||||
|
||||
# Mod Properties
|
||||
mod_version = v7.43-MC1.21
|
||||
mod_version = v7.43.1-MC1.21
|
||||
maven_group = net.wurstclient
|
||||
archives_base_name = Wurst-Client
|
||||
|
||||
|
@ -58,7 +58,7 @@ public enum WurstClient
|
||||
public static MinecraftClient MC;
|
||||
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";
|
||||
|
||||
private WurstAnalytics analytics;
|
||||
|
@ -22,8 +22,10 @@ import net.minecraft.client.render.entity.EntityRenderDispatcher;
|
||||
import net.minecraft.client.render.entity.EntityRenderer;
|
||||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAttachmentType;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.wurstclient.WurstClient;
|
||||
import net.wurstclient.hacks.NameTagsHack;
|
||||
|
||||
@ -67,14 +69,19 @@ public abstract class EntityRendererMixin<T extends Entity>
|
||||
if(distanceSq > 4096 && !nameTags.isUnlimitedRange())
|
||||
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
|
||||
boolean notSneaky = !entity.isSneaky() || nameTags.isEnabled();
|
||||
|
||||
float matrixY = entity.getHeight() + 0.5F;
|
||||
int labelY = "deadmau5".equals(text.getString()) ? -10 : 0;
|
||||
|
||||
matrices.push();
|
||||
matrices.translate(0, matrixY, 0);
|
||||
matrices.translate(attVec.x, attVec.y + 0.5, attVec.z);
|
||||
matrices.multiply(dispatcher.getRotation());
|
||||
|
||||
// adjust scale if NameTags is enabled
|
||||
@ -85,7 +92,7 @@ public abstract class EntityRendererMixin<T extends Entity>
|
||||
if(distance > 10)
|
||||
scale *= distance / 10;
|
||||
}
|
||||
matrices.scale(-scale, -scale, scale);
|
||||
matrices.scale(scale, -scale, scale);
|
||||
|
||||
Matrix4f matrix = matrices.peek().getPositionMatrix();
|
||||
float bgOpacity =
|
||||
|
Loading…
Reference in New Issue
Block a user