use of am2.playerextensions.ExtendedProperties in project ArsMagica2 by Mithion.
the class AMGuiHelper method shiftView.
public static void shiftView(float f) {
EntityPlayer entity = Minecraft.getMinecraft().thePlayer;
int viewSet = Minecraft.getMinecraft().gameSettings.thirdPersonView;
if (viewSet == 0) {
ExtendedProperties exProps = ExtendedProperties.For(entity);
if (exProps.getShrinkPct() > 0f) {
float amt = exProps.getPrevShrinkPct() + (exProps.getShrinkPct() - exProps.getPrevShrinkPct()) * f;
GL11.glTranslatef(0, 1 * amt, 0);
}
}
float flip = ExtendedProperties.For(entity).getFlipRotation();
float prevFlip = ExtendedProperties.For(entity).getPrevFlipRotation();
if (flip > 0) {
float smoothedFlip = prevFlip + ((flip - prevFlip) * f);
GL11.glTranslatef(0, (entity.height * (smoothedFlip / 180f)) - 0.1f, 0);
}
}
Aggregations