Disable shadow position changing

This commit is contained in:
Sollace 2023-10-05 19:52:48 +01:00
parent 72ff58015d
commit b1869c824e
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -27,7 +27,6 @@ import net.minecraft.client.render.entity.feature.*;
import net.minecraft.client.util.math.MatrixStack; import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.text.Text; import net.minecraft.text.Text;
import net.minecraft.util.*; import net.minecraft.util.*;
import net.minecraft.util.math.*;
public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRenderContext<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> { public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRenderContext<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>> {
private final Function<Race, Models<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>>> modelsCache; private final Function<Race, Models<AbstractClientPlayerEntity, ClientPonyModel<AbstractClientPlayerEntity>>> modelsCache;
@ -85,6 +84,7 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
// Translate the shadow position after everything is done // Translate the shadow position after everything is done
// (shadows are drawn after us) // (shadows are drawn after us)
/*
if (!entity.hasVehicle() && !entity.isSleeping()) { if (!entity.hasVehicle() && !entity.isSleeping()) {
float yaw = MathHelper.lerpAngleDegrees(tickDelta, entity.prevBodyYaw, entity.bodyYaw); float yaw = MathHelper.lerpAngleDegrees(tickDelta, entity.prevBodyYaw, entity.bodyYaw);
float l = entity.getWidth() / 2 * manager.getScaleFactor(); float l = entity.getWidth() / 2 * manager.getScaleFactor();
@ -93,6 +93,8 @@ public class PlayerPonyRenderer extends PlayerEntityRenderer implements PonyRend
stack.translate(0, 0, -l); stack.translate(0, 0, -l);
stack.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(yaw)); stack.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(yaw));
} }
*/
} }
protected Race getPlayerRace(AbstractClientPlayerEntity entity, Pony pony) { protected Race getPlayerRace(AbstractClientPlayerEntity entity, Pony pony) {