Fixed pipes in inventory losing transparency in various situations

Fixes #1478, as it hasn't been touched by the author for some time