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.

maikyy

Members
  • Joined

  • Last visited

Everything posted by maikyy

  1. Thanks, that makes sense now you say that. well ,Time to go and learn how to deal with packets
  2. So you mean where I have: @SubscribeEvent public void OnKeyInput(KeyInputEvent event) { if(!FMLClientHandler.instance().isGUIOpen(GuiChat.class)) { if(Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed()) { if(PlayerHandler.isJumping && !PlayerHandler.isDoubleJumping && PlayerHandler.canDoubleJump) { Minecraft.getMinecraft().thePlayer.setVelocity(0.0F, 0.5F, 0.0F); Minecraft.getMinecraft().thePlayer.fallDistance = 0.0F; PlayerHandler.isDoubleJumping = true; } } } } because if I check for anything to do with the player here It crashes as soon as I jump again. That is basicly how I started it out, at first I had something like this in here: public static boolean isDoubleJumping; EntityPlayer EntityPlayer; EntityPlayer player = EntityPlayer; if(player.onground) { isDoubleJumping = false; } @SubscribeEvent public void OnKeyInput(KeyInputEvent event) { if(!FMLClientHandler.instance().isGUIOpen(GuiChat.class)) { if(Minecraft.getMinecraft().gameSettings.keyBindJump.isPressed()) { if(!player.onground && !isDoubleJumping) { player.setVelocity(0.0F, 0.5F, 0.0F); player.fallDistance = 0.0F; isDoubleJumping = true; } } } } But that just kept throwing errors at me so that's why I do it the other way now because that seemed to kind of work
  3. So when working on my mod I suddenly had the brilliant idea of adding a double jump. so after some work I finally got it in but there is one little problem, i want to reset my fall height as soon as you jump for the second time, now the problem comes in that i don't really know where to exactly call the 'player.falldistance' to start off here is what i got right now. PlayerHandler.class http://pastebin.com/nPr9Lz5D (Don't worry about the 'EntityPlayer player = (EntityPlayer) event.entity;' I already removed it) KeyHandler.class http://pastebin.com/RqXK7PwA And I have these two lines in my main mod class under the init MinecraftForge.EVENT_BUS.register(new PlayerHandler()); FMLCommonHandler.instance().bus().register(new KeyHandler()); And another quick note, right now when I jump the jumpheight is dependend on when I jump if that makes any sense. so when I jump for the first time and Immediatly jump again I can jump 3 blocks high, but when I jump and wait a little I can't even jump 1 block high with my second jump. so there must be something i did horribly wrong obviously needed to SET velocity and not ADD velocity Edit: Oh lol I just found out that I really did mess something up because my minecraft client was running in the background and as soon as another entity jumps my game crashes

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.