Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update IItemHandler#insertItem documentation #17

Open
wants to merge 1 commit into
base: noci-omnibus/cleanup
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/net/minecraftforge/items/IItemHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ public interface IItemHandler
* Inserts an ItemStack into the given slot and return the remainder.
* The ItemStack <em>should not</em> be modified in this function!
* </p>
* Note: This behaviour is subtly different from {@link IFluidHandler#fill(FluidStack, boolean)}
* Note: This function returns the REMAINDER - what was NOT inserted!
* This behaviour is subtly different from {@link IFluidHandler#fill}, which returns what was inserted.
*
* @param slot Slot to insert into.
* @param stack ItemStack to insert. This must not be modified by the item handler.
* @param stack ItemStack to insert. Its ownership is given to the item handler. It must never be used or modified by the caller afterwards!
* @param simulate If true, the insertion is only simulated
* @return The remaining ItemStack that was not inserted (if the entire stack is accepted, then return an empty ItemStack).
* May be the same as the input ItemStack if unchanged, otherwise a new ItemStack.
Expand Down