Update Utils.java

Fixes crafting tables selecting the info from blocks next to them when a sign is facing it.
This commit is contained in:
jameslfc19 2020-06-28 21:58:27 +01:00
parent a15a23692e
commit 341e12db75

View File

@ -335,9 +335,16 @@ public class Utils {
public static AutoCraftInfo getAutoCraftInfo(Block block){
for(BlockFace face : blockfaces){
Block relative = block.getRelative(face);
if(relative.getBlockData() instanceof Directional){
//Check if the sign is attached to the given block.
Directional directional = (Directional) relative.getBlockData();
if(directional.getFacing() != face) continue;
//If it is we can extract info from it.
AutoCraftInfo info = getAutoCraftInfoFromSign(block.getRelative(face));
if(info != null) return info;
}
}
return null;
}