本文整理汇总了Java中net.minecraft.util.MouseHelper类的典型用法代码示例。如果您正苦于以下问题:Java MouseHelper类的具体用法?Java MouseHelper怎么用?Java MouseHelper使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MouseHelper类属于net.minecraft.util包,在下文中一共展示了MouseHelper类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deactivate
import net.minecraft.util.MouseHelper; //导入依赖的package包/类
public void deactivate() {
this.active = false;
GuiScreen gs = Minecraft.getMinecraft().currentScreen;
if (gs != null) {
LabelButtonInfo.remove(gs);
if (gs instanceof GuiMainMenu) {
Minecraft.getMinecraft().displayGuiScreen(new GuiMainMenu());
}
}
if(Minecraft.getMinecraft().player != null) {
Minecraft.getMinecraft().player.movementInput = new MovementInputFromOptions(Minecraft.getMinecraft().gameSettings);
}
Minecraft.getMinecraft().mouseHelper = new MouseHelper();
Minecraft.getMinecraft().gameSettings.realmsNotifications = true;
}
示例2: mouseXYChange
import net.minecraft.util.MouseHelper; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
@Hook(value = "net.minecraft.util.MouseHelper#func_74374_c", disable = "index.alchemy.asm.hook.disable_mouse_hook")
public static final Hook.Result mouseXYChange(MouseHelper helper) {
if (isHookInput()) {
Mouse.getDX();
Mouse.getDY();
return Hook.Result.NULL;
} else
return Hook.Result.VOID;
}
示例3: tiltScreen
import net.minecraft.util.MouseHelper; //导入依赖的package包/类
/**
* this tilts the screen and makes you slow down(not yet)
*/
private void tiltScreen() {
MouseHelper mouse = Minecraft.getMinecraft().mouseHelper;
EntityRenderer renderer = Minecraft.getMinecraft().entityRenderer;
prevDeltaX = mouse.deltaX;
// if (mouseMoveCounter == 1) {
// renderer.camRoll = (float) (mouseMovement + renderer.prevCamRoll) / 2;
// }
// mouseMovement = (float) ((prevDeltaX + mouse.deltaX) / mouseMovementModifyer);
// renderer.camRoll = (mouseMovement+ prevDeltaX)/2;
// System.out.println(mouse.deltaX);
// if(renderer.camRoll<mouse.deltaX)
// renderer.camRoll = (float) smooth(mouse.deltaX,.5F);
// if((mouse.deltaX < 10) && renderer.camRoll != 0)
// renderer.camRoll -= 1;
// if((-10 < mouse.deltaX) && renderer.camRoll != 0)
// renderer.camRoll += 10;
// mouseMoveCounter = 0;
// }
// mouseMoveCounter++;
// mouseMovement = (float) ((prevDeltaX + mouse.deltaX) / mouseMovementModifyer);
/*if(mouse.deltaX>-1 || mouse.deltaX < 1) slowFromRotation = true; else slowFromRotation = false; */
}
示例4: tiltScreen
import net.minecraft.util.MouseHelper; //导入依赖的package包/类
@SideOnly(Side.CLIENT)
/**
* this tilts the screen and makes you slow down(not yet)
*/
private void tiltScreen() {
MouseHelper mouse = mc.mouseHelper;
EntityRenderer renderer = mc.entityRenderer;
// if (mouseMoveCounter == 5) {
// TODO CAMROLL-renderer.camRoll = (float) (mouseMovement + renderer.prevCamRoll) / 2;
mouseMoveCounter = 0;
// }
mouseMoveCounter++;
mouseMovement = (mouseMovement + mouse.deltaX) / mouseMovementModifyer;
if (mouse.deltaX > -1 || mouse.deltaX < 1) slowFromRotation = true;
else slowFromRotation = false;
/* MouseHelper mouse = mc.mouseHelper;
* EntityRenderer renderer = mc.entityRenderer;
* prevDeltaX = mouse.deltaX;
* if (mouseMoveCounter == 1) {
* renderer.camRoll = (float) (mouseMovement) / 2;
* mouseMoveCounter = 0;
* }
* mouseMovement = (float) ((mouse.deltaX + mouseMovementModifyer) / mouseMovementModifyer);
* //renderer.camRoll = (mouseMovement) / 2;
* // System.out.println(mouse.deltaX);
* // if(renderer.camRoll<mouse.deltaX)
* // renderer.camRoll = (float) smooth(mouse.deltaX,.5F);
* // if((mouse.deltaX < 10) && renderer.camRoll != 0)
* // renderer.camRoll -= 1;
* // if((-10 < mouse.deltaX) && renderer.camRoll != 0)
* // renderer.camRoll += 10;
* // mouseMoveCounter = 0;
* // }
* mouseMoveCounter++;
* // mouseMovement = (float) ((prevDeltaX + mouse.deltaX) / mouseMovementModifyer);
* /* if(mouse.deltaX>-1 || mouse.deltaX < 1) slowFromRotation = true; else slowFromRotation = false; */
}