Added BlockInteractEvent to replace handleBlockLeftClick().

Needed quite a shim for tools/brushes for now.
This commit is contained in:
sk89q
2014-06-26 16:56:40 -07:00
parent 0e00f0ac9d
commit 900c9b5258
12 changed files with 248 additions and 53 deletions

View File

@ -49,7 +49,7 @@ public class TargetBlock {
* @param player player to work with
*/
public TargetBlock(LocalPlayer player) {
this.world = LocalWorldAdapter.wrap(player.getWorld());
this.world = LocalWorldAdapter.adapt(player.getWorld());
this.setValues(player.getPosition(), player.getYaw(), player.getPitch(),
300, 1.65, 0.2);
}
@ -73,7 +73,7 @@ public class TargetBlock {
* @param checkDistance how often to check for blocks, the smaller the more precise
*/
public TargetBlock(Entity player, int maxDistance, double checkDistance) {
this.world = LocalWorldAdapter.wrap(player.getWorld());
this.world = LocalWorldAdapter.adapt(player.getWorld());
this.setValues(player.getPosition(), player.getYaw(), player.getPitch(),
maxDistance, 1.65, checkDistance);
}