Skip to content

Commit

Permalink
Fix placeable block position check; resolves #870
Browse files Browse the repository at this point in the history
  • Loading branch information
Sataniel98 committed Aug 31, 2020
1 parent 13c0068 commit 7c7b61b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ public void onPlace() {
if (triggerId != -1) {
SignTrigger.getById(triggerId, gameWorld).onTrigger(true);
}
gameWorld.removeGameBlock(this);
}

public boolean canPlace(Block toPlace, ExItem material) {
return faces.contains(toPlace.getFace(block)) && (materials.isEmpty() || materials.contains(material));
return block.getX() == toPlace.getX() && block.getY() == toPlace.getY() && block.getZ() == toPlace.getZ()
&& faces.contains(toPlace.getFace(block)) && (materials.isEmpty() || materials.contains(material));
}

public static boolean canBuildHere(Block block, ExItem material, DGameWorld gameWorld) {
Expand Down

0 comments on commit 7c7b61b

Please sign in to comment.