Fixed portal animation
This commit is contained in:
parent
d22f536830
commit
9567fddfee
2 changed files with 42 additions and 1 deletions
|
@ -50,7 +50,7 @@ public class GuiAetherInGame extends Gui {
|
|||
AetherOverlay.renderBossHP(this.mc);
|
||||
}
|
||||
|
||||
float portalTime = this.mc.thePlayer.prevTimeInPortal + (this.mc.thePlayer.timeInPortal - this.mc.thePlayer.prevTimeInPortal) * event.partialTicks;//player.portalAnimTime * 1.2F + (player.prevPortalAnimTime - player.portalAnimTime);
|
||||
float portalTime = player.prevTimeInPortal + (player.timeInPortal - player.prevTimeInPortal) * event.partialTicks;
|
||||
|
||||
if (portalTime > 0.0F) {
|
||||
AetherOverlay.renderAetherPortal(portalTime, new ScaledResolution(this.mc, this.mc.displayWidth, this.mc.displayHeight));
|
||||
|
|
|
@ -13,6 +13,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Direction;
|
||||
|
@ -77,6 +78,10 @@ public class PlayerAether implements IPlayerAether {
|
|||
|
||||
public float wingSinage;
|
||||
|
||||
public float timeInPortal;
|
||||
|
||||
public float prevTimeInPortal;
|
||||
|
||||
public PlayerAether() {
|
||||
this.abilities.addAll(Arrays.<IAetherAbility>asList(new AbilityAccessories(this), new AbilityArmor(this), new AbilityFlight(this), new AbilityRepulsion(this)));
|
||||
}
|
||||
|
@ -184,6 +189,42 @@ public class PlayerAether implements IPlayerAether {
|
|||
|
||||
((EntityPlayerMP) this.getEntity()).theItemInWorldManager.setBlockReachDistance(distance);
|
||||
}
|
||||
else {
|
||||
this.prevTimeInPortal = this.timeInPortal;
|
||||
|
||||
if (this.inPortal)
|
||||
{
|
||||
this.timeInPortal += 0.0125F;
|
||||
|
||||
if (this.timeInPortal >= 1.0F)
|
||||
{
|
||||
this.timeInPortal = 1.0F;
|
||||
}
|
||||
|
||||
this.inPortal = false;
|
||||
}
|
||||
else if (this.getEntity().isPotionActive(Potion.confusion) && this.getEntity().getActivePotionEffect(Potion.confusion).getDuration() > 60)
|
||||
{
|
||||
this.timeInPortal += 0.006666667F;
|
||||
|
||||
if (this.timeInPortal > 1.0F)
|
||||
{
|
||||
this.timeInPortal = 1.0F;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.timeInPortal > 0.0F)
|
||||
{
|
||||
this.timeInPortal -= 0.05F;
|
||||
}
|
||||
|
||||
if (this.timeInPortal < 0.0F)
|
||||
{
|
||||
this.timeInPortal = 0.0F;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue