From d575eb60433700c2c342c2280540f106c8fd6ad0 Mon Sep 17 00:00:00 2001 From: Vasco Lavos Date: Fri, 14 Oct 2016 19:19:57 +0100 Subject: [PATCH] Fixed the Key of the King's Law producing a bad shape when looking northeast. Closes #1930 --- .../vazkii/botania/common/item/relic/ItemKingKey.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/vazkii/botania/common/item/relic/ItemKingKey.java b/src/main/java/vazkii/botania/common/item/relic/ItemKingKey.java index d2284bfb9..e9116af58 100644 --- a/src/main/java/vazkii/botania/common/item/relic/ItemKingKey.java +++ b/src/main/java/vazkii/botania/common/item/relic/ItemKingKey.java @@ -64,21 +64,21 @@ 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().negate().multiply(2); + Vector3 look = new Vector3(living.getLookVec()).multiply(1, 0, 1).normalize().multiply(-2);; + int div = spawned / 5; int mod = spawned % 5; - Vector3 pl = look.add(Vector3.fromEntityCenter(living)).add(0, living.getEyeHeight(), div * 0.1); + Vector3 pl = look.add(Vector3.fromEntityCenter(living)).add(0, 1.6, div * 0.1); Random rand = living.worldObj.rand; Vector3 axis = look.normalize().crossProduct(new Vector3(-1, 0, -1)).normalize(); - Vector3 axis1 = axis; double rot = mod * Math.PI / 4 - Math.PI / 2; - axis1 = axis1.multiply(div * 3.5 + 5).rotate(rot, look); + Vector3 axis1 = axis.multiply(div * 3.5 + 5).rotate(rot, look); if(axis1.y < 0) - axis1 = axis1.multiply(0, -1, 0); + axis1 = axis1.multiply(1, -1, 1); Vector3 end = pl.add(axis1);