I'm trying to make a tool that mines a 3x3 area based on the side of the block the player broke. For example if I broke a block while having my cursor on one of the faces, then it would mine blocks around it on the same plane. So far I'm using the direction of the entity and pitch.
package com.nindybun.miningtool.objects.items;
import com.sun.org.apache.xerces.internal.xs.XSIDCDefinition;
import net.minecraft.block.BlockState;
import net.minecraft.block.DirectionalBlock;
import net.m