With IntelliJ you double-press Shift to open the search-everywhere box.
I haven't used Eclipse in years, but you should find Minecraft's code (and assets) in your project's external libraries. You're looking for something along the lines of: https://imgur.com/jC0eGDK (this is from IntelliJ, mind you).
However, here's an example from 1.17 code, I believe it was still applicable in 1.16:
private static final VoxelShape PART_1 = Block.box(0.0, 0.0, 0.0, 16.0, 16.0, 16.0); // 16.0 is the full size of one block (in pixels)
@Override
public VoxelShape getShape(BlockState state, BlockGetter block, BlockPos pos, CollisionContext context)
{
return PART_1;
}
// If you want multiple hitboxes, combine them like:
private static final VoxelShape AABB = Shapes.or(PART_1, PART_2); // You can add more parts here if necessary
// Then simply return this from getShape() instead of the individual part.
Looking at your code, I believe the reason it's not working is that you're creating the VoxelShape locally in the function. Once the function returns, that object goes out of scope and is destroyed. You want to move the declaration into the class itself. You can also make it static.