Posted February 8, 201411 yr Hello, I used method onInventoryChanged() from IInventory in 1.6.4. Unfortunatelly, this method was removed in 1.7.2. Any idea what to use instead? I used the method to send packet about update, so the tileEntity updates on clients without activating the block. Sorry for mistakes, English is not my mother tongue
February 8, 201411 yr It's probably not removed. Just not deobfuscated. In any case, I don't know the answer. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 9, 201411 yr Author No, it is removed. There is no deobfuscated method in IInventory and no other method that could replace it. Sorry for mistakes, English is not my mother tongue
February 9, 201411 yr Author There are methods in IInventory in Forge 10.12.0.1024 int getSizeInventory(); ItemStack getStackInSlot(int var1); ItemStack decrStackSize(int var1, int var2); ItemStack getStackInSlotOnClosing(int var1); void setInventorySlotContents(int var1, ItemStack var2); String getInventoryName(); boolean hasCustomInventoryName(); int getInventoryStackLimit(); void markDirty(); boolean isUseableByPlayer(EntityPlayer var1); void openInventory(); void closeInventory(); boolean isItemValidForSlot(int var1, ItemStack var2); And from what I have understand, markDirty does something different. Maybe it got back in newest (1025) update? I haven't had time to update yet. Sorry for mistakes, English is not my mother tongue
February 9, 201411 yr I too wonder what to use. I was following a tutorial ( curse:MrrGingerNinja TE inv) and onInventoryChange() was called to commit the stuff done in 2 of the required TE IInv methods. ex derived from tut: @Override public void setInventorySlotContents(int pSlot, ItemStack pStack) { inventory[pSlot] = pStack; if(pStack != null && pStack.stackSize > getInventoryStackLimit()) { pStack.stackSize = getInventoryStackLimit(); } onInventoryChanged(); } it seems like it is just committing the change, and the choices of remaining talk about chunkloading and refreshing from read etc (I want to commit, not read) MarkDirty sounded like it will do stuff at some later point beyond this control ... no, Commit Now! whats the way other folks are committing setInventorySlotContents() TE IInv changes now, if not onInventoryChanged()? http://i1149.photobucket.com/albums/o583/battleaxe333/mcMML-objBanner.png[/img]
February 9, 201411 yr markDirty has the exact same call usages as in 1.6.4. The only thing that has changed besides the name, is the comment; which isn't anything to go by.
February 10, 201411 yr Tried MarkDirty() my TE Inv works and its hard to argue with success http://i1149.photobucket.com/albums/o583/battleaxe333/mcMML-objBanner.png[/img]
February 12, 201411 yr Tip: if you have problems that you cant solve, and inolves inventory stuff, just look iron chest source on cpw´s github, if the problem is new names, just look at commits and see what cpw has changed. (i wouldn´t recommend minecraft because you did this thread as you couldn´t look at minecraft source correctly, so using the iron chest one is more easier because of the commits)
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.