Fixed being able to open ender chests in survival

Fixed being able to open ender chests in survival and general code
improvements