Fix ClassCastException in tile entity