Pretty much nothing about Minecraft is optimised, so you should probably make it only fly for 5-10 seconds (it should probably go less than 100 blocks in that time) before it dies (you should use the ticksAlive field, and have your logic in onUpdate). I suggested you extend entity throwable because it has a very accurate onImpact method. In this method you should check
- if the entity hit a block (if so kill it)
- if the entity hit an entity (increment a counter, if that counter is at max, kill your entity)
As for the weird spawning, how are you getting the x, y, z and the pitch & yaw to spawn your entity with? Your GitHub links all return
Could you post that code please?
With rendering, you need a class that extends Render<YourEntity>. Register your rendering class in the ModelRegistryEvent with
RenderingRegistry.registerEntityRenderingHandler(YourEntity.class, RenderYourEntity::new);
or
RenderingRegistry.registerEntityRenderingHandler(YourEntity.class, (renderManagerIn) -> new RenderYourEntity(renderManagerIn));
if you don’t feel comfortable using the :: operator