Fix particle alignment during default rendering by not using ActiveRenderInfo but instead calculating it ourselves
This commit is contained in:
@@ -298,11 +298,16 @@ public abstract class CustomEntityRenderer {
|
|||||||
Tessellator tessellator = Tessellator.getInstance();
|
Tessellator tessellator = Tessellator.getInstance();
|
||||||
WorldRenderer worldRenderer = tessellator.getWorldRenderer();
|
WorldRenderer worldRenderer = tessellator.getWorldRenderer();
|
||||||
|
|
||||||
float rotX = ActiveRenderInfo.getRotationX();
|
double yaw = Math.toRadians(entity.rotationYaw);
|
||||||
float rotZ = ActiveRenderInfo.getRotationZ();
|
double pitch = Math.toRadians(entity.rotationPitch);
|
||||||
float rotYZ = ActiveRenderInfo.getRotationYZ();
|
|
||||||
float rotXY = ActiveRenderInfo.getRotationXY();
|
float rotX = (float) Math.cos(yaw);
|
||||||
float rotXZ = ActiveRenderInfo.getRotationXZ();
|
float rotZ = (float) Math.sin(yaw);
|
||||||
|
float rotXZ = (float) Math.cos(pitch);
|
||||||
|
|
||||||
|
float rotYZ = (float) (-rotZ * Math.sin(pitch));
|
||||||
|
float rotXY = (float) (rotX * Math.sin(pitch));
|
||||||
|
|
||||||
EntityFX.interpPosX = entity.posX;
|
EntityFX.interpPosX = entity.posX;
|
||||||
EntityFX.interpPosY = entity.posY;
|
EntityFX.interpPosY = entity.posY;
|
||||||
EntityFX.interpPosZ = entity.posZ;
|
EntityFX.interpPosZ = entity.posZ;
|
||||||
|
|||||||
Reference in New Issue
Block a user