Fixed the Key of the King's Law stacking portals together if the player is looking straight down. Closes #2122

This commit is contained in:
Vasco Lavos committed 2017-01-21 16:53:09 +00:00
1 parent 86bdfaa186
commit f67e6f8209
1 file changed
+8 -2
@@ -64,8 +64,14 @@ public class ItemKingKey extends ItemRelic implements IManaUsingItem {
int spawned = getWeaponsSpawned(stack);
if(count != getMaxItemUseDuration(stack) && spawned < 20 && !living.worldObj.isRemote && (!(living instanceof EntityPlayer) || ManaItemHandler.requestManaExact(stack, (EntityPlayer) living, 150, true))) {
Vector3 look = new Vector3(living.getLookVec()).multiply(1, 0, 1).normalize().multiply(-2);;
Vector3 look = new Vector3(living.getLookVec()).multiply(1, 0, 1);
double playerRot = Math.toRadians(living.rotationYaw + 90);
if(look.x == 0 && look.z == 0)
look = new Vector3(Math.cos(playerRot), 0, Math.sin(playerRot));
look = look.normalize().multiply(-2);
int div = spawned / 5;
int mod = spawned % 5;