Add some PlayerAnimation entries for using items

This commit is contained in:
fullwall 2013-12-29 23:04:10 +08:00
parent efc6b8375c
commit 3808d7188a

View File

@ -64,6 +64,14 @@ public enum PlayerAnimation {
radius);
}
},
START_USE_ITEM {
@Override
protected void playAnimation(EntityPlayer player, int radius) {
player.e(true);
sendPacketNearby(new PacketPlayOutEntityMetadata(player.getId(), player.getDataWatcher(), true), player,
radius);
}
},
STOP_SITTING {
@Override
protected void playAnimation(EntityPlayer player, int radius) {
@ -83,6 +91,14 @@ public enum PlayerAnimation {
sendPacketNearby(new PacketPlayOutEntityMetadata(player.getId(), player.getDataWatcher(), true), player,
radius);
}
},
STOP_USE_ITEM {
@Override
protected void playAnimation(EntityPlayer player, int radius) {
player.e(false);
sendPacketNearby(new PacketPlayOutEntityMetadata(player.getId(), player.getDataWatcher(), true), player,
radius);
}
};
public void play(Player player) {