1. Want to get our most recent announcements - and XP codes - in your email?

    Sign up for our mailing list!

Other Zebra's ToggleSneak for Minecraft 1.8 - 1.10.2

Discussion in 'The Network' started by blaueszebra, Mar 20, 2016.

Other - Zebra's ToggleSneak for Minecraft 1.8 - 1.10.2 | Page 2
  1. blaueszebra Retired Staff

    XP:
    362,364xp
    Everything is possible, if you can provide a good rationale :cool:
    Tonkotsuramen921 likes this.

  2. Mersid Regular Member

    XP:
    114,574xp
    :/.... i'll miss the old one. Also, it doesn't work with later versions of Forge - it crashes if trying to join a world.
  3. Mersid Regular Member

    XP:
    114,574xp
    Also, how DO I make it just draw as text like the 1.8 version? :stuck_out_tongue:
  4. blaueszebra Retired Staff

    XP:
    362,364xp
    Good point, there was an breaking change in Forge somewhere at release 1820. This is why there is a subrelease for Forge 12.16.0.1865 or later:

    Zebra's ToggleSneak 1.4.2 for Minecraft 1.9 by courtesy of blaueszebra :heart: .
    Tonkotsuramen921 likes this.
  5. Mersid Regular Member

    XP:
    114,574xp
    Is there source code for the latest version?
  6. blaueszebra Retired Staff

    XP:
    362,364xp
    Just read the posts
    you can get the source code of any version:
    Zebras ToggleSneak is published under a GNU GPLv3 license which means you can do what you want with the code as long as you:
    • publish your source code as well
    • don't change the license
    • don't delete the reference to the original author
    You'd best off
    • getting a Github account
    • forking my repo (the button on the upper right)
    • setting up a IDE as described in the README there
    If you want to change the status display, you should look into afterDraw at line 42 in GuiDrawer.java

    Don't forget to send me a pull request if you made a useful code addition :)
  7. Mersid Regular Member

    XP:
    114,574xp
    Does the src change between 1.4.0 and 1.4.1? I tried using a decompiler but a lot of the variables seem to have their names replaced by something I can't read. Obfuscation perhaps?
  8. blaueszebra Retired Staff

    XP:
    362,364xp
    There are minimal changes: Commit 5648eab


    :zWTF: Why? The source is published. Just make it as I wrote in my message above.

    The compiled jar must use the same names as the obfuscated Minecraft client jar. The source code uses the names after MCP deobfuscation.
    Tonkotsuramen921 likes this.
  9. storm345 Retired Staff

    XP:
    632,098xp
    It is incredibly difficult to limit player flight speed with plugins. This is difficult largely because of bugs in vanilla which can cause the server to think the player isn't flying and the client to think they are. That has been the biggest issue with MTA and jetpacks.
    Tonkotsuramen921 likes this.
  10. storm345 Retired Staff

    XP:
    632,098xp
    Also, is the official download for the mod this forum thread? Or is there a website somewhere?
    Tonkotsuramen921 likes this.
  11. Mersid Regular Member

    XP:
    114,574xp
    Add an option to disable double tap W?
  12. blaueszebra Retired Staff

    XP:
    362,364xp
    That's strange. In survival mode, there is only one legal possibility for a client to fly: get a flying capability packet from the server.
    This boils down to the simple fact that if the server thinks the player is not flying, but the client is flying it's a client hack.

    I'd rather think that the server side mod simply forgets to ground the player - usually due to a thread synchronization problem.

    This is the official Zebras ToggleSneak thread. If you use the mod, you'll probably see further guerrilla marketing for Shotbow. :D


    All this would be far more effective if Shotbow would at least upgrade the lobby to 1.9 but I think we'll have to wait until Christmas for this to happen.:zsleeping:
  13. blaueszebra Retired Staff

    XP:
    362,364xp
    Zebra's Toggle Sneak is an officially allowed mod in any of the currently stable releases listed in the first message of this thread. :cool:

    I didn't do anything, but the Shotbow Rules list of allowed mods changed from to

    There is now another interesting fact: Using ToggleSneak-1.7.2.zip or ToggleSneak-( 1.8 )-v3.1.0.jar (the mods linked there before the change)
    as the fly speed can potentially be boosted by a factor of two in competitive games using these mods.
    Tonkotsuramen921 likes this.
  14. storm345 Retired Staff

    XP:
    632,098xp
    I'm not sure why the client does it, but it's fairly simple to reproduce the fly-toggle-desync issue I mentioned. Even with an unmodded server you can do it. It's probably a race condition mojang never handled idk.
    Tonkotsuramen921 likes this.
  15. blaueszebra Retired Staff

    XP:
    362,364xp
    How do you reproduce it? dropping the jetpack in flight doesn't work.

    But only in creative mode, you can't fly at all in survival.

    I'm rather suspecting this sloppy conditional in the patch between Vanilla Minecraft PlayerConnection
    Code:
        public void a(PacketPlayInAbilities packetplayinabilities) {
            PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.x());
            this.player.abilities.isFlying = packetplayinabilities.isFlying() && this.player.abilities.canFly;
        }
    and CraftBukkit PlayerConnection
    Code:
        public void a(PacketPlayInAbilities packetplayinabilities) {
            PlayerConnectionUtils.ensureMainThread(packetplayinabilities, this, this.player.x());
            // CraftBukkit start
            if (this.player.abilities.canFly && this.player.abilities.isFlying != packetplayinabilities.isFlying()) {
                PlayerToggleFlightEvent event = new PlayerToggleFlightEvent(this.server.getPlayer(this.player), packetplayinabilities.isFlying());
                this.server.getPluginManager().callEvent(event);
                if (!event.isCancelled()) {
                    this.player.abilities.isFlying = packetplayinabilities.isFlying(); // Actually set the player's flying status
                } else {
                    this.player.updateAbilities(); // Tell the player their ability was reverted
                }
            }
            // CraftBukkit end
        }
    If the player can't fly, he will be left flying even if he's grounded on the client o_O

    I can send a correcing pull request upstream, but I need to know how you reproduce the fly-toggle-desync so I can test the effectiveness of my PR.
    Tonkotsuramen921 likes this.
  16. blaueszebra Retired Staff

    XP:
    362,364xp
    Zebra's ToggleSneak is now available for Minecraft up to version 1.9.4

    The recommended release for Minecraft versions 1.8 - 1.9.4 is now 1.4.4
    Following Minecraft forge features have been implemented:
    • Deactivate the mod via mod menu
    • Mod update hint
    • Forge version bumped to recommended
    Please upgrade now, versions before 1.4.4 aren't supported anymore. Refer to the first post of this thread for download and further information.

    Just to bumping this
    :D - my PR to fix the issue in upstream is ready, I need some way to test it.
    Tonkotsuramen921 and gunso515 like this.
  17. blaueszebra Retired Staff

    XP:
    362,364xp
    Great news for all the people who nagged me to have the same text only display as Toggle Sneak by HCFactions.:

    The last release for Minecraft versions 1.8 - 1.9.4 is now 1.4.5
    Following new features have been implemented:
    • optional text only display as in ToggleSneak by HCFactions.
    • auto cleanup between different config file versions.
    Test it and come back with your observations as I'm rather using the color coded HUD.

    This revision will not trigger a upgrade warning as there are some intended additions:
    • Add the possibility to configure the display colours
    • Words displayed for "sneak" and "sprint" can be individually changed
    Refer to the first post of this thread for download and further information.
  18. Scuzz Regular Member

    XP:
    100xp
    OMG THANKS SO MUCH :D
    Joey_nINJJa likes this.
  19. gunso_ Retired Staff

    XP:
    681,846xp
    Hi Zebra, any plans for a 1.10.2 version?
    As always, thanks so much for providing this mod to the community! :)
    Tonkotsuramen921 and Joey_nINJJa like this.
  20. blaueszebra Retired Staff

    XP:
    362,364xp

Share This Page