Posted May 2, 201510 yr So I want to feed my creature stuff, and I've overridden the interact() function. But I need to find out if the player is currently holding food. How would I go about doing that? I thought about using Object#isAssignableFrom(Class<?>) but I don't think that will work. I hope this isn't too much of a Java question.
May 2, 201510 yr item instanceof ItemFood Best shot. 1.7.10 is no longer supported by forge, you are on your own.
May 2, 201510 yr Author My Java's a bit rusty, so that really helped me out. That did it! Thanks, Ernio.
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.