Fix some particle weirdness (somehow the interp pos is wrong by the time it gets to fx layer 3)

This commit is contained in:
Electroblob77
2020-06-18 17:42:16 +01:00
parent 3bc2ff2853
commit 7afcdce21e
4 changed files with 24 additions and 0 deletions
@@ -78,6 +78,12 @@ public abstract class ParticleTargeted extends ParticleWizardry {
// Copied from ParticleWizardry, needs to be here since we're not calling super
updateEntityLinking(partialTicks);
// I don't know why, but despite not being in any superclass renderParticle these also need to be here if we're
// not calling super
interpPosX = viewer.lastTickPosX + (viewer.posX - viewer.lastTickPosX) * (double)partialTicks;
interpPosY = viewer.lastTickPosY + (viewer.posY - viewer.lastTickPosY) * (double)partialTicks;
interpPosZ = viewer.lastTickPosZ + (viewer.posZ - viewer.lastTickPosZ) * (double)partialTicks;
float x = (float)(this.prevPosX + (this.posX - this.prevPosX) * (double)partialTicks);
float y = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)partialTicks);
float z = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)partialTicks);