Bukkit/CraftBukkit — pull request #1100 by authorblues (2013-03-26 11:59:37+00:00)
Title: Update physics for Attachable to update indirect redstone. Fixes BUKKIT-1858

**The Issue:**

When updating a BlockState via a plugin, none of the nearby blocks are updated, causing indirect redstone to not update. This means that if a lever is flipped via a plugin, a redstone line on the other side of the attached block will not be updated.

**Justification for this PR:**

This is behavior is contrary to expectations. While flipping a lever is not vanilla behavior, it is confusing and frustrating to see a flipped lever with the indirect redstone line still off. A specific example can be found attached to the Leaky ticket from a year ago.

**PR Breakdown:**

This PR specifically addresses blocks implementing the Attachable interface. It determines in which direction the block is attached (which face of the block a lever is attached to, for instance), and updates the physics of the block in that direction, forcing redstone to update (as well as other blocks, but this mimics the behavior of the vanilla client).

**Testing Results and Materials:**

This fix has been part of [our custom CraftBukkit fork](https://github.com/ProjectAres/SportBukkit/blob/master/CraftBukkit/RedstoneUpdateFix.patch) for more than a year now, with behavior exactly as one would expect, with no unexpected side effects to note.

**JIRA Ticket:**

BUKKIT-1858 - https://bukkit.atlassian.net/browse/BUKKIT-1858