Posted March 29, 20178 yr So it is me again... I am trying to mimic ISided ness with two ItemStackHandlers. The guy which is only used internal for my stuff works just fine. But the second one used as output seems to delete its contents every tick or so. I tried debugging my Method it was working fine when I only debug one crafting cyclus but when I debbug every tick it seems to delete its contents straigth after 1 tick. My Block(performs setting of Inventory contents for Crafting ingredients) My TileEntity Maybe I made a dumb mistake but everything else is working as intended I can only not find the derp that deletes my InventoryContents. Thanks for helping me
March 29, 20178 yr Uh? https://github.com/hnsdieter/FluxedThings2/blob/master/src/main/java/pingubro/fluxedthings/tileentity/TileCrystalCauldron.java#L46 https://github.com/hnsdieter/FluxedThings2/blob/master/src/main/java/pingubro/fluxedthings/tileentity/TileCrystalCauldron.java#L51 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.
March 29, 20178 yr Author Yeah, I already thought about this but its regarding this Capability https://github.com/hnsdieter/FluxedThings2/blob/master/src/main/java/pingubro/fluxedthings/tileentity/TileCrystalCauldron.java#L27 https://github.com/hnsdieter/FluxedThings2/blob/master/src/main/java/pingubro/fluxedthings/tileentity/TileCrystalCauldron.java#L45 and both methods seem not to effect the contents
March 29, 20178 yr You need to clone the recipe's result stack. 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.
March 29, 20178 yr Author ItemStack output = recipe.getOutput().copy(); So I did now but it still doesnt work the output is still empty. I cant get the Item from rigthclicking oder destroying my Block
March 29, 20178 yr Boot up the debugger and step-through it. 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.
March 29, 20178 yr Author Ok I stepped through my code with prints... (dont know how to use IntelliJ properly) As mentioned the crafting works the setting of my Output works and the Output is the same after the current Tick. But in the next tick without doing everything my Output is empty again without modifying it in my code till I activate or breaking my Block. Is there a way to watch an Object in IntelliJ while debugging it showing me all operations done with my Object?
March 29, 20178 yr Ah! I know what it is. Your TE changes your blockstate when it gets an output item. Changing the block state results in the TE itself being deleted and recreated. You need to override...shouldRefresh in your TileEntity like so. 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.
March 29, 20178 yr Author Thank you very much now it works fine. I would have never come up with a solution myself I did not know about this.
March 29, 20178 yr It's a thing that vanilla did in 1.10 and Forge never supplied a good default (or never altered the method to supply a good default, I'm not sure which). The default method is "replace the TE if the TE is not a vanilla TE" which is pretty much worthless. Are there TEs that should refresh when the blockstate changes? Probably. Is it the vast majority? No. 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.
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.