Removed sign check to support other Directional blocks
This commit is contained in:
parent
847267713e
commit
f6529ecf32
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ public class DirectionUtil {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static BlockFace getDirection(@Nonnull Block block) {
|
public static BlockFace getDirection(@Nonnull Block block) {
|
||||||
if (block.getBlockData() instanceof Directional && block.getType().toString().contains("WALL_SIGN")) {
|
if (block.getBlockData() instanceof Directional) {
|
||||||
Directional dir = (Directional) block.getBlockData();
|
Directional dir = (Directional) block.getBlockData();
|
||||||
return dir.getFacing();
|
return dir.getFacing();
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ public class DirectionUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setDirection(@Nonnull Block block, BlockFace blockFace) {
|
public static void setDirection(@Nonnull Block block, BlockFace blockFace) {
|
||||||
if (block.getBlockData() instanceof Directional && block.getType().toString().contains("WALL_SIGN")) {
|
if (block.getBlockData() instanceof Directional) {
|
||||||
BlockData bd = block.getBlockData();
|
BlockData bd = block.getBlockData();
|
||||||
Directional dir = (Directional) bd;
|
Directional dir = (Directional) bd;
|
||||||
dir.setFacing(blockFace);
|
dir.setFacing(blockFace);
|
||||||
|
|
Loading…
Reference in a new issue