Skip to content

Commit

Permalink
Add the skin flag set to all visible for 1.8 clients
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Nov 17, 2014
1 parent 6236324 commit a0489cb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/net/citizensnpcs/npc/entity/EntityHumanNPC.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,15 @@ public void updateAI() {

private void updatePackets(boolean navigating) {
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);
Packet[] packets = new Packet[navigating ? 5 : 6];
if (!navigating) {
Expand Down

0 comments on commit a0489cb

Please sign in to comment.