gkbm2013 / tinker-IO

Tinker I/O - An addon for Tinkers' Construct!
https://tio.gkbsite.org/
GNU General Public License v3.0
13 stars 8 forks source link

Crash With Extra Utilities #67

Closed ghost closed 6 years ago

ghost commented 6 years ago

i just connected transfer node (items) from extra utilities to smart output from tinker io then connected it to an empty chest with transper pipe from extra utilities. then it crashed.. crash-2018-01-29_19.12.27-server.txt maybe we need help from @rwtema

gkbm2013 commented 6 years ago

I tested the condition you provide, but the game didn't crash.

mraof commented 6 years ago

I got the a crash doing the same thing but with the ore crusher, I would try fixing it myself and making a pull request but this repo doesn't include the build.gradle crash-2018-01-30_22.41.10-server.txt The important part seems to be java.lang.AbstractMethodError: Method tinker_io/TileEntity/OreCrusherTileEntity.getStackInSlot(I)Lnet/minecraft/item/ItemStack; is abstract

mraof commented 6 years ago

I just tested some more and I was able to replicate the crash with the smart output that @kenijey got, https://paste.ee/p/Cbfo9

mraof commented 6 years ago

I created a build.gradle and am trying to fix it, but can't replicate it in the dev environment. Maybe something went wrong when building the released version?

mraof commented 6 years ago

I rebuilt the mod and tested it and was still getting the same error, with no mods besides extra utilities, tinker io and the dependencies for tinker IO. It might be an issue with extra utilities but it'd be strange for it not to effect other mods, although it looks like these are the same error https://github.com/rwtema/extrautilities/issues/1745 and https://github.com/rwtema/extrautilities/issues/1125

Leosky commented 6 years ago

i got this in the forever stranded lost souls and it was eu2 utils (like all other world corrupting issues...).

minrun commented 6 years ago

me and my father have been experiencing this issue. it stems from the item-transfer nodes, both input and output causes the crash, and only occurs when a item slot is interacted with by the node. strangely, the fluid node does not crash.

ThaDaVos commented 6 years ago

Crashes here too, please fix

gkbm2013 commented 6 years ago

I have no idea how to fix it......

Source code from ExtraUtilities2 https://github.com/rwtema/Extra-Utilities-2-Source/blob/5a84281cff5542b7f63353823564147f36db368a/1.10.2/src/main/java/com/rwtema/extrautils2/transfernodes/TransferNodeItem.java#L211

Source code from Tinker I/O https://github.com/gkbm2013/tinker-IO/blob/1.12.2/src/java/tinker_io/TileEntity/SOTileEntity.java#L286

Need help...

gkbm2013 commented 6 years ago

https://github.com/rwtema/Extra-Utilities-2-Source/issues/25

Mohron commented 6 years ago

Just encountered this crash as well :(

Psithief commented 6 years ago

@gkbm2013 You implemented the interface ISidedInventory, but you aren't treating each of the six faces of the Smart I/O differently. I think the bug's in there somewhere.

Other mods like Thermal Dynamics Expansion also cannot extract items from the Smart I/O, but the default Minecraft Hopper can. Luckily, Thermal Dynamics Expansion doesn't crash. Perhaps you can use Thermal Dynamics Expansion to debug?

ThaDaVos commented 6 years ago

Even the Fast hoppers can't (don't know from what mod)

duncanwebb commented 6 years ago

This is the same problem as I have when connecting a transfer node to the ore crusher. As soon as a transfer node was attached to the right hand side of the ore crusher the game crashed with a ticking entity. The ore crusher is very close to other machines as shown.

In this image I added a transfer node to the side and when I removed the bottom hopper the game crashed.

2018-03-13_16 36 10

Hoppers at the top and bottom worked just fine but TE itemducts didn't work when attached to the top or sides.

duncanwebb commented 6 years ago

I missed out something important. If the ore crusher is away from the other machines then a transfer node can be attached without causing a problem.

zapl commented 6 years ago

I have no idea how you manage to get a AbstractMethodError because that's fairly hard to get, but your implementation of IItemHandler seems odd compared to https://shadowfacts.net/tutorials/forge-modding-1102/tile-entities-inventory/ for example (I'm just a Java guy, no idea how to mod), and I think you're missing the item case in has/getCapability, it's just exposing the fluid interface. Maybe if you remove the capability interface alltogether? It's somehow related to capabilities because ExtraUtilities tries to call IItemHandler version of getStackInSlot and gets something without that method, I'd guess whatever return super.getCapability(.. in your code produces. You may have to add return this in the item case here.

Psithief commented 6 years ago

@zapl Thanks for expanding on that, I didn't have time to get back to this to investigate myself. :+1: :+1:

Hirsu commented 6 years ago

Hi,

I was wondering if there is a fix for the inventory issue on the horizon. I'm running into the same problem with only being able to use vanilla hoppers to insert/extract items from an Ore Crusher. It would be nice if other mods could be used on these devices ;)

EpicSquid commented 6 years ago

@gkbm2013 you are currently implementing IItemHandler and IInventory on the same tile, which is incorrect. IItemHandler is designed for capabilities (a system you can easily move your tiles to use, see the forge docs on that) while IInventory is implemented directly on the tile. IInventory is deprecated, and I can help you upgrade and fix this if you need. However for further discussion, it would probably be better to hit me up on discord :).

Sakata-MC commented 6 years ago

Please change the title of this issue? I almost created a duplicate.

Mekanism seems to be able to pull from the TinkerIO machines, interestingly enough. For anyone else with issue.

ThaDaVos commented 6 years ago

@Sakata-MC Why change title? The title says "Crash with Extra Utilities"

Keridos commented 6 years ago

I am working on this, @gkbm2013 please note that it might take some time because the mod does not play well with later forge versions, at least the source code in here. I am currently fixing about a dozen bugs in the mod from not registering items, blocks and models properly to reimplenting the inventory system how it should be implemented in 1.12.2.

You should really read up on the changes from minecraft 1.7.10 onwards, a lot of stuff has changed, including how you register what and when you register each type, item handling was reworked completely and has been replaced by capabilities. Also recipes should now be put in jsons. You were somehow missing a build.gradle and your src folder was not correctly set up to support importing the project via a build.gradle. For an example on how registering now works, checkout this event handler here: https://github.com/OpenModularTurretsTeam/OpenModularTurrets/blob/1.12/src/main/java/omtteam/openmodularturrets/handler/OMTEventHandler.java

Also you can see how recipes are made now via json in the same repository.

I will edit this once I see some more stuff I can tell you about porting mods from 1.7.10

gkbm2013 commented 6 years ago

So... I decided to rewrite the mod... Because there are too many old fashion code in Tinker I/O. Maybe it will cost about a month to work with.

gkbm2013 commented 6 years ago

The problem was solved in Tinker I/O rw 2.7.0a ! Thanks you all for the discussion!