Posted January 29, 20169 yr I am trying to make a block that helps players but hurts everything else. I have looked around and haven't found an answer to this and I am sure that someone else has com across this issue. Here is a copy of the code: http://pastebin.com/xHNiyzuQ And here is the copy of the crash that I get: http://pastebin.com/WvxhM3aw This only happens if my block has an effect that is being applied to the mob. If there is not effect then it is ok. Thoughts?
January 29, 20169 yr Well, the parameter if the method is of type Entity, yet you blindly cast to EntityLiving: } else{ ((EntityLiving)entity).attackEntityFrom(DamageSource.wither, 1.0F); } And, as you can see in the crash report, there are all sorts of other entities that might be colliding with the block: java.lang.ClassCastException: net.minecraft.client.particle.EntityBreakingFX cannot be cast to net.minecraft.entity.EntityLiving Always perform a type check (e.g. instanceof) before casting to a new type. http://i.imgur.com/NdrFdld.png[/img]
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.