Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import meteordevelopment.meteorclient.utils.player.Rotations;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.world.InteractionHand;
import org.joml.Matrix4f;
import org.joml.Vector3d;

public class HandView extends Module {
Expand Down Expand Up @@ -179,8 +178,6 @@ public class HandView extends Module {
.build()
);

private final Matrix4f matrix4f = new Matrix4f();

public HandView() {
super(Categories.Render, "hand-view", "Alters the way items are rendered in your hands.");
}
Expand Down Expand Up @@ -210,9 +207,9 @@ private void onRenderArm(ArmRenderEvent event) {
}

private void rotate(PoseStack matrix, Vector3d rotation) {
matrix.mulPose(Axis.XP.rotateDegrees(this.matrix4f, (float) rotation.x));
matrix.mulPose(Axis.YP.rotateDegrees(this.matrix4f, (float) rotation.y));
matrix.mulPose(Axis.ZP.rotateDegrees(this.matrix4f, (float) rotation.z));
matrix.rotateDegrees(Axis.XP, (float) rotation.x);
matrix.rotateDegrees(Axis.YP, (float) rotation.y);
matrix.rotateDegrees(Axis.ZP, (float) rotation.z);
}

private void scale(PoseStack matrix, Vector3d scale) {
Expand All @@ -224,8 +221,8 @@ private void translate(PoseStack matrix, Vector3d translation) {
}

private void applyServerRotations(PoseStack matrix) {
matrix.mulPose(Axis.XP.rotateDegrees(this.matrix4f, mc.player.getXRot() - Rotations.serverPitch));
matrix.mulPose(Axis.YP.rotateDegrees(this.matrix4f, mc.player.getYRot() - Rotations.serverYaw));
matrix.rotateDegrees(Axis.XP, mc.player.getXRot() - Rotations.serverPitch);
matrix.rotateDegrees(Axis.YP, mc.player.getYRot() - Rotations.serverYaw);
}

public boolean oldAnimations() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import net.minecraft.client.resources.model.geometry.BakedQuad;
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.item.ItemEntity;
import org.joml.Matrix4f;
import org.joml.Vector3f;
import org.joml.Vector3fc;

Expand All @@ -44,8 +43,6 @@ public class ItemPhysics extends Module {
private final RandomSource random = RandomSource.createThreadLocalInstance();
private boolean skipTransformation;

private final Matrix4f matrix4f = new Matrix4f();

public ItemPhysics() {
super(Categories.Render, "item-physics", "Applies physics to items on the ground.");
}
Expand All @@ -71,7 +68,7 @@ private void onRenderItemEntity(RenderItemEntityEvent event) {
offsetInWater(matrices, event.itemEntity);

if (info.flat) {
matrices.mulPose(Axis.XP.rotateDegrees(matrix4f, 90));
matrices.rotateDegrees(Axis.XP, 90);
matrices.translate(0, 0, info.offsetZ);
}

Expand All @@ -90,7 +87,7 @@ private void onRenderItemEntity(RenderItemEntityEvent event) {
float degrees = (random.nextFloat() * 2 - 1) * 90;

matrices.translate(x, y, z);
matrices.mulPose(axis.rotateDegrees(matrix4f, degrees));
matrices.rotateDegrees(axis, degrees);
matrices.translate(-x, -y, -z);
}

Expand Down
Loading