SimpleMultipart/src/main/java/net/shadowfacts/simplemultipart/util/ShapeUtils.java

19 lines
450 B
Java

package net.shadowfacts.simplemultipart.util;
import net.minecraft.util.BooleanBiFunction;
import net.minecraft.util.shape.VoxelShape;
import net.minecraft.util.shape.VoxelShapes;
/**
* @author shadowfacts
*/
public class ShapeUtils {
public static boolean intersect(VoxelShape a, VoxelShape b) {
// TODO: this seems very inefficient
VoxelShape overlap = VoxelShapes.combine(a, b, BooleanBiFunction.AND);
return !overlap.isEmpty();
}
}