Removed sign check to support other Directional blocks

This commit is contained in:
stijnb1234 2020-02-02 16:21:26 +01:00
parent 847267713e
commit f6529ecf32

View file

@ -12,7 +12,7 @@ public class DirectionUtil {
@Nullable
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();
return dir.getFacing();
}
@ -20,7 +20,7 @@ public class DirectionUtil {
}
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();
Directional dir = (Directional) bd;
dir.setFacing(blockFace);