Package com.mtbs3d.minecrift.control

Source Code of com.mtbs3d.minecrift.control.WalkLeftBinding

/**
* Copyright 2013 Mark Browning, StellaArtois
* Licensed under the LGPL 3.0 or later (See LICENSE.md for details)
*/
package com.mtbs3d.minecrift.control;

import net.minecraft.src.EntityClientPlayerMP;
import net.minecraft.src.Minecraft;

public class WalkLeftBinding extends ControlBinding {
  public WalkLeftBinding() {
    super("key.left","key.left");
  }

  @Override
  public void setValue(float value) {
        EntityClientPlayerMP thePlayer = Minecraft.getMinecraft().thePlayer;
        if( thePlayer != null )
          thePlayer.movementInput.baseMoveStrafe = Math.abs(value);
  }

  @Override
  public void setState(boolean state) {
    setValue( state ? Minecraft.getMinecraft().vrSettings.movementSpeedMultiplier: 0.0f );
  }
}
TOP

Related Classes of com.mtbs3d.minecrift.control.WalkLeftBinding

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.