Differentiation Posted November 13, 2017 Posted November 13, 2017 (edited) Hey! When I code living events I find that there are two entity getter methods. The first is event#getEntity and the second is event#getEntityLiving. I know this might sound silly, but what is the difference between the two usages? Thanks! Edited November 13, 2017 by Differentiation Quote
Differentiation Posted November 13, 2017 Author Posted November 13, 2017 On 11/13/2017 at 1:05 PM, diesieben07 said: getEntity is inherited from EntityEvent into it's child classes. EntityLivingEvent adds getEntityLiving. They return the same object, but getEntityLiving has a more specific return type. This could be solved more cleanly by just overriding getEntity and narrowing the return type, but it is not. Expand Thanks! Solved. Quote
Recommended Posts
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.