Foam​Fix

Foam​Fix

97M Downloads

Foamfix causes `TileEntity.getKey(TileEntityHopper.class)` to return null

Robijnvogel opened this issue · 21 comments

commented

This is unexpected behaviour.
See DimensionalDevelopment/DimDoors#36 (comment)

We could technically write specific compatibility for your TileEntityFasterHopper, however I personally think that it's better to solve the issue at its root.
What can you do?

commented

@asiekierka that sounds just like the ASM-level hackery that we need. :)

commented

Ugly hacks which may break compatibility with something but should work fine.

commented

Specifically, make TileEntityHopper return the same key as TileEntityFasterHopper, but always instantiate the latter.

commented

Is this released yet? (seems not, latest release was 12th of January?)
If not, please give us a headsup when it is, okay?

commented

Tomorrow at the latest, as I'll be very busy after then.

commented

Alternatively, you can disable "fasterHopper" for the time being.

commented

Okay, yeah, I messed up, 0.8.6 will actually fix this.

commented
commented

I see no errors in my log. :D
Looks like it's fixed!

commented

Also, @asiekierka it has been a pleasure doing business with you. :)
I hope we'll meet again under more... favourable circumstances.

commented

Alternatively, you can disable "fasterHopper" for the time being.
I know. :)
And now so does everyone else who reads this.

commented

Well, 0.8.5 is out so you no longer have to. Enjoy!

commented

Yay!

commented

@asiekierka it didn't work. We still have the same crash and it only happens for Hoppers.
Not for signs, note blocks, dispensers, comparators, furnaces or chests, which are the other TileEntities that we use this code for.
https://pastebin.com/rBuzMMZu

We will implement a workaround for now, but please do fix this, okay?

commented

@Robijnvogel

System.out.println(TileEntity.getKey(TileEntityHopper.class));

On FoamFix 0.8.5, this seems to return "minecraft:hopper". Are you sure?

commented

Have you tested that out-of-dev?
If I add FoamFix to the /run/mods folder of my dev environment, it comes up with other errors that probably have nothing to do with this. As such, I have only been able to test DimDoors + FoamFix in the field.

All I can do right now is point you to our code. And ask you to test FoamFix with our latest release. (look at the log spam :P)

PS. I am using FoamFix Anarchy 0.8.5, by the way.

commented

To add it to the dev environment, you first need to manually run it through the BON2 deobfuscator.

I'll have a look.

commented

This wasn't that unfavorable. Good luck with DimDoors!

commented

Also, we are probably going to extract the code that used to conflict with FoamFix to an external tool, since it was just meant to convert some Minecraft 1.6.4 assets into MC 1.10+ assets. :P Take care!

commented

Doesn't matter - what you found is an inconsistency in behaviour relative to vanilla, even if it's a very obscure one which will likely remain unused by most modders. So it was still a bug! :)