Bukkit/CraftBukkit — pull request #1239 by EdGruberman (2013-08-30 07:57:30+00:00)
Title: [C] Update clients when ItemFrame direction is set. Fixes BUKKIT-3371

##### The Issue:
Hanging entities are placed into the entity tracker and updates are sent out to clients for the initial placement. Thereafter data watchers are configured to monitor the item inside the frame. However, if the direction the ItemFrame facing changes the entity tracker will not send out updates and then the clients will not update their render of the ItemFrame to it's new position.

##### Justification for this PR:
The implementation should be consistent in its handling of Hanging entities. The Painting entity is handled this same way. It is also intuitive for all clients to render the ItemFrame in the same location and not just newly connected clients (after the direction change).

##### PR Breakdown:
This commit removes and recreates the ItemFrame entity in the same way that was already done for Painting entities. This causes clients to be updated appropriately.

##### Testing Results and Materials:
I created a plugin which allows a player to run the /command command with a single parameter of direction. The command will take the block the player is looking at, spawn an ItemFrame on it, then set the direction of that ItemFrame as specified in the parameter.

[Plugin](https://github.com/EdGruberman/bukkit-test/blob/master/BUKKIT-3371/dist/BUKKIT-3371.jar?raw=true) | [Source](https://github.com/EdGruberman/bukkit-test/blob/master/BUKKIT-3371/src/edgruberman/bukkit/bukkit_3371/Main.java)

##### Relevant PR(s):
None

##### JIRA Ticket:
[BUKKIT-3371](https://bukkit.atlassian.net/browse/BUKKIT-3371)