Solved Help...Speed Sword Attack and Static GUI

Discussion in 'Plugin Development' started by TheIronKill, Jun 27, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    TheIronKill

    Hello people
    I want to know how to (if possible) to increase speed sword attack.
    When a user steve attacks or mob, the sword hits it and returns to his normal state, this process takes milliseconds, I want to make the attack faster (I do not know how the speed of the attacks work, my explanation may be bad).

    Another thing I want to know if it is possible to create a GUI, not java style, minecraft style, something like the inventory GUI, but that is always present in our screen, like our bar located below in our screen, I always in that location.

    Something like in this video, the little GUI that is on the right(min 3:21):


    That's all, thank you for your attention.
     
  2. Offline

    TrollTaylor

    Haste potion effect maybe?
     
  3. Offline

    TheIronKill

    Yes, good idea. But I dont know how make it...You explain to me, please.
     
  4. Offline

    teej107

  5. Offline

    fireblast709

    TheIronKill sadly enough GUIs like that are impossible to create with Bukkit/vanilla Minecraft. The best you could probably use is scoreboards (for the menu shown in the video).

    Also note that to be able to actually hit entities, you need to lower the nodamage ticks as well
     
  6. Offline

    TheIronKill

    Thanks for yours answers, I'll try with the options you gave me...
     
  7. Offline

    fearless1333

    Last I checked it was impossible to modify attack speed. You can apply potion effects such as Mining Fatigue or Haste, but they are only visual and only apply to block breaking. Even with these effects applied, the speed of damaging mobs is the same, only your arm moves slower or faster.

    Creating a GUI like the one in the video is impossible with only Bukkit. You need your users to download a client-side mod to create custom GUIs like those, but you can make new GUIs that are already in Minecraft such as different sizes chest GUIs.
     
  8. Offline

    Plo124

    fearless1333 TheIronKill
    There is a method for LivingEntity called setNoDamageTicks();
    If you set it to 5 when the EntityDamageByEntityEvent is,
    You could make damaging mobs 1/4 of a second faster.
     
  9. TheIronKill To slow down the rate at which my players could hit mobs in my RPG server, I created a HashMap that holds their UUID and the System.currentTimeMillis() on EntityDamageByEntityEvent. Check if their name is in the Map and if the value + 1000 equals the new System.currentTimeMillis() and cancel the event.
    You could modify the 1 second value I have based on their attack speed.
     
  10. Offline

    TheIronKill

    Thanks for the help, I finished what I wanted.
    Of course, not the same but the result is very good, thanks again.
     
Thread Status:
Not open for further replies.

Share This Page