mirror of
https://github.com/JamesPeters98/ChestsPlusPlus.git
synced 2025-01-10 18:37:42 +01:00
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:
parent
a15a23692e
commit
341e12db75
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user