Jump to content

[1.6.4]ISidedInventory, import export.


Recommended Posts

Hello, I am trying to get my ISidedInvnetory code working how i want it.

Basically 1 have 2 slots, I wan to import into slot1 from all sides and export from all slots from slot2/


MY code so far.



private static final int[] slots_top = new int[] {0};

private static final int[] slots_bottom = new int[] {2, 1};

private static final int[] slots_sides = new int[] {1, 0};



  public int[] getAccessibleSlotsFromSide(int par1) {

    return par1 == 0 ? slots_bottom : (par1 == 1 ? slots_top : slots_sides);




public boolean canInsertItem(int par1, ItemStack par2ItemStack, int par3) {

      return this.isItemValidForSlot(par1, par2ItemStack);


public boolean canExtractItem(int par1, ItemStack par2ItemStack, int par3) {

return par3 != 0 || par3 != 1 || par3 != 2 || par1 != 0 || par2ItemStack.itemID == Item.bucketEmpty.itemID;





Been messing with the canExtractItem() functions for a while now and altough some stuff has changed i still cant get the right sides working.


If i knew the difference between par1 and par3 or what part of it is import and what is export i would be able to manage.

Link to comment
Share on other sites

Someone please help. I have spent the last 6 hours on this trying every combination of par1, par3, ==, !=, 0,  1,2 and everything else i could and still nothing. no searching on google, minecraftforums or forgeforums has helped me in the slightest. I've even taken into looking at source code from EnderIO and Thermal Expansion and that has not helped me either.

Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.