Jump to content

jakj

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by jakj

  1. A reimplementation of Redpower frames, with more flexibility and functionality, and including many new types of frames. The mod not only replicates the original Redpower-style frames, it also adds four (so far) new types, which let you do fancy things like make unidirectional platforms, move entire cuboid sections of the world (like a whole house), or even set up a template pattern (sort of like the Buildcraft style of template) that will move exactly what is in the template and no more. The mod is open-source and open-community, and feedback is welcomed. http://forums.technicpack.net/threads/1-5-x-redstone-in-motion-redpower-frames-1-0-0-0-june-23.47048/
  2. I've considered a packet solution, but it got needlessly complicated very quickly, in that I have to send a packet that says "Current player used item X in hotbar slot Y on block Z" and the server has to 1) check for and consume one of the item in that hotbar slot if present, 2) try to find the item elsewhere in the inventory if it's changed in between sending the packet, 3) fail the operation (and somehow notify the client of this failure, which by the time it's happened could involve altered client state) if the item is not in the server inventory, then generate the new item in the server-side inventory, then send a packet back to the client about where the item (should have) ended up. It's nuts. I had a look at Forestry which recently came out for 1.3, and his code for un-crating an item on right-click doesn't do any of this, but then again, I can't seem to actually make a crated item to test with, so maybe that hasn't been updated yet. There has to be some better way than this around-the-world journey.
  3. I am trying to use the functions that SlotCrafting/ItemBucket use, namely addItemStackToInventory (in InventoryPlayer) and dropPlayerItem (in EntityPlayer). I'm trying to do so from the right-click handler of an Item, passing the EntityPlayer provided in that call. On both the integrated and dedicated servers, addItemStackToInventory will add the items to the inventory in appearance, but when thrown or selected will revert the inventory to its previous state, and dropPlayerItem seems to do nothing at all. The uses of these functions in SlotCrafting and ItemBucket work just fine, though. What I'm trying to do is, on right-clicking of the item on particular blocks, decrement the stack size of the item and add a new item to the inventory based on what block was clicked. Where/how is the client/server inventory synchronization occurring, and how can I manually invoke it?
×
×
  • Create New...

Important Information

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