Fix lever orientation with negative player yaw

This commit is contained in:
Chicken-Bones committed 2014-04-30 00:58:31 +10:00
1 parent 2fc4b8ede0
commit 0f34edba43
1 file changed
+2 -1
@@ -1,5 +1,6 @@
package codechicken.multipart.minecraft;
import codechicken.lib.math.MathHelper;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLever;
import net.minecraft.client.renderer.RenderBlocks;
@@ -82,7 +83,7 @@ public class LeverPart extends McSidedMetaPart implements IFaceRedstonePart
return null;
int meta = sideMetaMap[side^1];
if(side < 2 && ((int)(player.rotationYaw / 90 + 0.5) & 1) == 0)
if(side < 2 && (MathHelper.floor_double(player.rotationYaw / 90 + 0.5) & 1) == 0)
meta = metaSwapMap[side^1];
return new LeverPart(meta);