Fix an issue where the mob interaction index was set incorrectly for players.

This commit is contained in:
Ryley Kimmel
2015-02-26 01:01:50 -05:00
parent e26ed8c8a1
commit e2d150b6ca
2 changed files with 15 additions and 1 deletions
+10 -1
View File
@@ -403,6 +403,15 @@ public abstract class Mob extends Entity {
} }
} }
/**
* Returns this mobs interacting index.
*
* @return The interaction index of this mob.
*/
public int getInteractionIndex() {
return index;
}
/** /**
* Updates this mob's interacting mob. * Updates this mob's interacting mob.
* *
@@ -410,7 +419,7 @@ public abstract class Mob extends Entity {
*/ */
public final void setInteractingMob(Mob mob) { public final void setInteractingMob(Mob mob) {
interactingMob = mob; interactingMob = mob;
blockSet.add(SynchronizationBlock.createInteractingMobBlock(mob.index)); blockSet.add(SynchronizationBlock.createInteractingMobBlock(mob.getInteractionIndex()));
} }
/** /**
@@ -355,6 +355,11 @@ public final class Player extends Mob {
return EntityType.PLAYER; return EntityType.PLAYER;
} }
@Override
public int getInteractionIndex() {
return getIndex() | 0x8000;
}
/** /**
* Gets this player's friend chat {@link PrivacyState}. * Gets this player's friend chat {@link PrivacyState}.
* *