When you define your getShape method in a custom block, please do not construct the VoxelShape directly in there. getShape is called excessively and VoxelShape creation is not cheap. Create the VoxelShape in a static field and call that pre-made VoxelShape in getShape.
#minecraft #modding #mcdev