mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-13 17:04:25 +00:00
Fix lever orientation with negative player yaw
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user