mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-24 19:45:43 +01:00
Fix placeable block position check; resolves #870
This commit is contained in:
parent
13c0068add
commit
7c7b61be0c
@ -72,10 +72,12 @@ public class PlaceableBlock extends GameBlock {
|
|||||||
if (triggerId != -1) {
|
if (triggerId != -1) {
|
||||||
SignTrigger.getById(triggerId, gameWorld).onTrigger(true);
|
SignTrigger.getById(triggerId, gameWorld).onTrigger(true);
|
||||||
}
|
}
|
||||||
|
gameWorld.removeGameBlock(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canPlace(Block toPlace, ExItem material) {
|
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) {
|
public static boolean canBuildHere(Block block, ExItem material, DGameWorld gameWorld) {
|
||||||
|
Loading…
Reference in New Issue
Block a user