Fix placeable block position check; resolves #870

This commit is contained in:
Daniel Saukel 2020-08-31 22:47:33 +02:00
parent 13c0068add
commit 7c7b61be0c

View File

@ -72,10 +72,12 @@ public class PlaceableBlock extends GameBlock {
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) {