package com.untamedears.humbug;

import org.bukkit.craftbukkit.v1_6_R2.entity.CraftHorse;
import net.minecraft.server.v1_6_R2.AttributeInstance;
import net.minecraft.server.v1_6_R2.AttributeRanged;
import net.minecraft.server.v1_6_R2.EntityHorse;
import net.minecraft.server.v1_6_R2.GenericAttributes;
import net.minecraft.server.v1_6_R2.IAttribute;
import org.bukkit.entity.Entity;

public class Versioned {
  // Static class
  private Versioned() {}

  public static double getHorseSpeed(Entity entity) {
    if (!(entity instanceof CraftHorse)) {
      return -1.0000001;
    }
    EntityHorse mcHorseAlot = ((CraftHorse)entity).getHandle();
    // GenericAttributes.d == generic.movementSpeed
    return mcHorseAlot.getAttributeInstance(GenericAttributes.d).b();
  }

  public static void setHorseSpeed(Entity entity, double speedModifier) {
    if (!(entity instanceof CraftHorse)) {
      return;
    }
    EntityHorse mcHorseAlot = ((CraftHorse)entity).getHandle();
    mcHorseAlot.getAttributeInstance(GenericAttributes.d).setValue(speedModifier);
  }
}

@@ -62,17 +62,17 @@
 t.v1_6_R
-2
+3
 .entity.
@@ -109,33 +109,33 @@
 ft.server.v1_6_R
-2
+3
 .AttributeInstan
@@ -172,17 +172,17 @@
 r.v1_6_R
-2
+3
 .Attribu
@@ -225,17 +225,17 @@
 r.v1_6_R
-2
+3
 .EntityH
@@ -274,17 +274,17 @@
 r.v1_6_R
-2
+3
 .Generic
@@ -333,9 +333,9 @@
 _6_R
-2
+3
 .IAt

Update to 1.6.4.R3