Custom Bee Entity Not Spawning But other Mobs do

Hi all, I have an issue where if i try to spawn a Custom Bee it will not work ith a NullPointerExecption but it i spawn any other mob like a pig it works fine

Why would this be the case if Pig works fine

 //Constructor
public CustomBee(Location loc, Player player) {
   super(EntityTypes.BEE, ((CraftWorld) loc.getWorld()).getHandle());
 
   this.setHealth(20.0f);

   this.setCustomNameVisible(true);
 
   this.setInvulnerable(true);
 
   this.setPosition((int)loc.getX(), (int)loc.getY(), (int)loc.getZ());
 
   this.setGoalTarget((EntityLiving)((CraftPlayer)player).getHandle(), TargetReason.CUSTOM, true);

}


[11:18:03 WARN]: Entity threw exception at world:-1228.0,16.0,1692.0
[11:18:03 WARN]: java.lang.NullPointerException
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.EntityBee$k.access$300(EntityBee.java:735)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.EntityBee$2.c(EntityBee.java:449)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.EntityInsentient.doTick(EntityInsentient.java:760)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.EntityLiving.movementTick(EntityLiving.java:2752)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.EntityInsentient.movementTick(EntityInsentient.java:543)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.EntityAgeable.movementTick(EntityAgeable.java:143)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.EntityAnimal.movementTick(EntityAnimal.java:34)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.EntityBee.movementTick(EntityBee.java:355)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.EntityLiving.tick(EntityLiving.java:2477)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.EntityInsentient.tick(EntityInsentient.java:306)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.EntityBee.tick(EntityBee.java:164)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.WorldServer.entityJoinedWorld(WorldServer.java:845)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.World.a(World.java:884)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.WorldServer.doTick(WorldServer.java:530)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1356)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:377)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1209)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:997)
[11:18:03 WARN]:        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:178)
[11:18:03 WARN]:        at java.base/java.lang.Thread.run(Thread.java:832)