Equivalent Exchange 3

Equivalent Exchange 3

2M Downloads

Calcinator Crash

McyD opened this issue ยท 10 comments

commented

This probably isn't caused by EE3, but by a mod called MyTown.

commented

Mytown author stated it was due to:

"I don't know what mod is causing that, but some tile entity isn't extending isUseableByPlayer, which MyTown expects to be there. If you can figure out what TE is being right clicked when that happens, I can bring it up with the mod author and see why its happening."

commented

This is pretty much his fault. isUseableByPlayer is implemented in the superclass of EE3's tiles. He should check if any of the superclasses of the tile has this method. I'm not too familiar enough with ASM, but with Reflection it's as easy as changing getDeclaredMethod() to getMethod().

commented

@Dynious is correct - because all of the EE3 TileEntity's extend off of a common TileEntity class (TileEE) it appears that these classes are not implementing the method (even though the super class is).

MyTown modders just need to check if the TileEntity has a super class, and if it does, does that class implement isUseableByPlayer

commented

Actually, MyTown doesn't use ASM or Reflection to call that method. I retrieve the TileEntity from PlayerInteractEvent, check if its is an IInventory, if it is, its cast to IInventory and the isUseableByPlayer function is called. I can change it to use Reflection easily enough.

commented

That might be it - isUseableByPlayer is part of TileEntity and not IInventory.

commented

Well actually it is part of IInventory, but you've added it to the base TileEntity class that doesn't implement IInventory. One would assume Java handles this correctly, but it seems like it isn't.

commented

Ah, I stand corrected. This is what I get for looking into this on my work machine.

I'll make some changes tonight unless @Dynious beats me to it

commented

Awesome! Java does seem to have some quirks with it. Thank you both! :)

commented

I don't have the time to do this tonight, so have fun with this :P