当前位置: 首页>>代码示例>>Java>>正文


Java MouseHelper类代码示例

本文整理汇总了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;
}
 
开发者ID:thilokru,项目名称:Controller-Support,代码行数:16,代码来源:ModEventHandler.java

示例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;
}
 
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:11,代码来源:AlchemyEventSystem.java

示例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; */
}
 
开发者ID:mookie1097,项目名称:NausicaaMod,代码行数:32,代码来源:BasicGlider.java

示例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; */
}
 
开发者ID:mookie1097,项目名称:NausicaaMod,代码行数:40,代码来源:UnpoweredGlider.java


注:本文中的net.minecraft.util.MouseHelper类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。