Hello! So back in the 1.6/1.7 era I used the following to modify the speed of which a mob runs. I did this on a new laptop and I am not able to access my old desktop with the code that worked, but hopefully someone can point me in the right direction. Code (Text): public static void setSpeedMultiplier(LivingEntity le){ EntityInsentient el = (EntityInsentient) ((CraftLivingEntity) le).getHandle();//Gets entity double mult = 1D+(((r.nextInt(20-10)+10)-2)/10D); Bukkit.broadcastMessage("START" + el.getAttributeInstance(GenericAttributes.c).getValue()); AttributeInstance att = el.getAttributeInstance(GenericAttributes.c); //Gets the speed GA AttributeModifier modifier = new AttributeModifier(UUID.randomUUID(), "Speed multiplier", mult*10, 0); att.b(modifier); //Removes existing modifier att.a(modifier); // Adds new modifier Bukkit.broadcastMessage("END" + el.getAttributeInstance(GenericAttributes.c).getValue()); } As you can see it is clearly being modified (I threw in some insane values like the *10) but the mob itself seems to have no effect. I am 100% sure the difference between 1 and .03 would be noticeable. Am I missing something or did something chance with the 1.8 update? Any help would be greatly appreciated!
you could take a look at this for how to go about doing it and take a look at this to figure out what tags to modify. if you used the search function you would have seen that there is a thread on how to do this. might as well post the answer since it got NECTOposted