Jump to content

Recommended Posts

Posted

How can I move an item from the furnace to the inventory or vice versa?

 

I've got the part of finding the item in the inventory but what code do I use to move it?

Posted

Use the transferStackInSlot function. I don't know how to make it work, but I know that you do use it.

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

Posted

Use the transferStackInSlot function. I don't know how to make it work, but I know that you do use it.

 

When I do this, the action only happens client-side. How can I inform the server that an item has moved? Do I need to send a packet?

Posted

This is my attempt at sending a packet to do it:

 

Packet102WindowClick wc = new Packet102WindowClick();
wc.window_Id = 2; // Furnace
wc.inventorySlot = 2; // Output
wc.mouseClick = 0; // Left click
wc.holdingShift = true; // Get it all
wc.action = minecraft.thePlayer.craftingInventory.getNextTransactionID(minecraft.thePlayer.inventory);
wc.itemStack = finishedStack;
ModLoader.sendPacket(wc);
logger.info("Transferred!");

 

EDIT: This works!!!!! :D:D:D:D:D

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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