Posted July 7, 20187 yr One of my mob's projectiles causes a crash but not every time it shoots. can someone tell me the cause and how to fix? https://pastebin.com/DNbHryF1 ^projectile https://pastebin.com/zsST527J ^error
July 7, 20187 yr The error is In line 238. If you manage to shot the Pegasusprojectile with another PegasusProjectile it gets casted to EntityLivingBase. As it's an "Arrow" in minecraft terms it doesen't lives. (Sorry for my bad english) My Projects: Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming) Important: As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts
July 7, 20187 yr You cannot blindly assume that any entity hit by your projectile is a subclass of EntityLivingBase. Use instanceof before casting.
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.