fix interpolation!
All checks were successful
/ Build BaseBand DSM & Broadway (push) Successful in 2m37s
/ Build BaseBand Loader (push) Successful in 1m41s

This commit is contained in:
Daniella / Tove 2024-06-12 16:50:38 +02:00
parent bc3bf1dcab
commit 2cb30a4014
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -337,9 +337,9 @@ public class RenderAdapter {
public static AxisAlignedBB getLiveEntityBB(Entity entity, float partialTicks) { public static AxisAlignedBB getLiveEntityBB(Entity entity, float partialTicks) {
AxisAlignedBB bb = entity.getEntityBoundingBox(); AxisAlignedBB bb = entity.getEntityBoundingBox();
double shiftX = (entity.posX - entity.lastTickPosX) * (double) partialTicks; double shiftX = (entity.prevPosX - entity.posX) * (1d - partialTicks);
double shiftY = (entity.posY - entity.lastTickPosY) * (double) partialTicks; double shiftY = (entity.prevPosY - entity.posY) * (1d - partialTicks);
double shiftZ = (entity.posZ - entity.lastTickPosZ) * (double) partialTicks; double shiftZ = (entity.prevPosZ - entity.posZ) * (1d - partialTicks);
return bb.offset(shiftX, shiftY, shiftZ); return bb.offset(shiftX, shiftY, shiftZ);
} }