Posted August 24, 20169 yr This is a method from the Container class. It has the following signature: public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) The first and last arguments are clear to me. The second and third arguments, as well as the return, not so much. The body of this method in the Container class is too long and too complicated to follow. I'm interested in overriding this method because I need slots with behaviour different than the vanilla ones. For that, I have to fully understand what this method does, because I think it has a very big potential for bugs and unintentional side effects. EDIT: Let me rephrase that: How do I convert from this signature to the old signature where both dragType and clickTypeIn were ints ? Such as: public MyContainer extends Container { @Override public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) { int mouseButton = /* what? */; int modifier = /* what? */; return legacySlotClick(slotId, mouseButton, modifier, player); } protected ItemStack legacySlotClick(int slotId, int mouseButton, int modifier, EntityPlayer player) { } }
August 24, 20169 yr Author I rephrased my question, so maybe those who read it and found it too complicated to answer (which it indeed was, since the method I'm talking about has a body that's way too long) can now help.
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.