Fix falling perpetually with Freeze mode, fixes
This commit is contained in:
parent
a4c3a28028
commit
6ead1e1d3d
3 changed files with 5 additions and 9 deletions
|
@ -148,7 +148,7 @@ public class BattleMusic
|
||||||
|
|
||||||
public void playBattle(float volume)
|
public void playBattle(float volume)
|
||||||
{
|
{
|
||||||
if(!initialized || volume <= 0.0f)
|
if(!initialized || volume <= 0.0f || battleMusic.isEmpty())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ public class BattleMusic
|
||||||
|
|
||||||
public void playSilly(float volume)
|
public void playSilly(float volume)
|
||||||
{
|
{
|
||||||
if(!initialized || volume <= 0.0f)
|
if(!initialized || volume <= 0.0f || sillyMusic.isEmpty())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,6 @@ public class Battle
|
||||||
if(TurnBasedMinecraftMod.config.isFreezeCombatantsEnabled())
|
if(TurnBasedMinecraftMod.config.isFreezeCombatantsEnabled())
|
||||||
{
|
{
|
||||||
newCombatant.x = e.posX;
|
newCombatant.x = e.posX;
|
||||||
newCombatant.y = e.posY;
|
|
||||||
newCombatant.z = e.posZ;
|
newCombatant.z = e.posZ;
|
||||||
newCombatant.yaw = e.rotationYaw;
|
newCombatant.yaw = e.rotationYaw;
|
||||||
newCombatant.pitch = e.rotationPitch;
|
newCombatant.pitch = e.rotationPitch;
|
||||||
|
@ -176,7 +175,6 @@ public class Battle
|
||||||
if(TurnBasedMinecraftMod.config.isFreezeCombatantsEnabled())
|
if(TurnBasedMinecraftMod.config.isFreezeCombatantsEnabled())
|
||||||
{
|
{
|
||||||
newCombatant.x = e.posX;
|
newCombatant.x = e.posX;
|
||||||
newCombatant.y = e.posY;
|
|
||||||
newCombatant.z = e.posZ;
|
newCombatant.z = e.posZ;
|
||||||
newCombatant.yaw = e.rotationYaw;
|
newCombatant.yaw = e.rotationYaw;
|
||||||
newCombatant.pitch = e.rotationPitch;
|
newCombatant.pitch = e.rotationPitch;
|
||||||
|
@ -270,7 +268,6 @@ public class Battle
|
||||||
if(TurnBasedMinecraftMod.config.isFreezeCombatantsEnabled())
|
if(TurnBasedMinecraftMod.config.isFreezeCombatantsEnabled())
|
||||||
{
|
{
|
||||||
newCombatant.x = e.posX;
|
newCombatant.x = e.posX;
|
||||||
newCombatant.y = e.posY;
|
|
||||||
newCombatant.z = e.posZ;
|
newCombatant.z = e.posZ;
|
||||||
newCombatant.yaw = e.rotationYaw;
|
newCombatant.yaw = e.rotationYaw;
|
||||||
newCombatant.pitch = e.rotationPitch;
|
newCombatant.pitch = e.rotationPitch;
|
||||||
|
@ -310,7 +307,6 @@ public class Battle
|
||||||
if(TurnBasedMinecraftMod.config.isFreezeCombatantsEnabled())
|
if(TurnBasedMinecraftMod.config.isFreezeCombatantsEnabled())
|
||||||
{
|
{
|
||||||
newCombatant.x = e.posX;
|
newCombatant.x = e.posX;
|
||||||
newCombatant.y = e.posY;
|
|
||||||
newCombatant.z = e.posZ;
|
newCombatant.z = e.posZ;
|
||||||
newCombatant.yaw = e.rotationYaw;
|
newCombatant.yaw = e.rotationYaw;
|
||||||
newCombatant.pitch = e.rotationPitch;
|
newCombatant.pitch = e.rotationPitch;
|
||||||
|
@ -574,11 +570,11 @@ public class Battle
|
||||||
{
|
{
|
||||||
for(Combatant c : sideA.values())
|
for(Combatant c : sideA.values())
|
||||||
{
|
{
|
||||||
c.entity.setPositionAndRotation(c.x, c.y, c.z, c.yaw, c.pitch);
|
c.entity.setPositionAndRotation(c.x, c.entity.posY, c.z, c.yaw, c.pitch);
|
||||||
}
|
}
|
||||||
for(Combatant c : sideB.values())
|
for(Combatant c : sideB.values())
|
||||||
{
|
{
|
||||||
c.entity.setPositionAndRotation(c.x, c.y, c.z, c.yaw, c.pitch);
|
c.entity.setPositionAndRotation(c.x, c.entity.posY, c.z, c.yaw, c.pitch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class Combatant
|
||||||
public int remainingDefenses;
|
public int remainingDefenses;
|
||||||
public int battleID;
|
public int battleID;
|
||||||
public double x;
|
public double x;
|
||||||
public double y;
|
//public double y; // y is ignored to prevent perpetual fall damage when FreezeBattleCombatants is enabled
|
||||||
public double z;
|
public double z;
|
||||||
public float yaw;
|
public float yaw;
|
||||||
public float pitch;
|
public float pitch;
|
||||||
|
|
Loading…
Reference in a new issue