added placementRotationFix mixins

This commit is contained in:
DeadlyMC committed 2019-06-01 21:07:58 +05:30
1 parent 4ec6e0e03e
commit db091d68d7
5 files changed
+57 -1

No files matched your search

@@ -0,0 +1,22 @@
package carpet.mixins;
import carpet.utils.IEntity;
import net.minecraft.entity.Entity;
import net.minecraft.util.math.MathHelper;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@Mixin(Entity.class)
public abstract class EntityMixin implements IEntity
{
@Shadow
public float yaw;
@Shadow
public float prevYaw;
public float getMainYaw(float partialTicks)
{
return partialTicks == 1.0F ? this.yaw : MathHelper.lerp(partialTicks, this.prevYaw, this.yaw);
}
}