Add the skin flag set to all visible for 1.8 clients

This commit is contained in:
fullwall 2014-11-17 10:09:57 +08:00
parent 07b6c24f1d
commit 3f95c57ea4

View File

@ -277,6 +277,15 @@ public class EntityHumanNPC extends EntityPlayer implements NPCHolder {
private void updatePackets(boolean navigating) { private void updatePackets(boolean navigating) {
if (world.getWorld().getFullTime() % Setting.PACKET_UPDATE_DELAY.asInt() == 0) { if (world.getWorld().getFullTime() % Setting.PACKET_UPDATE_DELAY.asInt() == 0) {
// set skin flag byte to all visible (DataWatcher API is lacking so
// catch the NPE as a sign that this is a MC 1.7 server without the
// skin flag)
try {
datawatcher.watch(10, Byte.valueOf((byte) 127));
} catch (NullPointerException e) {
datawatcher.a(10, Byte.valueOf((byte) 127));
}
Location current = getBukkitEntity().getLocation(packetLocationCache); Location current = getBukkitEntity().getLocation(packetLocationCache);
Packet[] packets = new Packet[navigating ? 5 : 6]; Packet[] packets = new Packet[navigating ? 5 : 6];
if (!navigating) { if (!navigating) {