You should pass in null as the entity type as you’re going to override the getType method to return your one
Just override “getType” like any other method. You can use an anonymous subclass if you want.
The only issue that I’ve found with this is that the spawn egg textures don’t get generated for your egg. I’m looking into this.