Renamed file.
Now it should invalidate properly.
Using the inventory ItemStack now, instead of copying it and then putting it back.