Arrow Damage Build 1060

Discussion in 'Plugin Development' started by phrstbrn, Aug 31, 2011.

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

    phrstbrn

    Has anybody else noticed Arrow Damage is broken in 1060?

    It's been 2 weeks, and I just noticed today that in 1060, arrows do 1 heart of damage (to players, at least). I haven't checked against mobs, but I assume it's broken.

    If I downgrade to 1000 Arrows do 2 hearts of damage.

    Interestingly enough, the API says I'm doing 4 point of damage (2 hearts), while in game I'm only losing 1 heart...

    PHP:
    package me.zford.damagetest;

    import org.bukkit.entity.Arrow;
    import org.bukkit.entity.Entity;
    import org.bukkit.entity.Player;
    import org.bukkit.event.Event;
    import org.bukkit.event.entity.EntityDamageByEntityEvent;
    import org.bukkit.event.entity.EntityDamageEvent;
    import org.bukkit.event.entity.EntityListener;
    import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;

    public class 
    DamageTestPlugin extends JavaPlugin {

        
    LFDEntityListener entityListener;

        public 
    DamageTestPlugin() {
            
    this.entityListener = new LFDEntityListener(this);
        }

        @
    Override
        
    public void onEnable() {
            
    PluginManager pm this.getServer().getPluginManager();
            
    pm.registerEvent(Event.Type.ENTITY_DAMAGEthis.entityListenerEvent.Priority.Normalthis);
        }

        private class 
    LFDEntityListener extends EntityListener {
            public 
    LFDEntityListener(DamageTestPlugin plugin) {
            }

            @
    Override
            
    public void onEntityDamage(EntityDamageEvent event) {
                if(
    event instanceof EntityDamageByEntityEvent) {
                    
    EntityDamageByEntityEvent e = (EntityDamageByEntityEvent)event;
                    if(
    e.getDamager() instanceof Arrow) {
                        
    Arrow arrow = (Arrow)e.getDamager();
                        
    Entity entity event.getEntity();
                        
    int damage event.getDamage();
                        if(
    arrow.getShooter() instanceof Player) {
                            
    System.out.println("Player Damage: "+damage+" Victim: "+entity.getClass().getSimpleName());
                        } else {
                            
    System.out.println("Other Damage: "+damage+" Victim: "+entity.getClass().getSimpleName());
                        }
                    }
                }
            }
        }

        @
    Override
        
    public void onDisable() {
            
    // TODO Auto-generated method stub

        
    }
    }
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  2. Offline

    The_Tree_Maker

    Do you have Armor on?
     
  3. Offline

    phrstbrn

    Nope.
     
  4. Any arrow plugins?
     
  5. Offline

    The_Tree_Maker

    Code:
    EntityDamageByEntityEvent event = new EntityDamageByEntityEvent(projectile, damagee, EntityDamageEvent.DamageCause.PROJECTILE, 4);
    From the latest build. 1060. Line 182. 4 Points of Damage

    So, it's not the Build that's wrong nor the Armor. Adam is asking about Plug-ins. Let's see what else is logical... How close were you to the other player? Was the player immune and there was a bounce back that hit you for damage? Was the arrow stuck on a block and you received damage? Did someone hit you right after the arrow impacted the target? Did a Hoe hit you?
     
  6. Offline

    cholo71796

  7. Offline

    phrstbrn

    That's kinda missing the point. In the onEntityDamage event it says I do 4 Points of damage, but in game only registers as 1 heart (2 points of damage).

    I am testing this by putting two characters in an open field, NO armor, standing about 6 blocks apart.

    The server I am testing this on has only ONE plugin, and the source is posted it in the OP.

    If I downgrade from 1060 to 1000, damage works fine (although my plugin stops working, but to be expected).

    Something tells me the whatever they did during the 1060 update has server calculating the damage from meleeing with the bow, instead of the damage from the arrow.

    I did some more testing (I didn't really play with it too much), and damage done to passive mobs and creatures works fine.

    A cow or pig has 5 hearts of damage, and dies to exactly 3 arrows. A zombie which has 10 hearts, dies in 5 arrows.

    A player however, has 10 hearts and dies to 10 arrows.

    Something is definately fishy.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  8. A heart is worth 2 health points.
     
  9. Offline

    phrstbrn

    Yes, I know the difference between bukkit health points and hearts...

    However, even if I didn't know the difference between health points and hearts, a player should die in 5 arrows, not 10.
     
  10. I think striking the player in the head does more damage. Also maybe the distance between you and the player affects it as well.
     
  11. Offline

    phrstbrn

    *sigh* no, now you're making stuff up
     
  12. *sigh* I'm trying to help you here. I'm not making stuff up; just pointing out factors which may affect damage. If you're going to act like that then I couldn't care less.
     
  13. Offline

    phrstbrn

    This is more of a "get attention to fix this shit" kind of post, since it's clearly broken.

    But really, there are no headshot-hitboxes in Minecraft (thus no headshots) or "arrows do different damage at distance" mechanics in Minecraft, so if you don't understand the how the damage mechanics are supposed to work in Vanilla SMP, it's better not to start spreading misinformation.

    You know if I didn't say anything, somebody is going to see you have a purple tag, and think this was a real mechanic.
     
  14. I don't know the in's and outs of Minecraft mechanics, in fairness I don't really play that much. Notice the
    I wasn't adamant in my post, I never said that these factors were implemented in Minecraft so I'm not spreading misinformation at all, just sharing a viewpoint and last time I checked that was allowed.
     
  15. Offline

    The_Tree_Maker

    Well, Adam does know what he's talking about. I wouldn't go any further with arguing doesn't solve your issue. I took your code you posted and your results are the same as mine.

    Results: I get 1 Heart Damage when a Arrow hits me. Shows 4 Points of Damage shown on the server console data.

    So, it could be a Minecraft Development Flaw. I don't know to be honest.
     
  16. Offline

    phrstbrn

    I know what you said, but it's not me who is going to misinterpret, it's going to be one of the 12 year old "server adminz" who come onto this forum looking for help and might read your post who are going to misinterpret what you said.

    On more than one occasion, I've had people come into my server, start making stuff up about how our plugin (Supernatural Players) works, only to find out they were on these forums and somebody else in the thread was posting "about how our plugin works" (they used the words "I think" as well), and it was still taken out of context.

    But still, if by your own admission you don't understand the problem, why say anything...

    What? He was suggesting headshots do extra damage. You have to be joking.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
  17. You are so rude. I didn't know whether my information was correct or not but I was trying to suggest plausible reasons for your problems.
     
  18. Offline

    The_Tree_Maker

    Never know, it could be the cause. We are still trying to figure out your solution. If you look at my last post, you will see I did the same test as you. Getting the same results as you. I think it's just a development flaw. I hope they fix it when 1.8 comes out. They have the new Bow System coming out.
     
  19. Offline

    nisovin

    Except you are making stuff up and you are spreading misinformation. If you weren't certain about your facts, you shouldn't have said anything at all. It only serves to confuse the conversation.
    He obviously doesn't know what he's talking about, because what he said was not true at all.
     
  20. Offline

    The_Tree_Maker

    I was wrong, sorry... I'm not going to speak about that anymore...
    Well, looking at other variables. Skeleton arrows shot at me do 1 heart damage. Getting hit by arrows that were stuck on blocks give me 1 heart damage. It's a development flaw. What else is there to say?
     
  21. Offline

    phrstbrn

    I've posted a bug about this, I hope this gets attention, since this is a fairly large regression, imho.

    http://leaky.bukkit.org/issues/1340

    I would fix it myself if I were more familiar with the CraftBukkit code base. Hopefully somebody sees this and knows where to look to get this fixed.
     
  22. I was not 'making stuff up', in fact I was not making anything up, just suggesting; I suggest you look up the definition of the word. As for spreading misinformation I doubt that this thread is even going to get much expose and in addition my post is hardly forthcoming.
     
  23. Offline

    LEOcab

    AHA!

    I made a thread about this some time ago (shortly after 1060 came out) but nobody paid any attention. They said it was one of my plugins. Today I tested it with no plugins and I can confirm it. Arrows only do 1 heart damage instead of 2 since 1060.

    I guess it's kinda late now since 1.8 has new bow mechanics, but still. :(
     
Thread Status:
Not open for further replies.

Share This Page