Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I was wondering if it is possible to cancel mouse input in forge by canceling a specific event or an instruction for minecraft to not accept mouse input for steering. Like when you are in a bed or have a GUI open.

 

At this point i'm considering making an invsible gui for the moment just so the mouse is disconnected from steering inputs, but I was wondering if there's a more standard way to accomplish this.

I really would like a standard way that disconnects the mouse but not the keyboard.

 

If you are wondering why I want this. I have delicious grog in my mod and it has some effect on the way your head looks. You kinda swerve all over the place, left right intermittently. So if you walk when drunk you can suddenly swerve sideways.

The problem comes when the player steers against the movement it becomes really jittery and not the smooth swerving you have if you don't steer against it.

How much wood could a woodchuck chuck if a wood chuck could chuck wood - Guybrush Treepwood

 

I wrote my own mod ish... still a few bugs to fix. http://thaumcraft.duckdns.org/downloads/MagicCookies-1.0.6.4.jar

On client? MouseEvent and event.setCanceled()

1.7.10 is no longer supported by forge, you are on your own.

  • Author

Actually that doesnt cancel the event what i've read on a topic from someone who wanted to do stuff with touchscreen.

 

I delved into the GUI class and I found a delicously simple way to cancel out the mouse so it doesn't interfere as much with the steering which makes the drunkeness that more harsh now :D

 

            if(e.getPlayer().worldObj.isRemote) {
				if(Drunk.instance.grabbedCursor) {
					Drunk.instance.grabbedCursor = false;
    				Minecraft.getMinecraft().mouseHelper.grabMouseCursor();
				}
			}

 

Minecraft.getMinecraft().mouseHelper.grabMouseCursor(); Makes the crosshair control the movements allowing the player to do 360 degree turns and such.

 

Minecraft.getMinecraft().mouseHelper.ungrabMouseCursor(); turns control over to the OS, allowing very limited steering by the player.

 

I love it where there is a simple solution.

How much wood could a woodchuck chuck if a wood chuck could chuck wood - Guybrush Treepwood

 

I wrote my own mod ish... still a few bugs to fix. http://thaumcraft.duckdns.org/downloads/MagicCookies-1.0.6.4.jar

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.