Getting block placed against...

Discussion in 'Plugin Development' started by Jombi, Jan 25, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Jombi

    This is driving me nuts.

    Refer: http://jd.bukkit.org/doxygen/df/d45...eEvent.html#a75aade732141bb775a3a84916774b9f8

    Here's my code:
    Code:
                    Location locGoal = new Location(null, blueX, blueY, blueZ);
                    Location locPlace = placedAgainst.getLocation();
                    if(placedAgainst.getLocation().getBlockX() == blueX){
                        if(placedAgainst.getLocation().getBlockY() == blueY){
                            if(placedAgainst.getLocation().getBlockZ() == blueZ){
                            //Do something
                            }else{
                                e.setCancelled(true);
                            }
                        }else{
                            e.setCancelled(true);
                        }
                    }else{
                        e.setCancelled(true);
                    }
    locPlace changes depending on which side of locGoal I click. This didn't happen in 1.4.6. Did something change in 1.4.7 to do this? I literally can only "score" by clicking 1 of the 6 sides of the goal block.

    Any tips are appreciated!

    Just confirmed its a bug. :(

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 31, 2016
Thread Status:
Not open for further replies.

Share This Page