Fixed Wolves, Endermen, and Ocelots

All mob and misc disguises work now
This commit is contained in:
NavidK0
2016-03-13 21:27:46 -04:00
parent e95df4a2df
commit 27baf53073
5 changed files with 51 additions and 11 deletions

View File

@@ -6,6 +6,8 @@ import com.comphenix.protocol.wrappers.WrappedDataWatcher.Serializer;
import com.comphenix.protocol.wrappers.WrappedDataWatcher.WrappedDataWatcherObject;
import com.comphenix.protocol.wrappers.WrappedGameProfile;
import com.google.common.collect.ImmutableMap;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.bukkit.Art;
import org.bukkit.Bukkit;
import org.bukkit.Location;
@@ -667,4 +669,14 @@ public class ReflectionManager {
}
return null;
}
public static int getCombinedId(int id, int data) {
return id + (data << 12);
}
public static Pair<Integer, Integer> getFromCombinedId(int combinedId) {
int j = combinedId & 4095;
int k = combinedId >> 12 & 15;
return new ImmutablePair<>(j, k);
}
}