Posted November 18, 20204 yr I'm making an entity and I'm getting this error in the class ModEntityTypes in the entity penguin when registering it (before I created the penguin entity my another entity was working fine) Error in eclipse: https://prnt.sc/vlmsev Github: https://github.com/LeiteDesnatado/Mod Class ModEntityTypes: https://pastebin.com/U8qnCFCd Class PenguinEntity: https://pastebin.com/mQfPtiYu
November 19, 20204 yr A simple case of generics. You are specifying that the type must be at least that of AnimalEntity. Therefore, you cannot guarantee that the generic is a PenguinEntity.
November 19, 20204 yr Author 28 minutes ago, ChampionAsh5357 said: A simple case of generics. You are specifying that the type must be at least that of AnimalEntity. Therefore, you cannot guarantee that the generic is a PenguinEntity. How could I fix that?
November 19, 20204 yr Specify the generic parameter to be a subclass of PenguinEntity instead of AnimalEntity
November 19, 20204 yr Author 9 hours ago, ChampionAsh5357 said: Specify the generic parameter to be a subclass of PenguinEntity instead of AnimalEntity It worked thank you!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.